fix: dont require neotree while loading neotree

This commit is contained in:
əlemi 2024-09-05 05:58:27 +02:00
parent 81b9bdbac1
commit 3b12e448a2
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -1,16 +1,13 @@
local success, manager = pcall(require, "neo-tree.sources.manager")
if success then
-- we have Neotree installed! use it for cool tree view
if not vim.g.codemp_simple_tree then
return {
update = function () manager.refresh("codemp") end,
update = function () require("neo-tree.sources.manager").refresh("codemp") end,
init = function () end,
open = function () vim.cmd("Neotree open source=codemp") end,
toggle = function () vim.cmd("Neotree toggle source=codemp") end,
}
end
-- we don't have Neotree installed, cook a rough window
-- legacy crude filetree if neo-tree is not available
local session = require('codemp.session')
local utils = require('codemp.utils')