more ltex stuff

This commit is contained in:
2025-04-23 08:21:07 +02:00
parent 3b14da94a9
commit 58f93a943c
3 changed files with 12 additions and 27 deletions
+6 -27
View File
@@ -46,38 +46,17 @@ return {
capabilities = capabilities,
})
lspconfig.ltex.setup({
settings = {
ltex = {
language = "de-DE", -- or "en-US", "en-GB", etc.
disabledRules = {
["de-DE"] = { "" }, -- or leave empty to enable all
},
},
},
filetypes = { "markdown", "text", "latex" }, -- Add any other types you write in
on_attach = function()
require("ltex_extra").setup({
load_langs = { "de-DE" },
})
end,
filetypes = { "markdown", "text", "latex" },
capabilities = capabilities,
})
vim.keymap.set("n", "gd", vim.lsp.buf.definition, {})
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
vim.keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, {})
vim.diagnostic.config({
virtual_text = {
spacing = 4,
format = function(diagnostic)
local msg = diagnostic.message
local max_len = 40
if #msg > max_len then
return msg:sub(1, max_len) .. ""
end
return msg
end,
},
float = {
border = "rounded",
max_width = 80,
focusable = false,
},
})
end,
},
}