diff options
author | LostNeophyte <[email protected]> | 2023-01-25 11:06:39 +0100 |
---|---|---|
committer | LostNeophyte <[email protected]> | 2023-01-25 11:11:25 +0100 |
commit | eba121cc651413d753f688162413008a6ed455e2 (patch) | |
tree | 737757af86e0be6a2517e4ad21fffb859621494f /lua/lvim/core/project.lua | |
parent | 4b9f4b2ae6dfc034ba10abab5ab91c357c058734 (diff) |
refactor: use callbacks for configuring builtins
Diffstat (limited to 'lua/lvim/core/project.lua')
-rw-r--r-- | lua/lvim/core/project.lua | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/lua/lvim/core/project.lua b/lua/lvim/core/project.lua index 17473c55..f2da6c33 100644 --- a/lua/lvim/core/project.lua +++ b/lua/lvim/core/project.lua @@ -1,13 +1,7 @@ local M = {} function M.config() - lvim.builtin.project = { - ---@usage set to false to disable project.nvim. - --- This is on by default since it's currently the expected behavior. - active = true, - - on_config_done = nil, - + local config = { ---@usage set to true to disable setting the current-woriking directory --- Manual mode doesn't automatically change your root directory, so you have --- the option to manually do so using `:ProjectRoot` command. @@ -50,6 +44,8 @@ function M.config() ---@usage path to store the project history for use in telescope datapath = get_cache_dir(), } + ---@cast config +LvimBuiltin + lvim.builtin.project = config end function M.setup() @@ -59,9 +55,6 @@ function M.setup() end project.setup(lvim.builtin.project) - if lvim.builtin.project.on_config_done then - lvim.builtin.project.on_config_done(project) - end end return M |