Got python.lua to finally import opts propery

This commit is contained in:
DarthMooMancer
2025-04-14 23:54:47 -04:00
parent f0d04cad7f
commit ccfe27c1e6
4 changed files with 55 additions and 81 deletions
+17 -9
View File
@@ -1,6 +1,14 @@
local M = {}
M.defaults = {
python = {
project_root = "~/Projects/Python",
keybinds = {
["<leader>pr"] = "PythonRun",
["<leader>pb"] = "PythonPip",
["<leader>pc"] = "PythonCustom"
},
},
terminal = {
right_padding = 0,
bottom_padding = 0,
@@ -11,16 +19,16 @@ M.defaults = {
relativenumber = true,
scroll = true,
}
-- java = { indent = 4 },
-- python = { formatter = "black", linting = true },
-- lua = { diagnostics = true },
-- c = { compiler = "gcc" },
-- cpp = { compiler = "g++" },
-- rust = { edition = "2021" },
-- html = { use_tailwind = false },
}
-- This will be updated by setup()
M.user_config = vim.deepcopy(M.defaults)
M.user_config = {}
function M.setup(user_opts)
M.user_config = vim.tbl_deep_extend("force", {}, M.defaults, user_opts or {})
end
function M.get(lang)
return M.user_config[lang] or {}
end
return M