fix: filetree is a method

This commit is contained in:
əlemi 2024-08-22 03:40:56 +02:00
parent dd5bdfcb8a
commit d4e13c9f8f
Signed by: alemi
GPG key ID: A4895B84D311642C
3 changed files with 3 additions and 3 deletions

View file

@ -162,7 +162,7 @@ vim.api.nvim_create_user_command(
if state.client ~= nil and state.workspace ~= nil then
local ws = state.client:get_workspace(state.workspace)
if ws ~= nil then
return filter(lead, ws.filetree)
return filter(lead, ws:filetree())
end
end
end

View file

@ -23,7 +23,7 @@ local function update_window()
local buffer_to_row = {}
local user_to_row = {}
local off = {}
local tree = state.client:get_workspace(state.workspace).filetree
local tree = state.client:get_workspace(state.workspace):filetree()
vim.api.nvim_set_option_value('modifiable', true, { buf = buffer_id })
local tmp = ">| codemp\n"
tmp = tmp .. " |: " .. state.workspace .. "\n"

View file

@ -84,7 +84,7 @@ local function leave()
end
local function open_buffer_tree()
local tree = state.client:get_workspace(state.workspace).filetree
local tree = state.client:get_workspace(state.workspace):filetree()
if tree_buf == nil then
tree_buf = vim.api.nvim_create_buf(false, true)
vim.api.nvim_buf_set_name(tree_buf, "codemp::" .. state.workspace)