From d4e13c9f8fbba4119f72e3ebac5ec969645173d9 Mon Sep 17 00:00:00 2001 From: alemi Date: Thu, 22 Aug 2024 03:40:56 +0200 Subject: [PATCH] fix: filetree is a method --- src/command.lua | 2 +- src/window.lua | 2 +- src/workspace.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/command.lua b/src/command.lua index a199f48..304cf43 100644 --- a/src/command.lua +++ b/src/command.lua @@ -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 diff --git a/src/window.lua b/src/window.lua index 6002957..6300818 100644 --- a/src/window.lua +++ b/src/window.lua @@ -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" diff --git a/src/workspace.lua b/src/workspace.lua index 941a5a7..0ecef1d 100644 --- a/src/workspace.lua +++ b/src/workspace.lua @@ -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)