fix(lsp): ltex_plus → ltex_ls_plus
- Naming conflicts with lspconfig: the `filetypes` field was overwritten by lspconfig.
This commit is contained in:
70
lsp/ltex_ls_plus.lua
Normal file
70
lsp/ltex_ls_plus.lua
Normal file
@ -0,0 +1,70 @@
|
||||
local language_id_mapping = {
|
||||
bib = 'bibtex',
|
||||
pandoc = 'markdown',
|
||||
plaintex = 'tex',
|
||||
rnoweb = 'rsweave',
|
||||
rst = 'restructuredtext',
|
||||
tex = 'latex',
|
||||
text = 'plaintext',
|
||||
norg = 'neorg',
|
||||
}
|
||||
|
||||
local function get_language_id(_, filetype)
|
||||
return language_id_mapping[filetype] or filetype
|
||||
end
|
||||
|
||||
return {
|
||||
cmd = { 'ltex-ls-plus' },
|
||||
filetypes = {
|
||||
'markdown',
|
||||
'pandoc',
|
||||
'latex',
|
||||
'text',
|
||||
'norg',
|
||||
'gitcommit',
|
||||
'jj',
|
||||
'jjdescription',
|
||||
'rst',
|
||||
'typst'
|
||||
},
|
||||
get_language_id = get_language_id,
|
||||
single_file_support = true,
|
||||
settings = {
|
||||
ltex = {
|
||||
enabled = {
|
||||
'markdown',
|
||||
'pandoc',
|
||||
'latex',
|
||||
'text',
|
||||
'norg',
|
||||
'gitcommit',
|
||||
'jj',
|
||||
'jjdescription',
|
||||
'rst',
|
||||
'typst'
|
||||
},
|
||||
language = "auto",
|
||||
diagnosticSeverity = "information",
|
||||
checkFrequency = "save",
|
||||
sentenceCacheSize = 2000,
|
||||
additionalRules = {
|
||||
enablePickyRules = true,
|
||||
motherTongue = "fr",
|
||||
},
|
||||
enabledRules = {
|
||||
en = { "EN_CONSISTENT_APOS" },
|
||||
},
|
||||
disabledRules = {
|
||||
fr = { "APOS_TYP", "FRENCH_WHITESPACE", "CHANGE", "ISSUE", },
|
||||
en = { "DASH_RULE", "TWO_HYPHENS", "CHANGE", "ISSUE", "CHECK",
|
||||
"ACTUALLY", "CONSISTENT", },
|
||||
},
|
||||
dictionary = {
|
||||
fr = { "CryptPad", "Chouhartem",
|
||||
-- field names
|
||||
"authors", "categories", "created", "updated", "title", "meta" },
|
||||
en = { "CryptPad", },
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user