mirror of
https://github.com/hexedtech/codemp.git
synced 2024-12-22 21:04:53 +01:00
chore: implemented user_list for lua, js, py
This commit is contained in:
parent
2f6557f971
commit
db77fce3ab
3 changed files with 14 additions and 0 deletions
|
@ -16,6 +16,11 @@ impl Workspace {
|
|||
self.filetree(filter, strict)
|
||||
}
|
||||
|
||||
#[napi(js_name = "user_list")]
|
||||
pub fn js_user_list(&self) -> Vec<String> {
|
||||
self.user_list()
|
||||
}
|
||||
|
||||
#[napi(js_name = "cursor")]
|
||||
pub fn js_cursor(&self) -> CursorController {
|
||||
self.cursor()
|
||||
|
|
|
@ -41,6 +41,10 @@ impl LuaUserData for CodempWorkspace {
|
|||
methods.add_method("filetree", |_, this, (filter, strict,):(Option<String>, Option<bool>,)|
|
||||
Ok(this.filetree(filter.as_deref(), strict.unwrap_or(false)))
|
||||
);
|
||||
|
||||
methods.add_method("user_list", |_, this, ()|
|
||||
Ok(this.user_list())
|
||||
);
|
||||
}
|
||||
|
||||
fn add_fields<F: LuaUserDataFields<Self>>(fields: &mut F) {
|
||||
|
|
|
@ -86,4 +86,9 @@ impl Workspace {
|
|||
fn pyfiletree(&self, filter: Option<&str>, strict: bool) -> Vec<String> {
|
||||
self.filetree(filter, strict)
|
||||
}
|
||||
|
||||
#[pyo3(name = "user_list")]
|
||||
fn pyuser_list(&self) -> Vec<String> {
|
||||
self.user_list()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue