feat: migrate old config

This commit is contained in:
johannes committed 2026-11-12 23:58:22 +01:00
1 parent 1a2ce09da2
commit 92c21d8d6a
31 files changed
+918 -38

No files matched your search

+24
View File
@@ -16,6 +16,7 @@ M.servers = {
"basedpyright",
"ruff",
"intelephense",
"tinymist",
}
local function restart()
@@ -39,6 +40,11 @@ function M.setup()
if client.name == "ruff" then
client.server_capabilities.hoverProvider = false -- basedpyright owns hover
end
if client.name == "vtsls" then
-- prettierd formats TypeScript
client.server_capabilities.documentFormattingProvider = false
client.server_capabilities.documentRangeFormattingProvider = false
end
local function map(lhs, rhs, desc)
vim.keymap.set("n", lhs, rhs, { buffer = ev.buf, desc = desc })
@@ -48,6 +54,24 @@ function M.setup()
end,
})
-- No inline text; the diagnostic under the cursor opens in a float on CursorHold.
vim.diagnostic.config({
virtual_text = false,
signs = true,
underline = true,
update_in_insert = false,
severity_sort = true,
float = { border = "rounded", source = true },
})
vim.api.nvim_create_autocmd("CursorHold", {
group = vim.api.nvim_create_augroup("core.lsp.float", { clear = true }),
callback = function()
vim.diagnostic.open_float(nil, { focusable = false, scope = "cursor", prefix = " " })
end,
})
vim.lsp.inlay_hint.enable(true) -- gopls and lua_ls hints; <leader>ui toggles
vim.lsp.enable(M.servers)
end