dense-analysis / dense-analysis/ale
Language for languagetool should be taken from spelllang
- Dominant language
- Vim Script
- Stars
- 14k
- Forks
- 1.5k
- Avg merge
- 17h 49m
- Merged PRs (30d)
- 1
Description
The language for the languagetool spellcheck should be taken form `&spelllang`, or at least be configurable through another option. It should be quite simple in most cases; If spelllang has 2 characters, just pass them to languagetool. If it has 5, uppercase the last two.
Another variable `g:ale_languagetool_lang` could override the language, if user's spelllang is not supported by languagetool or differs from their vim spelllang. A Hashmap with languagecode mappings would be another option. Probably more reliable but a little more boilerplate. That is how I did it with textidote, when I adapted the existing PR for my own needs locally.
If using spellang seems to complicated, the variable `g:ale_languagetool_lang` would be much appreciated.
Contributor guide
Research direction
Start at the languagetool spellcheck entry point and inspect how its language is currently selected. Compare the requested spelllang-derived value with the proposed g:ale_languagetool_lang override or language-code mapping, then verify that the selected language is passed correctly and that unsupported or differing Vim spell languages remain configurable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vim
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100