fix(deprecated): replacing deprecated code throughout project

rework: moved load_language_module to languages as it makes more sense
This commit is contained in:
DarthMooMancer
2025-05-16 10:53:34 -04:00
parent 9eb38ba06e
commit 7e047478d5
5 changed files with 60 additions and 64 deletions
+19 -16
View File
@@ -1,21 +1,8 @@
local M = {}
M.defaults = {
globals = {
project_root = "~/Projects",
keybinds = {
["<leader>po"] = "PolydevManager",
},
},
terminal = {
preset = nil,
border = {
enabled = true,
type = "rounded",
},
},
}
---@param project_root string
---@return table
local function default_languages(project_root)
return {
rust = {
@@ -58,8 +45,24 @@ M.user_config = {}
---@param user_opts table
function M.setup(user_opts)
local defaults = {
globals = {
project_root = "~/Projects",
keybinds = {
["<leader>po"] = "PolydevManager",
},
},
terminal = {
preset = nil,
border = {
enabled = true,
type = "rounded",
},
},
}
-- First merge global and terminal
M.user_config = vim.tbl_deep_extend("force", {}, M.defaults, user_opts or {})
M.user_config = vim.tbl_deep_extend("force", {}, defaults, user_opts or {})
-- Now use the final resolved project_root from user_config
local root = M.user_config.globals.project_root