valentjn / vscode-ltex

LTeX: Grammar/spell checker :mag::heavy_check_mark: for VS Code using LanguageTool with support for LaTeX :mortar_board:, Markdown :pencil:, and others
https://valentjn.github.io/ltex
Mozilla Public License 2.0
800 stars 27 forks source link

Language detection from polyglossia parameters #875

Open 945fc41467 opened 6 months ago

945fc41467 commented 6 months ago

Is your feature request related to a problem? Please describe. I would like ltex to automatic detect languages, without magic comment. I didn’t test, but it is supposed to work with babel package. I would be happy to have the same feature with polyglossia package.

Describe the solution you'd like Just use the parameter set in

\usepackage{polyglossia}
    \setdefaultlanguage{Chinese}

and also take account temporary change in the text body.

Describe alternatives you've considered Currently I use magic comments. It works but it is less elegant.