Reverting opts and seeing if this fixes anything

This commit is contained in:
DarthMooMancer
2025-04-11 19:41:29 -04:00
parent 7d12d97bf4
commit 55b0f574a3
+4 -12
View File
@@ -15,12 +15,10 @@ function M.load_language_module(lang)
local ok, lang_module = pcall(require, "Polydev." .. lang)
if ok and lang_module.setup then
local opts = M.language_opts and M.language_opts[lang] or {}
lang_module.setup(opts)
M.loaded_languages[lang] = lang_module
return true
lang_module.setup()
M.loaded_languages[lang] = lang_module
return true
end
return false
end
@@ -48,13 +46,7 @@ function M.create_new_file()
end)
end
function M.setup(opts)
opts = opts or {}
-- Send config to globals
require("Polydev.globals").setup(opts.globals or {})
M.language_opts = opts -- store all opts, including language-specific one
function M.setup()
vim.api.nvim_create_user_command("NewProject", M.create_project, {})
vim.api.nvim_create_user_command("NewFile", M.create_new_file, {})
vim.keymap.set("n", "<leader>np", ":NewProject<CR>", { silent = true })