This commit is contained in:
Christoph J. Scherr 2024-03-12 11:33:07 +01:00
parent 8ccbfe6d75
commit 04bef0b100
Signed by: cscherrNT
GPG Key ID: 8E2B45BC51A27EA7
4 changed files with 73 additions and 6 deletions

View File

@ -14,6 +14,8 @@ local servers = {
"bashls", "bashls",
"cmake", "cmake",
"yamlls", "yamlls",
"textlsp",
"texlab",
} }
for _, lsp in ipairs(servers) do for _, lsp in ipairs(servers) do
@ -47,3 +49,66 @@ lspconfig.rust_analyzer.setup {
}, },
}, },
} }
lspconfig.ltex.setup {
on_attach = on_attach,
capabilities = capabilities,
settings = {
ltex = {
-- specific language (such as en-GB or de-DE is recommended, but I
-- want multilingual)
language = "en-GB",
enabled = {
-- I'm writing in german but the commands are in english,
-- does not really work
-- "bibtex",
-- "tex",
-- "latex",
"gitcommit",
"markdown",
"org",
"restructuredtext",
"rsweave",
"quarto",
"rmd",
"context",
"html",
"xhtml",
},
},
},
}
lspconfig.textlsp.setup {
on_attach = on_attach,
capabilities = capabilities,
filetypes = {
"bibtex",
"tex",
"latex",
"gitcommit",
"markdown",
"org",
"restructuredtext",
"rsweave",
"quarto",
"rmd",
"context",
"html",
"xhtml",
},
settings = {
textLSP = {
analysers = {
languagetool = {
check_text = {
on_change = false,
on_open = true,
on_save = true,
},
enabled = false,
},
},
},
},
}

View File

@ -1,9 +1,9 @@
local M = {} local M = {}
-- this function will split a string into a table of tokens, like it would --- this function will split a string into a table of tokens, like it would
-- be passed into the `argv` of a program that was executed from the commandline --- be passed into the `argv` of a program that was executed from the commandline
-- ---
-- @param string raw string of cli args that should be split --- @param raw string string of cli args that should be split
-- @return table tokens args as a table --- @return table tokens args as a table
M.tokenize_args = function(raw) M.tokenize_args = function(raw)
-- NOTE: string.gmatch is does not use regex, but a smaller pattern matcher! -- NOTE: string.gmatch is does not use regex, but a smaller pattern matcher!
-- A complete regex parser would be larger than lua itself. See -- A complete regex parser would be larger than lua itself. See
@ -47,7 +47,7 @@ end
--- dumps a variable into a string, so it can be printed. This is meant for --- dumps a variable into a string, so it can be printed. This is meant for
--- debug prints --- debug prints
--- @param any t any variable --- @param t any variable
--- @return string t_dumped t dumped to string --- @return string t_dumped t dumped to string
M.dump = function(t) M.dump = function(t)
if type(t) == 'table' then if type(t) == 'table' then

View File

@ -295,3 +295,5 @@ sequenceDiagram
style style
BT BT
style style
T2000
TINF22CS

Binary file not shown.