dotfiles/.config/nvim/lua/plugins/ltex-ls.lua

52 lines
1.1 KiB
Lua

local extraOpts = {
load_langs = {
"en",
"en-US",
"en-CA",
},
path = vim.fn.expand("~") .. "/.local/share/ltex",
log_level = "warn",
}
return {
{
"barreiroleo/ltex_extra.nvim",
dependencies = { "neovim/nvim-lspconfig" },
},
{
"neovim/nvim-lspconfig",
opts = {
servers = {
ltex = {
on_attach = {
function(client, bufnr)
require("ltex_extra").setup(extraOpts)
end,
},
settings = {
ltex = {
language = "en",
enabled = {
"latex",
"tex",
"bib",
"md",
"markdown",
},
-- checkFrequency = { "save" },
-- diagnosticSeverity = "information",
-- sentencetCacheSize = 5000,
-- additionalRules = {
-- enablePickyRules = true,
-- motherTongue = "en",
-- },
},
},
},
},
},
},
{
"williamboman/mason-lspconfig.nvim",
opts = { ensure_installed = { "ltex" } },
},
}