migrate to new builtin plugin manager with new folder structure #10

Merged
S4NKALP merged 18 commits from rewrite-for-v0.12 into main 2026-05-08 16:05:38 +00:00
5 changed files with 98 additions and 1 deletions
Showing only changes of commit 9e589bc70c - Show all commits

No files matched your search

+1 -1
View File
@@ -121,7 +121,7 @@ vim.api.nvim_create_autocmd("LspAttach", {
group = augroup("lsp_attach_autocmds"),
callback = function(args)
local client = vim.lsp.get_client_by_id(args.data.client_id)
if client and client.supports_method("textDocument/documentHighlight") then
if client and client:supports_method("textDocument/documentHighlight") then
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
buffer = args.buf,
callback = vim.lsp.buf.document_highlight,
+6
View File
@@ -21,6 +21,12 @@ local treesitter_parsers = {
"css",
"scss",
"markdown_inline",
"regex",
"latex",
"tsx",
"svelte",
"typst",
"vue",
}
local lsp_server = {
+40
View File
@@ -36,6 +36,46 @@ vim.schedule(function()
vim.lsp.enable("html")
vim.lsp.enable("cssls")
vim.lsp.config("tailwindcss", {
filetypes = {
"astro",
"blade",
"edge",
"ejs",
"erb",
"gohtml",
"gohtmltmpl",
"handlebars",
"hbs",
"html",
"jade",
"leaf",
"liquid",
"markdown",
"mdx",
"mustache",
"nunjucks",
"php",
"razor",
"slim",
"twig",
"css",
"less",
"postcss",
"sass",
"scss",
"stylus",
"sugarss",
"javascript",
"javascriptreact",
"rescript",
"typescript",
"typescriptreact",
"vue",
"svelte",
"templ",
},
})
vim.lsp.enable("tailwindcss")
-- rust
+24
View File
@@ -58,6 +58,11 @@ end
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.g.loaded_node_provider = 0
vim.g.loaded_perl_provider = 0
vim.g.loaded_python3_provider = 0
vim.g.loaded_ruby_provider = 0
vim.opt.path:append({ "**" })
vim.opt.shortmess:append({ W = true, I = true, c = true }) -- disable greeting
@@ -65,3 +70,22 @@ vim.opt.shortmess:append({ W = true, I = true, c = true }) -- disable greeting
vim.g.markdown_recommended_style = 0
vim.cmd([[set fillchars+=eob:\ ]])
vim.filetype.add({
extension = {
astro = "astro",
ejs = "ejs",
hbs = "hbs",
njk = "nunjucks",
postcss = "postcss",
razor = "razor",
slim = "slim",
sugarss = "sugarss",
edge = "edge",
jade = "jade",
leaf = "leaf",
erb = "erb",
gohtml = "gohtml",
gohtmltmpl = "gohtmltmpl",
},
})
+27
View File
@@ -30,4 +30,31 @@ _G.add = function(specs)
if #res > 0 then pcall(vim.pack.add, res, { confirm = false }) end
end
vim.api.nvim_create_autocmd("PackChanged", {
callback = function(ev)
local spec = ev.data.spec
local kind = ev.data.kind
local path = ev.data.path
if spec.build and (kind == "install" or kind == "update") then
vim.notify("Building " .. (spec.name or spec.src) .. "...", vim.log.levels.INFO, { title = "vim.pack" })
local cmd = type(spec.build) == "string" and { "sh", "-c", spec.build } or spec.build
vim.system(cmd, { cwd = path }, function(res)
if res.code ~= 0 then
vim.notify(
"Build failed for " .. (spec.name or spec.src) .. ": " .. res.stderr,
vim.log.levels.ERROR,
{ title = "vim.pack" }
)
else
vim.notify(
"Build successful for " .. (spec.name or spec.src),
vim.log.levels.INFO,
{ title = "vim.pack" }
)
end
end)
end
end,
})
return M