Refactor: moving injects and start the parser
- moving all the inject functions inside its proper folder - starting the parser refactoring
This commit is contained in:
14
lua/codetyper/utils/get_config.lua
Normal file
14
lua/codetyper/utils/get_config.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
local M = {}
|
||||
|
||||
-- Get current codetyper configuration at call time
|
||||
function M.get_config()
|
||||
local ok, codetyper = pcall(require, "codetyper")
|
||||
if ok and codetyper.get_config then
|
||||
return codetyper.get_config() or {}
|
||||
end
|
||||
-- Fall back to defaults if codetyper isn't available
|
||||
local defaults = require("codetyper.config.defaults")
|
||||
return defaults.get_defaults()
|
||||
end
|
||||
|
||||
return M
|
||||
Reference in New Issue
Block a user