Closed christoffer closed 8 months ago
I thought this was already the case because the readme says that 'en-US' is already the default. It did not work in my config, however, so I had to set it manually.
From the readme:
-- table <string> : languages for witch dictionaries will be loaded, e.g. { "es-AR", "en-US" }
-- https://valentjn.github.io/ltex/supported-languages.html#natural-languages
load_langs = {}, -- en-US as default
I thought this was already the case because the readme says that 'en-US' is already the default. It did not work in my config, however, so I had to set it manually.
From the readme:
-- table <string> : languages for witch dictionaries will be loaded, e.g. { "es-AR", "en-US" } -- https://valentjn.github.io/ltex/supported-languages.html#natural-languages load_langs = {}, -- en-US as default
Right, that's pretty much spot on what my experience was too, hence this PR :)
@barreiroleo do you think this is a good idea, or should I close this one out?
Thank you! I'm wondering if this never worked or if the language server changed the default value. Sorry for the delay
Closes #45, closes #49
This PR just sets the default value "en-US" to
load_langs
, as suggested in the README file.Setting the value solves the issue of not loading the custom dictionary (etc) when
load_lang
hasn't been set, as mentioned in https://github.com/barreiroleo/ltex_extra.nvim/issues/45.Just spent about an hour debugging why my ltex would ignore my custom dictionary after each restart, so figured I'd just make a quick PR to save others from doing the same :)
Test plan
Ran without setting
load_langs
and tracing and saw it pick up the correct default language.Ran with a custom load_langs to make sure it's respected