ltex-ls
ltex-ls copied to clipboard
Picky rules not flagged if spelling error in sentence, even if spell checking is disabled
Describe the bug Over 40 words sentence warning doesn't trigger when the sentence contains a word that languagetool considers to be a spelling error, even when spell checking is disabled or I specify an additional dictionary file in the ltex lsp config where the spelling is valid (so the spelling error doesn't get flagged).
Steps to reproduce Steps to reproduce the behaviour:
Set additionalRules.enablePickyRules = true
(all other settings can remain default).
In a document being checked by ltex type:
This is a very long sentence about SQUIDs which will not show a warning for some reason, even though it's really not giving the reader the time to breathe or collect their thoughts since it goes on and on for over 40 words.
Then type:
This is a very long sentence about SQUID which will not show a warning for some reason, even though it's really not giving the reader the time to breathe or collect their thoughts since it goes on and on for over 40 words.
This second sentence gets flagged as over 40 words but the first sentence does not since it considers SQUIDs
to be a spelling error.
Expected behavior Both sentences should get flagged as being over the 40 word limit when picky rules are set, especially if spell checking is disabled as then the sentence throws zero warnings.
Sample document
This is a very long sentence about SQUIDs which will not show a warning for some reason, even though it's really not giving the reader the time to breathe or collect their thoughts since it goes on and on for over 40 words.
This is a very long sentence about SQUID which will not show a warning for some reason, even though it's really not giving the reader the time to breathe or collect their thoughts since it goes on and on for over 40 words.
LTeX configuration
ltex = {
language = "en-GB",
disabledRules = {
['en-GB'] = { "MORFOLOGIK_RULE_EN_GB" }
}
additionalRules = {
enablePickyRules = true,
}
}
Note: enablePickyRules is the only thing required to demonstrate this, however the above also demonstrates that the issue occurs when spell checking should be disabled.
Version information List here the version information of the relevant software.
- Operating system: Linux (Arch)
- ltex-ls: 15.2.0
- Java: OpenJDK 19.0.1