barreiroleo / ltex_extra.nvim

Provides external LTeX file handling (off-spec lsp) and other functions.
GNU General Public License v3.0
142 stars 15 forks source link

Set en-US as default load_langs language #48

Closed christoffer closed 8 months ago

christoffer commented 11 months ago

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

rasmusq commented 11 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
christoffer commented 11 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

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?

barreiroleo commented 8 months ago

Thank you! I'm wondering if this never worked or if the language server changed the default value. Sorry for the delay

barreiroleo commented 8 months ago

Closes #45, closes #49