fix(config): better file org

This commit is contained in:
Barrett Ruth 2025-10-04 19:54:53 -04:00
parent a76d228e3f
commit d2bde9bad8
12 changed files with 77 additions and 79 deletions

View file

@ -4,14 +4,15 @@ local config_module = require('cp.config')
local logger = require('cp.log')
local snippets = require('cp.snippets')
if not vim.fn.has('nvim-0.10.0') then
if vim.fn.has('nvim-0.10.0') == 0 then
logger.log('Requires nvim-0.10.0+', vim.log.levels.ERROR)
return {}
end
local user_config = {}
local config = config_module.setup(user_config)
local config = nil
local snippets_initialized = false
local initialized = false
--- Root handler for all `:CP ...` commands
---@return nil
@ -30,10 +31,11 @@ function M.setup(opts)
snippets.setup(config)
snippets_initialized = true
end
initialized = true
end
function M.is_initialized()
return true
return initialized
end
return M