I’m using the ltex.lua
configuration from lsp-config
. My configuration works as expected:
lspconfig.ltex.setup{
on_attach = on_attach,
autostart = false,
settings = {
ltex = {
disabledRules = {
["en"] = { "MORFOLOGIK_RULE_EN" },
["en-AU"] = { "MORFOLOGIK_RULE_EN_AU" },
["en-CA"] = { "MORFOLOGIK_RULE_EN_CA" },
["en-GB"] = { "MORFOLOGIK_RULE_EN_GB" },
["en-NZ"] = { "MORFOLOGIK_RULE_EN_NZ" },
["en-US"] = { "MORFOLOGIK_RULE_EN_US" },
["en-ZA"] = { "MORFOLOGIK_RULE_EN_ZA" },
["es"] = { "MORFOLOGIK_RULE_ES" },
["it"] = { "MORFOLOGIK_RULE_IT_IT" },
["de"] = { "MORFOLOGIK_RULE_DE_DE" },
},
},
},
}
However, when working on a non-English text file I would like to change the settings only for a single buffer by modifying the setup table above settings = { ltex = { language = "pt-BR" } }
and then starting the LSP server with the modified configuration.
Is that possible? How could I do that?