valentjn / ltex-ls

LTeX Language Server: LSP language server for LanguageTool :mag::heavy_check_mark: with support for LaTeX :mortar_board:, Markdown :pencil:, and others
https://valentjn.github.io/ltex
Mozilla Public License 2.0
717 stars 33 forks source link

I'm trying to use this LSP with markdown documents, but it's forcing the incorrect language code. #269

Open ekiim opened 10 months ago

ekiim commented 10 months ago

I'm trying to use this LSP with language es set in my LSP config, but my Markdown documents have the metadata flag lang: es_MX and the LSP is trying to pick that up.

Is there a way to make the LSP ignore the markdown metadata flag?

leana8959 commented 10 months ago

I second this. I have a LaTeX document that needs to be spellchecked in French, but I have the line

\usepackage[english]{babel}

in the beginning of the file.

The global language config I have in my neovim config seems to be overridden by this. Commenting this line out results in the expected behaviour.

I suggest that global language setting to be considered first; otherwise, it would be nice to have a precedence list of all possible language inference heuristics (please tell me if it already exists, I couldn't find it).

Thank you and have a nice day!

Myzel394 commented 9 months ago

@ekiim I'm trying to setup ltex too, but it's not working for me :/ do you mind sharing your config?