reorganize code

This commit is contained in:
kiyan42
2020-02-18 15:33:43 +01:00
parent 7b7fb56c4e
commit b448b1a0fa
5 changed files with 355 additions and 251 deletions

23
lua/lib/conf.lua Normal file
View File

@@ -0,0 +1,23 @@
local BUF_NAME = 'LuaTree'
local function get_cwd() return vim.loop.cwd() end
local ROOT_PATH = get_cwd() .. '/'
local function get_buf_name()
return BUF_NAME
end
local function get_root_path()
return ROOT_PATH
end
local function set_root_path(path)
ROOT_PATH = path
end
return {
get_buf_name = get_buf_name;
get_root_path = get_root_path;
set_root_path = set_root_path;
get_cwd = get_cwd;
}