feat: refactor lsp configs and drop nvim-cmp

This commit is contained in:
2025-11-15 05:59:28 +01:00
parent ee07734ee8
commit e715992cce
17 changed files with 531 additions and 796 deletions
+29
View File
@@ -0,0 +1,29 @@
local lsp = require("lsp")
local util = require("util")
---@type vim.lsp.Config
return {
settings = {
gopls = {
staticcheck = true,
semanticTokens = true,
},
},
on_attach = function(client, bufnr)
lsp.on_attach(client, bufnr)
vim.keymap.set("n", "<leader>lf", function()
util.format({
buf = bufnr,
cmd = {
"golines",
"-m",
"80",
"--shorten-comments",
},
output = "stdout",
})
vim.lsp.buf.format({ async = true })
end, { buffer = bufnr })
end,
}