REFACTOR: Annotations for autocompletion, reworked how projects are made

and handled, wrote the c file replacing the copied python code.
This commit is contained in:
2026-10-22 04:29:52 -04:00
parent 3bb97d833b
commit 685a711644
13 changed files with 373 additions and 178 deletions
+6 -13
View File
@@ -1,19 +1,16 @@
local M = {}
function M.test()
vim.ui.input({ prompt = "Test: ", default = "" }, function(input)
print(input)
end)
end
local configs = require("vern.configs")
local actions = require("vern.actions")
M.opts = {}
---@type VernCoreConfig
M.opts = vim.deepcopy(configs)
---@param user_opts? VernCoreConfig | table
function M.setup(user_opts)
---@type VernCoreConfig
M.opts = vim.tbl_deep_extend("force", {}, configs, user_opts or {})
--- Bind global keybinds
for key, def in pairs(M.opts.keybinds or {}) do
if type(def.action) == "function" then
vim.keymap.set("n", key, function()
@@ -25,7 +22,6 @@ function M.setup(user_opts)
end
end
--- Load project cmdline commands
vim.api.nvim_create_user_command("VernCreateProject", function()
if actions.create_project then
actions.create_project(M.opts)
@@ -38,10 +34,7 @@ function M.setup(user_opts)
end
end, { nargs = "*", desc = "Creates a new file for project" })
--- Create group and attach based on ft
local group =
vim.api.nvim_create_augroup("VernAutocommands", { clear = true })
local group = vim.api.nvim_create_augroup("VernAutocommands", { clear = true })
vim.api.nvim_create_autocmd("FileType", {
group = group,
pattern = "*",