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
759 stars 27 forks source link

German spelling errors are not recognized/displayed #870

Closed AdiWeit closed 4 months ago

AdiWeit commented 5 months ago

Note: It is highly recommended to follow the instructions at https://valentjn.github.io/ltex/vscode-ltex/contributing.html#how-to-report-bugs and use the LTeX: Report bug in LTeX command from within Visual Studio Code. Per the contribution guidelines, deleting parts of the template or not filling in vital information may result in the issue to be immediately closed as invalid.

Describe the bug Spelling errors in a German text (typed markdown for example) will not be recognized or at least not displayed as an error.

Steps to reproduce Steps to reproduce the behavior:

  1. Create a new document
  2. Set the language mode to Markdown
  3. enter the text Deshalb ist die Leitfrage dieser Arbeit, warum C# entwicklet wurde, wenn es doch Java schon gab. or something else with spelling errors
  4. See error (the spelling entwicklet for example will not be marked, although it should obviously be entwickelt)

Expected behavior It would be expected to be marked as an error. Maybe there should even be a quick fix to the problem. The expected behavior is pretty much what the language tool "demo" on their website does if you put the same text in there.

Sample document If the bug occurs for a specific document (e.g. LaTeX), please paste it here. If your document is very long or confidential, please create and attach a smaller example for which the bug still occurs so that we can reproduce it.

```markdown Deshalb ist die Leitfrage dieser Arbeit, warum C# entwicklet wurde, wenn es doch Java schon gab. ```

LTeX configuration Please paste all configuration settings starting with ltex. from your settings.json. You can help us by temporarily removing some irrelevant settings from your settings.json and see if the bug still occurs.

``` { "enabled": [ "bibtex", "context", "context.tex", "html", "latex", "markdown", "org", "restructuredtext", "rsweave" ], "language": "de", "dictionary": {}, "disabledRules": {}, "enabledRules": {}, "hiddenFalsePositives": {}, "bibtex": { "fields": {} }, "latex": { "commands": {}, "environments": {} }, "markdown": { "nodes": {} }, "configurationTarget": { "dictionary": "workspaceFolderExternalFile", "disabledRules": "workspaceFolderExternalFile", "hiddenFalsePositives": "workspaceFolderExternalFile" }, "additionalRules": { "enablePickyRules": false, "motherTongue": "de", "languageModel": "", "neuralNetworkModel": "", "word2VecModel": "" }, "languageToolHttpServerUri": "", "languageToolOrg": { "username": "", "apiKey": "" }, "ltex-ls": { "path": "", "logLevel": "fine", "languageToolHttpServerUri": "", "languageToolOrgUsername": "", "languageToolOrgApiKey": "" }, "java": { "path": "", "initialHeapSize": 64, "maximumHeapSize": 512 }, "sentenceCacheSize": 2000, "completionEnabled": false, "diagnosticSeverity": "information", "checkFrequency": "save", "clearDiagnosticsWhenClosingFile": true, "statusBarItem": false, "trace": { "server": "off" } } ```

"LTeX Language Server" log file First, reproduce the bug. Then, go to ViewOutput and select LTeX Language Server in the drop-down list. Paste this log here:

``` [Info - 08:50:26] Starte ltex-ls ... Feb. 14, 2024 8:50:46 VORM. org.bsplines.ltexls.server.LtexLanguageServer initialize INFORMATION: ltex-ls 15.2.0 - initializing... Feb. 14, 2024 8:50:46 VORM. org.bsplines.ltexls.tools.I18n setLocale INFORMATION: Setting locale to 'en' Feb. 14, 2024 8:50:47 VORM. org.bsplines.ltexls.settings.SettingsManager$Companion logDifferentSettings FEIN: Reinitializing LanguageTool due to different settings for language 'de': setting 'settings', old 'null', new 'non-null' Feb. 14, 2024 8:50:53 VORM. org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FEIN: Checking the following text in language 'de' via LanguageTool: "" Feb. 14, 2024 8:50:53 VORM. org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FEIN: Obtained 0 rule matches Feb. 14, 2024 8:50:58 VORM. org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FEIN: Checking the following text in language 'de' via LanguageTool: "Deshalb ist die Leitfrage dieser Arbeit, warum C# entwicklet wurde, wenn es doch Java schon gab." Feb. 14, 2024 8:51:09 VORM. org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FEIN: Obtained 0 rule matches Feb. 14, 2024 8:51:09 VORM. org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FEIN: Checking the following text in language 'de' via LanguageTool: "Deshalb ist die Leitfrage dieser Arbeit, warum C# entwicklet wurde, wenn es doch Java schon gab." Feb. 14, 2024 8:51:09 VORM. org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FEIN: Obtained 0 rule matches ```

"LTeX Language Client" log file First, set the ltex.trace.server setting in your settings.json to "verbose". Then, reload the VS Code window and reproduce the bug. Go to ViewOutput and select LTeX Language Client in the drop-down list. Paste this log here (note: it will contain your checked document):

``` 2024-02-14T07:50:21.887Z Info: Setting LTeX UI language to 'de'. 2024-02-14T07:50:21.887Z Info: Loading i18n messages... 2024-02-14T07:50:21.893Z Info: Loading default i18n messages... 2024-02-14T07:50:21.901Z Info: 2024-02-14T07:50:21.901Z Info: ltex.ltex-ls.path not set. 2024-02-14T07:50:21.901Z Info: Searching for ltex-ls in '/home/adi/.vscode/extensions/neo-ltex.ltex-13.1.1/lib'... 2024-02-14T07:50:21.903Z Info: ltex-ls found in '/home/adi/.vscode/extensions/neo-ltex.ltex-13.1.1/lib/ltex-ls-15.2.0'. 2024-02-14T07:50:21.903Z Info: 2024-02-14T07:50:21.903Z Info: Using ltex-ls from '/home/adi/.vscode/extensions/neo-ltex.ltex-13.1.1/lib/ltex-ls-15.2.0'. 2024-02-14T07:50:21.903Z Info: Using Java bundled with ltex-ls as ltex.java.path is not set. 2024-02-14T07:50:21.905Z Info: Testing ltex-ls... 2024-02-14T07:50:21.905Z Info: Command: "/home/adi/.vscode/extensions/neo-ltex.ltex-13.1.1/lib/ltex-ls-15.2.0/bin/ltex-ls" 2024-02-14T07:50:21.905Z Info: Arguments: ["--version"] 2024-02-14T07:50:21.905Z Info: env['JAVA_HOME']: undefined 2024-02-14T07:50:21.905Z Info: env['JAVA_OPTS']: "-Xms64m -Xmx512m" 2024-02-14T07:50:26.260Z Info: Test successful! 2024-02-14T07:50:26.260Z Info: 2024-02-14T07:50:26.281Z Info: Starte ltex-ls ... 2024-02-14T07:50:26.281Z Info: Command: "/home/adi/.vscode/extensions/neo-ltex.ltex-13.1.1/lib/ltex-ls-15.2.0/bin/ltex-ls" 2024-02-14T07:50:26.281Z Info: Arguments: [] 2024-02-14T07:50:26.281Z Info: env['JAVA_HOME']: undefined 2024-02-14T07:50:26.281Z Info: env['JAVA_OPTS']: "-Xms64m -Xmx512m" 2024-02-14T07:50:26.281Z Info: 2024-02-14T07:51:17.374Z Info: Creating bug report... ```

Version information List here the version information of the relevant software.

JonathanW91 commented 5 months ago

I have the same issue and the same log file output.

AdiWeit commented 4 months ago

Setting the LTex language from de to de-DE solves the issue.