GithubHelp home page GithubHelp logo

neo-ltex / vscode-ltex Goto Github PK

View Code? Open in Web Editor NEW

This project forked from valentjn/vscode-ltex

17.0 1.0 1.0 2.76 MB

LTeX: Grammar/spell checker :mag::heavy_check_mark: for VS Code using LanguageTool with support for LaTeX :mortar_board:, Markdown :pencil:, and others

Home Page: https://valentjn.github.io/ltex

License: Mozilla Public License 2.0

JavaScript 1.61% Python 30.04% Java 0.32% TypeScript 68.03%

vscode-ltex's Introduction

All Contributors

  • Copyright (C) 2019-2021 Julian Valentin, LTeX Development Community
  • This Source Code Form is subject to the terms of the Mozilla Public
  • License, v. 2.0. If a copy of the MPL was not distributed with this
  • file, You can obtain one at https://mozilla.org/MPL/2.0/. -->

LTEX Extension for VS Code: Grammar/Spell Checker Using LanguageTool with Support for LATEX, Markdown, and Others

latest releaseversion numberrelease date  installs  rating

vscode-ltex  CI status  stars  open issues closed issues
ltex-ls  CI status  coverage  stars  open issues closed issues

NOTICE: This is a fork of @valentjn's vscode-ltex as it seems to be not maintained.

The current version 13.1.0 is identical to the original. It serves as a base version before adding fixes and improvements.

LTEX provides offline grammar checking of various markup languages in Visual Studio Code using LanguageTool (LT). LTEX currently supports BibTEX, ConTEXt, LATEX, Markdown, Org, reStructuredText, R Sweave, and XHTML documents. In addition, LTEX can check comments in many popular programming languages (optional, opt-in).

The difference to regular spell checkers is that LTEX not only detects spelling errors, but also many grammar and stylistic errors such as:

  • This is an mistake.
  • The bananas is tasty.
  • We look forward to welcome you.
  • Are human beings any different than animals?

A classic use case of LTEX is checking scientific LATEX papers, but why not check your next blog post, book chapter, or long e-mail before you send it to someone else?

Find more information and documentation about LTEX on the official website.

LTEX is a successor (since it's a fork) of the abandoned LanguageTool for Visual Studio Code extension by Adam Voss.

Features

Grammar/Spell Checker for VS Code with LanguageTool and LaTeX Support

  • Supported markup languages: BibTEX, ConTEXt, LATEX, Markdown, Org, reStructuredText, R Sweave, XHTML
  • Comment checking in many popular programming languages (optional, opt-in)
  • Comes with everything included, no need to install Java or LanguageTool
  • Offline checking: Does not upload anything to the internet
  • Supports over 20 languages: English, French, German, Dutch, Chinese, Russian, etc.
  • Issue highlighting with hover description
  • Replacement suggestions via quick fixes
  • User dictionaries
  • Multilingual support with babel commands or magic comments
  • Possibility to use external LanguageTool servers
  • Extensive documentation

Requirements

  • 64-bit Linux, Mac, or Windows operating system
  • VS Code 1.52.0 or newer
  • Optional:
    • If you want to check documents written in a markup language that VS Code does not support out-of-the-box (e.g., LATEX), install an extension that provides support for that language (e.g., LaTeX Workshop Extension for VS Code) in addition to this extension.

How to Use

  1. Install the requirements listed above
  2. Install this extension (see download options)
  3. Reload the VS Code window if necessary
  4. Open a LATEX or a Markdown document, or open a new file and change the language mode to LaTeX or Markdown (open the Command Palette and select Change Language Mode)
  5. Wait until ltex-ls has been found; if necessary, LTEX downloads it for you. Alternatively, you can choose offline installation.
  6. Grammar/spelling errors will be displayed! (if there are any)

Information & Documentation

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Julian Valentin
Julian Valentin

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

vscode-ltex's People

Contributors

valentjn avatar dependabot[bot] avatar unional avatar adamvoss avatar alexanderzeilmann avatar faustinoaq avatar mpolitze avatar allcontributors[bot] avatar

Stargazers

Dai López avatar  avatar Bagus Tris Atmaja avatar  avatar ccoVeille avatar Berkay Hamurcu avatar  avatar Adrian Helgå Vestøl avatar Jeroen B avatar Benoît Pasquier avatar Pierre Marchand avatar Rick Xie avatar Antonio Mudarra Machuca avatar Daniel Spitzer avatar douira avatar Ramon Fraga Pereira avatar Felipe Meneguzzi avatar

Watchers

ccoVeille avatar

Forkers

spitzerd

vscode-ltex's Issues

Add donation button

Note: 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.

Is your feature request related to a problem? Please describe.
Since I cannot contribute code, I want to donate to unional to support the project.

Describe the solution you'd like
Please add a donate button for PayPal, Liberapay, Ko-fi or similar.

Describe alternatives you've considered
N/A

Additional context
N/A

Support AsciiDoc

I saw in #23 that no new languages will be added till the upgrade to ltex-ls version 16.0.0 but I want to put this out here for after that has happened.

Is your feature request related to a problem? Please describe.
I am writing documentation using AsciiDoc and use Ltex for grammar. Though using it despite not being supported poses false positives.

Describe the solution you'd like
I would like AsciiDoc to be a supported markup language.

Describe alternatives you've considered
At the moment I manually run the command LTeX: Activate Extension but this presents false positives.

Additional context
There is an issue in the old repo (valentjn#847).
As I understand from this comment a java parser is necessary. There are official Java bindings for Asciidoctor called AsciidoctorJ. Maybe these could make this possible?

Language checking stops after \underset{\text {a}}{b}

Describe the bug
After the use of
$
\underset{\text {a}}{b}
$
spelling checking stops for the rest of the document

Steps to reproduce
Open a new tex-file with the sample document from below and note that "asdf" is not highlighted as a spelling mistake after \underset{\text {a}}{b}

Expected behavior
I expect, that language checking still works after \underset{\text {a}}{b}

Sample document

\documentclass{article}
\usepackage{amsmath}

\begin{document}
asdf
$\text{a}$
asdf
$
    \underset{a}{b}
$
asdf
$
    \underset{\text {a}}{b}
$
asdf

\end{document}

LTeX configuration

{
  "enabled": [
    "bibtex",
    "context",
    "context.tex",
    "html",
    "latex",
    "markdown",
    "org",
    "restructuredtext",
    "rsweave"
  ],
  "language": "en-US",
  "dictionary": {},
  "disabledRules": {},
  "enabledRules": {},
  "hiddenFalsePositives": {},
  "bibtex": {
    "fields": {}
  },
  "latex": {
    "commands": {},
    "environments": {
      "lstlisting": "ignore",
      "verbatim": "ignore",
      "align": "ignore"
    }
  },
  "markdown": {
    "nodes": {}
  },
  "configurationTarget": {
    "dictionary": "workspaceFolderExternalFile",
    "disabledRules": "workspaceFolderExternalFile",
    "hiddenFalsePositives": "workspaceFolderExternalFile"
  },
  "additionalRules": {
    "enablePickyRules": false,
    "motherTongue": "",
    "languageModel": "",
    "neuralNetworkModel": "",
    "word2VecModel": ""
  },
  "languageToolHttpServerUri": "",
  "languageToolOrg": {
    "username": "",
    "apiKey": ""
  },
  "ltex-ls": {
    "path": "",
    "logLevel": "fine",
    "languageToolHttpServerUri": "",
    "languageToolOrgUsername": "",
    "languageToolOrgApiKey": ""
  },
  "java": {
    "path": "/opt/homebrew/Cellar/openjdk/21.0.2/libexec/openjdk.jdk/Contents/Home",
    "initialHeapSize": 64,
    "maximumHeapSize": 8192
  },
  "sentenceCacheSize": 50000,
  "completionEnabled": false,
  "diagnosticSeverity": "information",
  "checkFrequency": "edit",
  "clearDiagnosticsWhenClosingFile": true,
  "statusBarItem": false,
  "trace": {
    "server": "verbose"
  }
}

"LTeX Language Server" log file

[Info  - 09:59:15] Starting ltex-ls...
Mar 04, 2024 9:59:16 AM org.bsplines.ltexls.server.LtexLanguageServer initialize
INFO: ltex-ls 15.2.0 - initializing...
Mar 04, 2024 9:59:16 AM org.bsplines.ltexls.tools.I18n setLocale
INFO: Setting locale to 'en'
Mar 04, 2024 9:59:16 AM org.bsplines.ltexls.settings.SettingsManager$Companion logDifferentSettings
FINE: Reinitializing LanguageTool due to different settings for language 'en-US': setting 'sentenceCacheSize', old '2000', new '50000'
Mar 04, 2024 9:59:16 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: " \n\nDummy0a Dummy1 "
Mar 04, 2024 9:59:18 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 0 rule matches
Mar 04, 2024 10:03:48 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: " \n\nasdf\n\n"
Mar 04, 2024 10:03:48 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 1 rule match
Mar 04, 2024 10:03:50 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: " \n\nDummy0a Dummy1 "
Mar 04, 2024 10:03:50 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 0 rule matches
Mar 04, 2024 10:04:51 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: " \n\nasdf Dummy0a Dummy1 "
Mar 04, 2024 10:04:51 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 1 rule match
Mar 04, 2024 10:04:53 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: " \n\nasdf\n\nDummy0a Dummy1 "
Mar 04, 2024 10:04:53 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 1 rule match
Mar 04, 2024 10:05:04 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: " \n\nasdf\n\nDummy0a Dummy1 "
Mar 04, 2024 10:05:04 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 1 rule match
Mar 04, 2024 10:05:07 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: " \n\nasdf\n\nDummy0a Dummy1 Dummy2 "
Mar 04, 2024 10:05:07 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 1 rule match
Mar 04, 2024 10:05:09 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: " \n\nasdf\n\nDummy0a Dummy1 "
Mar 04, 2024 10:05:09 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 1 rule match
Mar 04, 2024 10:05:11 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: " \n\nasdf\n\nDummy0a Dummy1 "
Mar 04, 2024 10:05:11 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 1 rule match
Mar 04, 2024 10:05:11 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: " \n\nasdf\n\nDummy0a Dummy1 "
Mar 04, 2024 10:05:11 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 1 rule match
Mar 04, 2024 10:05:19 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: " \n\nasdf\n\nDummy0a Dummy1 "
Mar 04, 2024 10:05:19 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 1 rule match
Mar 04, 2024 10:05:21 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: " \n\nasdf Dummy0 a b "
Mar 04, 2024 10:05:21 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 1 rule match
Mar 04, 2024 10:05:22 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: " \n\nasdf Dummy0 Dummy1a Dummy2 "
Mar 04, 2024 10:05:22 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 1 rule match
Mar 04, 2024 10:05:23 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: " \n\nasdf Dummy0 a b "
Mar 04, 2024 10:05:23 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 1 rule match
Mar 04, 2024 10:05:23 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: " \n\nasdf Dummy0a a b "
Mar 04, 2024 10:05:23 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 1 rule match
Mar 04, 2024 10:05:26 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: " \n\nasdf Dummy0a \n\nDummy1a Dummy2 "
Mar 04, 2024 10:05:26 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 1 rule match
Mar 04, 2024 10:05:27 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: " \n\nasdf Dummy0a \n\nDummy1a Dummy2 "
Mar 04, 2024 10:05:27 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 1 rule match
Mar 04, 2024 10:05:27 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: " \n\nasdf Dummy0a a\n\nDummy1a Dummy2 "
Mar 04, 2024 10:05:27 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 1 rule match
Mar 04, 2024 10:05:27 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: " \n\nasdf Dummy0a asdf\n\nDummy1a Dummy2 "
Mar 04, 2024 10:05:27 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 2 rule matches
Mar 04, 2024 10:05:38 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: " \n\nasdf Dummy0a asdf Dummy1a Dummy2 "
Mar 04, 2024 10:05:38 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 2 rule matches
Mar 04, 2024 10:05:45 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: " \n\nasdf Dummy0a asdf Dummy1a Dummy2 Dummy3 a b "
Mar 04, 2024 10:05:45 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 2 rule matches
Mar 04, 2024 10:05:48 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: " \n\nasdf Dummy0a asdf Dummy1 asdf Dummy2a Dummy3 "
Mar 04, 2024 10:05:48 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 3 rule matches

"LTeX Language Client" log file

[... truncated]
                "range": {
                    "start": {
                        "line": 10,
                        "character": 0
                    },
                    "end": {
                        "line": 10,
                        "character": 4
                    }
                },
                "severity": 3,
                "code": "MORFOLOGIK_RULE_EN_US",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/MORFOLOGIK_RULE_EN_US?lang=en-US"
                },
                "source": "LTeX",
                "message": "'asdf': Possible spelling mistake found."
            }
        ],
        "edit": {
            "documentChanges": [
                {
                    "textDocument": {
                        "version": 36,
                        "uri": "file:///Users/user/Documents/phd-documents/test/test.tex"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 6,
                                    "character": 0
                                },
                                "end": {
                                    "line": 6,
                                    "character": 4
                                }
                            },
                            "newText": "ASD"
                        }
                    ]
                },
                {
                    "textDocument": {
                        "version": 36,
                        "uri": "file:///Users/user/Documents/phd-documents/test/test.tex"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 10,
                                    "character": 0
                                },
                                "end": {
                                    "line": 10,
                                    "character": 4
                                }
                            },
                            "newText": "ASD"
                        }
                    ]
                }
            ]
        }
    },
    {
        "title": "Use 'ADF' (all selected matches)",
        "kind": "quickfix.ltex.acceptSuggestions",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 6,
                        "character": 0
                    },
                    "end": {
                        "line": 6,
                        "character": 4
                    }
                },
                "severity": 3,
                "code": "MORFOLOGIK_RULE_EN_US",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/MORFOLOGIK_RULE_EN_US?lang=en-US"
                },
                "source": "LTeX",
                "message": "'asdf': Possible spelling mistake found."
            },
            {
                "range": {
                    "start": {
                        "line": 10,
                        "character": 0
                    },
                    "end": {
                        "line": 10,
                        "character": 4
                    }
                },
                "severity": 3,
                "code": "MORFOLOGIK_RULE_EN_US",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/MORFOLOGIK_RULE_EN_US?lang=en-US"
                },
                "source": "LTeX",
                "message": "'asdf': Possible spelling mistake found."
            }
        ],
        "edit": {
            "documentChanges": [
                {
                    "textDocument": {
                        "version": 36,
                        "uri": "file:///Users/user/Documents/phd-documents/test/test.tex"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 6,
                                    "character": 0
                                },
                                "end": {
                                    "line": 6,
                                    "character": 4
                                }
                            },
                            "newText": "ADF"
                        }
                    ]
                },
                {
                    "textDocument": {
                        "version": 36,
                        "uri": "file:///Users/user/Documents/phd-documents/test/test.tex"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 10,
                                    "character": 0
                                },
                                "end": {
                                    "line": 10,
                                    "character": 4
                                }
                            },
                            "newText": "ADF"
                        }
                    ]
                }
            ]
        }
    },
    {
        "title": "Use 'ASF' (all selected matches)",
        "kind": "quickfix.ltex.acceptSuggestions",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 6,
                        "character": 0
                    },
                    "end": {
                        "line": 6,
                        "character": 4
                    }
                },
                "severity": 3,
                "code": "MORFOLOGIK_RULE_EN_US",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/MORFOLOGIK_RULE_EN_US?lang=en-US"
                },
                "source": "LTeX",
                "message": "'asdf': Possible spelling mistake found."
            },
            {
                "range": {
                    "start": {
                        "line": 10,
                        "character": 0
                    },
                    "end": {
                        "line": 10,
                        "character": 4
                    }
                },
                "severity": 3,
                "code": "MORFOLOGIK_RULE_EN_US",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/MORFOLOGIK_RULE_EN_US?lang=en-US"
                },
                "source": "LTeX",
                "message": "'asdf': Possible spelling mistake found."
            }
        ],
        "edit": {
            "documentChanges": [
                {
                    "textDocument": {
                        "version": 36,
                        "uri": "file:///Users/user/Documents/phd-documents/test/test.tex"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 6,
                                    "character": 0
                                },
                                "end": {
                                    "line": 6,
                                    "character": 4
                                }
                            },
                            "newText": "ASF"
                        }
                    ]
                },
                {
                    "textDocument": {
                        "version": 36,
                        "uri": "file:///Users/user/Documents/phd-documents/test/test.tex"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 10,
                                    "character": 0
                                },
                                "end": {
                                    "line": 10,
                                    "character": 4
                                }
                            },
                            "newText": "ASF"
                        }
                    ]
                }
            ]
        }
    },
    {
        "title": "Use 'JASDF' (all selected matches)",
        "kind": "quickfix.ltex.acceptSuggestions",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 6,
                        "character": 0
                    },
                    "end": {
                        "line": 6,
                        "character": 4
                    }
                },
                "severity": 3,
                "code": "MORFOLOGIK_RULE_EN_US",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/MORFOLOGIK_RULE_EN_US?lang=en-US"
                },
                "source": "LTeX",
                "message": "'asdf': Possible spelling mistake found."
            },
            {
                "range": {
                    "start": {
                        "line": 10,
                        "character": 0
                    },
                    "end": {
                        "line": 10,
                        "character": 4
                    }
                },
                "severity": 3,
                "code": "MORFOLOGIK_RULE_EN_US",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/MORFOLOGIK_RULE_EN_US?lang=en-US"
                },
                "source": "LTeX",
                "message": "'asdf': Possible spelling mistake found."
            }
        ],
        "edit": {
            "documentChanges": [
                {
                    "textDocument": {
                        "version": 36,
                        "uri": "file:///Users/user/Documents/phd-documents/test/test.tex"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 6,
                                    "character": 0
                                },
                                "end": {
                                    "line": 6,
                                    "character": 4
                                }
                            },
                            "newText": "JASDF"
                        }
                    ]
                },
                {
                    "textDocument": {
                        "version": 36,
                        "uri": "file:///Users/user/Documents/phd-documents/test/test.tex"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 10,
                                    "character": 0
                                },
                                "end": {
                                    "line": 10,
                                    "character": 4
                                }
                            },
                            "newText": "JASDF"
                        }
                    ]
                }
            ]
        }
    },
    {
        "title": "Add 'asdf' to dictionary",
        "kind": "quickfix.ltex.addToDictionary",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 6,
                        "character": 0
                    },
                    "end": {
                        "line": 6,
                        "character": 4
                    }
                },
                "severity": 3,
                "code": "MORFOLOGIK_RULE_EN_US",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/MORFOLOGIK_RULE_EN_US?lang=en-US"
                },
                "source": "LTeX",
                "message": "'asdf': Possible spelling mistake found."
            },
            {
                "range": {
                    "start": {
                        "line": 10,
                        "character": 0
                    },
                    "end": {
                        "line": 10,
                        "character": 4
                    }
                },
                "severity": 3,
                "code": "MORFOLOGIK_RULE_EN_US",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/MORFOLOGIK_RULE_EN_US?lang=en-US"
                },
                "source": "LTeX",
                "message": "'asdf': Possible spelling mistake found."
            }
        ],
        "command": {
            "title": "Add 'asdf' to dictionary",
            "command": "_ltex.addToDictionary",
            "arguments": [
                {
                    "uri": "file:///Users/user/Documents/phd-documents/test/test.tex",
                    "words": {
                        "en-US": [
                            "asdf"
                        ]
                    }
                }
            ]
        }
    },
    {
        "title": "Hide all false positives in the selected sentences",
        "kind": "quickfix.ltex.hideFalsePositives",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 4,
                        "character": 0
                    },
                    "end": {
                        "line": 4,
                        "character": 4
                    }
                },
                "severity": 3,
                "code": "UPPERCASE_SENTENCE_START",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/UPPERCASE_SENTENCE_START?lang=en-US"
                },
                "source": "LTeX",
                "message": "This sentence does not start with an uppercase letter."
            },
            {
                "range": {
                    "start": {
                        "line": 6,
                        "character": 0
                    },
                    "end": {
                        "line": 6,
                        "character": 4
                    }
                },
                "severity": 3,
                "code": "MORFOLOGIK_RULE_EN_US",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/MORFOLOGIK_RULE_EN_US?lang=en-US"
                },
                "source": "LTeX",
                "message": "'asdf': Possible spelling mistake found."
            },
            {
                "range": {
                    "start": {
                        "line": 10,
                        "character": 0
                    },
                    "end": {
                        "line": 10,
                        "character": 4
                    }
                },
                "severity": 3,
                "code": "MORFOLOGIK_RULE_EN_US",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/MORFOLOGIK_RULE_EN_US?lang=en-US"
                },
                "source": "LTeX",
                "message": "'asdf': Possible spelling mistake found."
            }
        ],
        "command": {
            "title": "Hide all false positives in the selected sentences",
            "command": "_ltex.hideFalsePositives",
            "arguments": [
                {
                    "uri": "file:///Users/user/Documents/phd-documents/test/test.tex",
                    "falsePositives": {
                        "en-US": [
                            "{\"rule\":\"UPPERCASE_SENTENCE_START\",\"sentence\":\"^\\\\Qasdf \\\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\\\Qa asdf \\\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\\\Q asdf \\\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\\\Qa \\\\E(?:Dummy|Ina|Jimmy-)[0-9]+$\"}",
                            "{\"rule\":\"MORFOLOGIK_RULE_EN_US\",\"sentence\":\"^\\\\Qasdf \\\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\\\Qa asdf \\\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\\\Q asdf \\\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\\\Qa \\\\E(?:Dummy|Ina|Jimmy-)[0-9]+$\"}"
                        ]
                    }
                }
            ]
        }
    },
    {
        "title": "Disable all rules with matches in selection",
        "kind": "quickfix.ltex.disableRules",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 4,
                        "character": 0
                    },
                    "end": {
                        "line": 4,
                        "character": 4
                    }
                },
                "severity": 3,
                "code": "UPPERCASE_SENTENCE_START",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/UPPERCASE_SENTENCE_START?lang=en-US"
                },
                "source": "LTeX",
                "message": "This sentence does not start with an uppercase letter."
            },
            {
                "range": {
                    "start": {
                        "line": 6,
                        "character": 0
                    },
                    "end": {
                        "line": 6,
                        "character": 4
                    }
                },
                "severity": 3,
                "code": "MORFOLOGIK_RULE_EN_US",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/MORFOLOGIK_RULE_EN_US?lang=en-US"
                },
                "source": "LTeX",
                "message": "'asdf': Possible spelling mistake found."
            },
            {
                "range": {
                    "start": {
                        "line": 10,
                        "character": 0
                    },
                    "end": {
                        "line": 10,
                        "character": 4
                    }
                },
                "severity": 3,
                "code": "MORFOLOGIK_RULE_EN_US",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/MORFOLOGIK_RULE_EN_US?lang=en-US"
                },
                "source": "LTeX",
                "message": "'asdf': Possible spelling mistake found."
            }
        ],
        "command": {
            "title": "Disable all rules with matches in selection",
            "command": "_ltex.disableRules",
            "arguments": [
                {
                    "uri": "file:///Users/user/Documents/phd-documents/test/test.tex",
                    "ruleIds": {
                        "en-US": [
                            "UPPERCASE_SENTENCE_START",
                            "MORFOLOGIK_RULE_EN_US"
                        ]
                    }
                }
            ]
        }
    }
]


[Trace - 10:07:36] Sending request 'textDocument/codeAction - (50)'.
Params: {
    "textDocument": {
        "uri": "file:///Users/user/Documents/phd-documents/test/test.tex"
    },
    "range": {
        "start": {
            "line": 11,
            "character": 2
        },
        "end": {
            "line": 11,
            "character": 2
        }
    },
    "context": {
        "diagnostics": []
    }
}


[Trace - 10:07:36] Received response 'textDocument/codeAction - (50)' in 2ms.
Result: []


[Trace - 10:07:40] Sending request 'textDocument/codeAction - (51)'.
Params: {
    "textDocument": {
        "uri": "file:///Users/user/Documents/phd-documents/test/test.tex"
    },
    "range": {
        "start": {
            "line": 6,
            "character": 4
        },
        "end": {
            "line": 6,
            "character": 4
        }
    },
    "context": {
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 6,
                        "character": 0
                    },
                    "end": {
                        "line": 6,
                        "character": 4
                    }
                },
                "message": "'asdf': Possible spelling mistake found.",
                "code": "MORFOLOGIK_RULE_EN_US",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/MORFOLOGIK_RULE_EN_US?lang%3Den-US"
                },
                "severity": 3,
                "source": "LTeX"
            }
        ]
    }
}


[Trace - 10:07:40] Received response 'textDocument/codeAction - (51)' in 4ms.
Result: [
    {
        "title": "Use 'ASD'",
        "kind": "quickfix.ltex.acceptSuggestions",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 6,
                        "character": 0
                    },
                    "end": {
                        "line": 6,
                        "character": 4
                    }
                },
                "severity": 3,
                "code": "MORFOLOGIK_RULE_EN_US",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/MORFOLOGIK_RULE_EN_US?lang=en-US"
                },
                "source": "LTeX",
                "message": "'asdf': Possible spelling mistake found."
            }
        ],
        "edit": {
            "documentChanges": [
                {
                    "textDocument": {
                        "version": 36,
                        "uri": "file:///Users/user/Documents/phd-documents/test/test.tex"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 6,
                                    "character": 0
                                },
                                "end": {
                                    "line": 6,
                                    "character": 4
                                }
                            },
                            "newText": "ASD"
                        }
                    ]
                }
            ]
        }
    },
    {
        "title": "Use 'ADF'",
        "kind": "quickfix.ltex.acceptSuggestions",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 6,
                        "character": 0
                    },
                    "end": {
                        "line": 6,
                        "character": 4
                    }
                },
                "severity": 3,
                "code": "MORFOLOGIK_RULE_EN_US",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/MORFOLOGIK_RULE_EN_US?lang=en-US"
                },
                "source": "LTeX",
                "message": "'asdf': Possible spelling mistake found."
            }
        ],
        "edit": {
            "documentChanges": [
                {
                    "textDocument": {
                        "version": 36,
                        "uri": "file:///Users/user/Documents/phd-documents/test/test.tex"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 6,
                                    "character": 0
                                },
                                "end": {
                                    "line": 6,
                                    "character": 4
                                }
                            },
                            "newText": "ADF"
                        }
                    ]
                }
            ]
        }
    },
    {
        "title": "Use 'ASF'",
        "kind": "quickfix.ltex.acceptSuggestions",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 6,
                        "character": 0
                    },
                    "end": {
                        "line": 6,
                        "character": 4
                    }
                },
                "severity": 3,
                "code": "MORFOLOGIK_RULE_EN_US",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/MORFOLOGIK_RULE_EN_US?lang=en-US"
                },
                "source": "LTeX",
                "message": "'asdf': Possible spelling mistake found."
            }
        ],
        "edit": {
            "documentChanges": [
                {
                    "textDocument": {
                        "version": 36,
                        "uri": "file:///Users/user/Documents/phd-documents/test/test.tex"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 6,
                                    "character": 0
                                },
                                "end": {
                                    "line": 6,
                                    "character": 4
                                }
                            },
                            "newText": "ASF"
                        }
                    ]
                }
            ]
        }
    },
    {
        "title": "Use 'JASDF'",
        "kind": "quickfix.ltex.acceptSuggestions",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 6,
                        "character": 0
                    },
                    "end": {
                        "line": 6,
                        "character": 4
                    }
                },
                "severity": 3,
                "code": "MORFOLOGIK_RULE_EN_US",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/MORFOLOGIK_RULE_EN_US?lang=en-US"
                },
                "source": "LTeX",
                "message": "'asdf': Possible spelling mistake found."
            }
        ],
        "edit": {
            "documentChanges": [
                {
                    "textDocument": {
                        "version": 36,
                        "uri": "file:///Users/user/Documents/phd-documents/test/test.tex"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 6,
                                    "character": 0
                                },
                                "end": {
                                    "line": 6,
                                    "character": 4
                                }
                            },
                            "newText": "JASDF"
                        }
                    ]
                }
            ]
        }
    },
    {
        "title": "Use 'SDF'",
        "kind": "quickfix.ltex.acceptSuggestions",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 6,
                        "character": 0
                    },
                    "end": {
                        "line": 6,
                        "character": 4
                    }
                },
                "severity": 3,
                "code": "MORFOLOGIK_RULE_EN_US",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/MORFOLOGIK_RULE_EN_US?lang=en-US"
                },
                "source": "LTeX",
                "message": "'asdf': Possible spelling mistake found."
            }
        ],
        "edit": {
            "documentChanges": [
                {
                    "textDocument": {
                        "version": 36,
                        "uri": "file:///Users/user/Documents/phd-documents/test/test.tex"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 6,
                                    "character": 0
                                },
                                "end": {
                                    "line": 6,
                                    "character": 4
                                }
                            },
                            "newText": "SDF"
                        }
                    ]
                }
            ]
        }
    },
    {
        "title": "Add 'asdf' to dictionary",
        "kind": "quickfix.ltex.addToDictionary",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 6,
                        "character": 0
                    },
                    "end": {
                        "line": 6,
                        "character": 4
                    }
                },
                "severity": 3,
                "code": "MORFOLOGIK_RULE_EN_US",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/MORFOLOGIK_RULE_EN_US?lang=en-US"
                },
                "source": "LTeX",
                "message": "'asdf': Possible spelling mistake found."
            }
        ],
        "command": {
            "title": "Add 'asdf' to dictionary",
            "command": "_ltex.addToDictionary",
            "arguments": [
                {
                    "uri": "file:///Users/user/Documents/phd-documents/test/test.tex",
                    "words": {
                        "en-US": [
                            "asdf"
                        ]
                    }
                }
            ]
        }
    },
    {
        "title": "Hide false positive",
        "kind": "quickfix.ltex.hideFalsePositives",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 6,
                        "character": 0
                    },
                    "end": {
                        "line": 6,
                        "character": 4
                    }
                },
                "severity": 3,
                "code": "MORFOLOGIK_RULE_EN_US",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/MORFOLOGIK_RULE_EN_US?lang=en-US"
                },
                "source": "LTeX",
                "message": "'asdf': Possible spelling mistake found."
            }
        ],
        "command": {
            "title": "Hide false positive",
            "command": "_ltex.hideFalsePositives",
            "arguments": [
                {
                    "uri": "file:///Users/user/Documents/phd-documents/test/test.tex",
                    "falsePositives": {
                        "en-US": [
                            "{\"rule\":\"MORFOLOGIK_RULE_EN_US\",\"sentence\":\"^\\\\Qasdf \\\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\\\Qa asdf \\\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\\\Q asdf \\\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\\\Qa \\\\E(?:Dummy|Ina|Jimmy-)[0-9]+$\"}"
                        ]
                    }
                }
            ]
        }
    },
    {
        "title": "Disable rule",
        "kind": "quickfix.ltex.disableRules",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 6,
                        "character": 0
                    },
                    "end": {
                        "line": 6,
                        "character": 4
                    }
                },
                "severity": 3,
                "code": "MORFOLOGIK_RULE_EN_US",
                "codeDescription": {
                    "href": "https://community.languagetool.org/rule/show/MORFOLOGIK_RULE_EN_US?lang=en-US"
                },
                "source": "LTeX",
                "message": "'asdf': Possible spelling mistake found."
            }
        ],
        "command": {
            "title": "Disable rule",
            "command": "_ltex.disableRules",
            "arguments": [
                {
                    "uri": "file:///Users/user/Documents/phd-documents/test/test.tex",
                    "ruleIds": {
                        "en-US": [
                            "MORFOLOGIK_RULE_EN_US"
                        ]
                    }
                }
            ]
        }
    }
]


2024-03-04T09:07:43.879Z Info: Creating bug report...
[Trace - 10:07:43] Sending request 'workspace/executeCommand - (52)'.
Params: {
    "command": "_ltex.getServerStatus",
    "arguments": []
}



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

  • Operating system: Darwin (darwin), arm64, 23.2.0
  • VS Code: 1.86.2
  • vscode-ltex: x.xx
  • ltex-ls: 15.2.0
  • Java: 21.0.2

Additional context/information
None

Support Typst

Is your feature request related to a problem? Please describe.
I use the new typesetting language Typst to create my documents, and I want LTeX's functionality while writing them.

Describe the solution you'd like
LTeX works with typst file just as it does with markdown

Describe alternatives you've considered
https://github.com/antonWetzel/typst-languagetool is OK-ish, but it's really bare-bones and hacky.

German spelling errors are not recognized/displayed

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.

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.

  • Operating system: Linux (linux), x64, 5.4.0-159-generic
  • VS Code: 1.86.1
  • vscode-ltex: 13.1.1.
  • ltex-ls: 15.2.0
  • Java: 11.0.12

Option to ignore rule for ALLCAP words?

Is your feature request related to a problem? Please describe.

I work with many domain specific capitalized abbreviations. It would be too laborious to add them to a custom dictionary.
These get flagged as MORFOLOGIK_RULE_EN_US. However, disabling this rule completely would be a bad idea because it is also used to match elementary typos.

Describe the solution you'd like

Ideally, I'd want to selectively ignore this rule for all words that match the regex [A-Z0-9]+('?s)?, or at least just for [A-Z0-9]+.

Describe alternatives you've considered

Alternatively, one could ignore all errors for allcaps words, it seems that languagetool does have such an option, but it's not clear how to activate it in ltex. fsa.dict.speller.ignore-all-uppercase:

When Using Custom HTTP URI, still use Local First For Faster Results

Note: 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.

Is your feature request related to a problem? Please describe.

When using a custom HTTP URI (I use it because I have purchased LT Premium), the request and analysis takes a while.

Describe the solution you'd like

It'd be nice to show the result of the local server in the meantime to fix the errors that "non-custom" (in my case, "non-premium") can show alread.

Describe alternatives you've considered

I am not sure whether alternatives exist.

Additional context

N/A

Add a simple way to change language

Is your feature request related to a problem? Please describe.
I'm constantly writing documents in several languages, sometimes even in the same repo. Constantly having to go to the settings to change the language of LTEX is lengthy and cumbersome.

Describe the solution you'd like
Having a fast, simple solution to change the language of LTEX, either using the command palette or by clicking on the status bar item (when enabled) to change language.

Describe alternatives you've considered
N/A

Additional context
N/A

Extreme CPU Usage

Describe the bug
This is the same bug that has been plaguing the original repo (valentjn#134 and valentjn#880). The java task spawned by the server goes to 700% CPU Usage, one of the rare times when my M1 MacBook's fans ever turn on.

Steps to reproduce
Steps to reproduce the behavior:

Very hard to reproduce, seems to happen randomly, but for me especially when there are multiple documents open and multiple edits in succession. My suspicion is that there's an infinite loop triggered somewhere.

Expected behavior
CPU Usage should remain low.

Sample document
The bug does not happen with specific documents. Samples can be provided via email upon request.

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": [
    "context",
    "context.tex",
    "html",
    "latex",
    "markdown",
    "org",
    "restructuredtext",
    "rsweave"
  ],
  "language": "en-US",
  "dictionary": {},
  "disabledRules": {},
  "enabledRules": {},
  "hiddenFalsePositives": {},
  "bibtex": {
    "fields": {
      "abstract": false
    }
  },
  "latex": {
    "commands": {
      "\\subfile{}": "ignore",
      "\\subfileinclude{}": "ignore",
      "\\textcquote[]{}": "ignore",
      "\\textcite*{}": "dummy",
      "\\blockcquote[]{}": "ignore",
      "\\Glsfmtshort{}": "dummy",
      "\\namecref": "dummy",
      "\\R": "dummy",
      "\\C": "dummy"
    },
    "environments": {}
  },
  "markdown": {
    "nodes": {}
  },
  "configurationTarget": {
    "dictionary": "workspaceFolderExternalFile",
    "disabledRules": "workspaceFolderExternalFile",
    "hiddenFalsePositives": "workspaceFolderExternalFile"
  },
  "additionalRules": {
    "enablePickyRules": false,
    "motherTongue": "fr",
    "languageModel": "",
    "neuralNetworkModel": "",
    "word2VecModel": ""
  },
  "languageToolHttpServerUri": "",
  "languageToolOrg": {
    "username": "redacted",
    "apiKey": "redacted"
  },
  "ltex-ls": {
    "path": "",
    "logLevel": "finest",
    "languageToolHttpServerUri": "",
    "languageToolOrgUsername": "",
    "languageToolOrgApiKey": ""
  },
  "java": {
    "path": "",
    "initialHeapSize": 64,
    "maximumHeapSize": 512
  },
  "sentenceCacheSize": 2000,
  "completionEnabled": false,
  "diagnosticSeverity": "information",
  "checkFrequency": "edit",
  "clearDiagnosticsWhenClosingFile": true,
  "statusBarItem": true,
  "trace": {
    "server": "verbose"
  }
}

"LTeX Language Server" log file

"LTeX Language Client" log file
Both log files are ready, with trace enabled. Where can I send them so that they are handled privately?

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

  • Operating system: Darwin (darwin), arm64, 23.5.0
  • VS Code: 1.89.1
  • vscode-ltex: x.xx
  • ltex-ls: 15.2.0
  • Java: 11.0.12

Additional context/information
You can add any other context or information about the problem here.

Ltex does not start!

Describe the bug
The extension does not start. It always shows Starting LTeX... in the status bar of VS Code.

Steps to reproduce
Just install the extension, set the ltex-ls and java paths and see that it does not work

Expected behavior
I would expect the extension to start.

Sample document
There is no file required for the bug to occur, but the extension only loads if it sees a latex file.

\documentclass[12pt]{article}

\begin{document}
Test
\end{document}

LTeX configuration

{
  "ltex.additionalRules.enablePickyRules": true,
  "ltex.additionalRules.motherTongue": "de-AT",
  "ltex.completionEnabled": true,
  "ltex.configurationTarget": {
    "dictionary": "workspaceFolder",
    "disabledRules": "workspaceFolder",
    "hiddenFalsePositives": "workspaceFolder"
  },
  "ltex.disabledRules": {
    "de-AT": [
      "WHITESPACE_RULE"
    ]
  },
  "ltex.java.path": "/nix/store/0sdci48ka81y5y6ska71xgn70k1h3gki-temurin-bin-20.0.2",
  "ltex.language": "de-AT",
  "ltex.ltex-ls.logLevel": "finest",
  "ltex.ltex-ls.path": "/nix/store/cwk309izc25mqrb76wxn3ybwksk6pj0l-ltex-ls-16.0.0",
  "ltex.trace.server": "verbose",
}
{
  "enabled": [
    "bibtex",
    "context",
    "context.tex",
    "html",
    "latex",
    "markdown",
    "org",
    "restructuredtext",
    "rsweave"
  ],
  "language": "de-AT",
  "dictionary": {},
  "disabledRules": {
    "de-AT": [
      "WHITESPACE_RULE"
    ]
  },
  "enabledRules": {},
  "hiddenFalsePositives": {},
  "bibtex": {
    "fields": {}
  },
  "latex": {
    "commands": {},
    "environments": {}
  },
  "markdown": {
    "nodes": {}
  },
  "configurationTarget": {
    "dictionary": "workspaceFolder",
    "disabledRules": "workspaceFolder",
    "hiddenFalsePositives": "workspaceFolder"
  },
  "additionalRules": {
    "enablePickyRules": true,
    "motherTongue": "de-AT",
    "languageModel": "",
    "neuralNetworkModel": "",
    "word2VecModel": ""
  },
  "languageToolHttpServerUri": "",
  "languageToolOrg": {
    "username": "",
    "apiKey": ""
  },
  "ltex-ls": {
    "path": "/nix/store/cwk309izc25mqrb76wxn3ybwksk6pj0l-ltex-ls-16.0.0",
    "logLevel": "finest",
    "languageToolHttpServerUri": "",
    "languageToolOrgUsername": "",
    "languageToolOrgApiKey": ""
  },
  "java": {
    "path": "/nix/store/0sdci48ka81y5y6ska71xgn70k1h3gki-temurin-bin-20.0.2",
    "initialHeapSize": 64,
    "maximumHeapSize": 512
  },
  "sentenceCacheSize": 2000,
  "completionEnabled": true,
  "diagnosticSeverity": "information",
  "checkFrequency": "edit",
  "clearDiagnosticsWhenClosingFile": true,
  "statusBarItem": false,
  "trace": {
    "server": "verbose"
  }
}

"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  - 10:53:45 AM] Starting ltex-ls...
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Apr 14, 2024 10:53:49 AM org.bsplines.ltexls.server.LtexLanguageServer initialize
INFO: ltex-ls 16.0.0 - initializing...
Apr 14, 2024 10:53:49 AM org.bsplines.ltexls.tools.I18n setLocale
INFO: Setting locale to 'en'

"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-04-14T08:53:45.326Z Info: Setting LTeX UI language to 'en'.
2024-04-14T08:53:45.326Z Info: Loading i18n messages...
2024-04-14T08:53:45.326Z Info: Loading default i18n messages...
2024-04-14T08:53:45.328Z Info: 
2024-04-14T08:53:45.328Z Info: ltex.ltex-ls.path set to '/nix/store/cwk309izc25mqrb76wxn3ybwksk6pj0l-ltex-ls-16.0.0'.
2024-04-14T08:53:45.328Z Info: 
2024-04-14T08:53:45.328Z Info: Using ltex-ls from '/nix/store/cwk309izc25mqrb76wxn3ybwksk6pj0l-ltex-ls-16.0.0'.
2024-04-14T08:53:45.328Z Info: Using Java from '/nix/store/0sdci48ka81y5y6ska71xgn70k1h3gki-temurin-bin-20.0.2' (set in ltex.java.path).
2024-04-14T08:53:45.329Z Info: Testing ltex-ls...
2024-04-14T08:53:45.329Z Info:   Command: "/nix/store/cwk309izc25mqrb76wxn3ybwksk6pj0l-ltex-ls-16.0.0/bin/ltex-ls"
2024-04-14T08:53:45.329Z Info:   Arguments: ["--version"]
2024-04-14T08:53:45.329Z Info:   env['JAVA_HOME']: "/nix/store/0sdci48ka81y5y6ska71xgn70k1h3gki-temurin-bin-20.0.2"
2024-04-14T08:53:45.329Z Info:   env['JAVA_OPTS']: "-Xms64m -Xmx512m"
2024-04-14T08:53:45.542Z Info: Test successful!
2024-04-14T08:53:45.542Z Info: 
2024-04-14T08:53:45.546Z Info: Starting ltex-ls...
2024-04-14T08:53:45.546Z Info:   Command: "/nix/store/cwk309izc25mqrb76wxn3ybwksk6pj0l-ltex-ls-16.0.0/bin/ltex-ls"
2024-04-14T08:53:45.546Z Info:   Arguments: []
2024-04-14T08:53:45.546Z Info:   env['JAVA_HOME']: "/nix/store/0sdci48ka81y5y6ska71xgn70k1h3gki-temurin-bin-20.0.2"
2024-04-14T08:53:45.546Z Info:   env['JAVA_OPTS']: "-Xms64m -Xmx512m"
2024-04-14T08:53:45.546Z Info: 
[Trace - 10:53:45 AM] Sending request 'initialize - (0)'.
Params: {
    "processId": 1133718,
    "clientInfo": {
        "name": "Visual Studio Code",
        "version": "1.88.0"
    },
    "locale": "en",
    "rootPath": "/home/florian/syncthing/FHWN/AERO/2_Semester_SS24/JTP_Solar_Cells/report",
    "rootUri": "file:///home/florian/syncthing/FHWN/AERO/2_Semester_SS24/JTP_Solar_Cells/report",
    "capabilities": {
        "workspace": {
            "applyEdit": true,
            "workspaceEdit": {
                "documentChanges": true,
                "resourceOperations": [
                    "create",
                    "rename",
                    "delete"
                ],
                "failureHandling": "textOnlyTransactional",
                "normalizesLineEndings": true,
                "changeAnnotationSupport": {
                    "groupsOnLabel": true
                }
            },
            "didChangeConfiguration": {
                "dynamicRegistration": true
            },
            "didChangeWatchedFiles": {
                "dynamicRegistration": true
            },
            "symbol": {
                "dynamicRegistration": true,
                "symbolKind": {
                    "valueSet": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        14,
                        15,
                        16,
                        17,
                        18,
                        19,
                        20,
                        21,
                        22,
                        23,
                        24,
                        25,
                        26
                    ]
                },
                "tagSupport": {
                    "valueSet": [
                        1
                    ]
                }
            },
            "codeLens": {
                "refreshSupport": true
            },
            "executeCommand": {
                "dynamicRegistration": true
            },
            "configuration": true,
            "workspaceFolders": true,
            "semanticTokens": {
                "refreshSupport": true
            },
            "fileOperations": {
                "dynamicRegistration": true,
                "didCreate": true,
                "didRename": true,
                "didDelete": true,
                "willCreate": true,
                "willRename": true,
                "willDelete": true
            }
        },
        "textDocument": {
            "publishDiagnostics": {
                "relatedInformation": true,
                "versionSupport": false,
                "tagSupport": {
                    "valueSet": [
                        1,
                        2
                    ]
                },
                "codeDescriptionSupport": true,
                "dataSupport": true
            },
            "synchronization": {
                "dynamicRegistration": true,
                "willSave": true,
                "willSaveWaitUntil": true,
                "didSave": true
            },
            "completion": {
                "dynamicRegistration": true,
                "contextSupport": true,
                "completionItem": {
                    "snippetSupport": true,
                    "commitCharactersSupport": true,
                    "documentationFormat": [
                        "markdown",
                        "plaintext"
                    ],
                    "deprecatedSupport": true,
                    "preselectSupport": true,
                    "tagSupport": {
                        "valueSet": [
                            1
                        ]
                    },
                    "insertReplaceSupport": true,
                    "resolveSupport": {
                        "properties": [
                            "documentation",
                            "detail",
                            "additionalTextEdits"
                        ]
                    },
                    "insertTextModeSupport": {
                        "valueSet": [
                            1,
                            2
                        ]
                    }
                },
                "completionItemKind": {
                    "valueSet": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        14,
                        15,
                        16,
                        17,
                        18,
                        19,
                        20,
                        21,
                        22,
                        23,
                        24,
                        25
                    ]
                }
            },
            "hover": {
                "dynamicRegistration": true,
                "contentFormat": [
                    "markdown",
                    "plaintext"
                ]
            },
            "signatureHelp": {
                "dynamicRegistration": true,
                "signatureInformation": {
                    "documentationFormat": [
                        "markdown",
                        "plaintext"
                    ],
                    "parameterInformation": {
                        "labelOffsetSupport": true
                    },
                    "activeParameterSupport": true
                },
                "contextSupport": true
            },
            "definition": {
                "dynamicRegistration": true,
                "linkSupport": true
            },
            "references": {
                "dynamicRegistration": true
            },
            "documentHighlight": {
                "dynamicRegistration": true
            },
            "documentSymbol": {
                "dynamicRegistration": true,
                "symbolKind": {
                    "valueSet": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        14,
                        15,
                        16,
                        17,
                        18,
                        19,
                        20,
                        21,
                        22,
                        23,
                        24,
                        25,
                        26
                    ]
                },
                "hierarchicalDocumentSymbolSupport": true,
                "tagSupport": {
                    "valueSet": [
                        1
                    ]
                },
                "labelSupport": true
            },
            "codeAction": {
                "dynamicRegistration": true,
                "isPreferredSupport": true,
                "disabledSupport": true,
                "dataSupport": true,
                "resolveSupport": {
                    "properties": [
                        "edit"
                    ]
                },
                "codeActionLiteralSupport": {
                    "codeActionKind": {
                        "valueSet": [
                            "",
                            "quickfix",
                            "refactor",
                            "refactor.extract",
                            "refactor.inline",
                            "refactor.rewrite",
                            "source",
                            "source.organizeImports"
                        ]
                    }
                },
                "honorsChangeAnnotations": false
            },
            "codeLens": {
                "dynamicRegistration": true
            },
            "formatting": {
                "dynamicRegistration": true
            },
            "rangeFormatting": {
                "dynamicRegistration": true
            },
            "onTypeFormatting": {
                "dynamicRegistration": true
            },
            "rename": {
                "dynamicRegistration": true,
                "prepareSupport": true,
                "prepareSupportDefaultBehavior": 1,
                "honorsChangeAnnotations": true
            },
            "documentLink": {
                "dynamicRegistration": true,
                "tooltipSupport": true
            },
            "typeDefinition": {
                "dynamicRegistration": true,
                "linkSupport": true
            },
            "implementation": {
                "dynamicRegistration": true,
                "linkSupport": true
            },
            "colorProvider": {
                "dynamicRegistration": true
            },
            "foldingRange": {
                "dynamicRegistration": true,
                "rangeLimit": 5000,
                "lineFoldingOnly": true
            },
            "declaration": {
                "dynamicRegistration": true,
                "linkSupport": true
            },
            "selectionRange": {
                "dynamicRegistration": true
            },
            "callHierarchy": {
                "dynamicRegistration": true
            },
            "semanticTokens": {
                "dynamicRegistration": true,
                "tokenTypes": [
                    "namespace",
                    "type",
                    "class",
                    "enum",
                    "interface",
                    "struct",
                    "typeParameter",
                    "parameter",
                    "variable",
                    "property",
                    "enumMember",
                    "event",
                    "function",
                    "method",
                    "macro",
                    "keyword",
                    "modifier",
                    "comment",
                    "string",
                    "number",
                    "regexp",
                    "operator"
                ],
                "tokenModifiers": [
                    "declaration",
                    "definition",
                    "readonly",
                    "static",
                    "deprecated",
                    "abstract",
                    "async",
                    "modification",
                    "documentation",
                    "defaultLibrary"
                ],
                "formats": [
                    "relative"
                ],
                "requests": {
                    "range": true,
                    "full": {
                        "delta": true
                    }
                },
                "multilineTokenSupport": false,
                "overlappingTokenSupport": false
            },
            "linkedEditingRange": {
                "dynamicRegistration": true
            }
        },
        "window": {
            "showMessage": {
                "messageActionItem": {
                    "additionalPropertiesSupport": true
                }
            },
            "showDocument": {
                "support": true
            },
            "workDoneProgress": true
        },
        "general": {
            "regularExpressions": {
                "engine": "ECMAScript",
                "version": "ES2020"
            },
            "markdown": {
                "parser": "marked",
                "version": "1.1.0"
            }
        }
    },
    "initializationOptions": {
        "locale": "en",
        "customCapabilities": {
            "workspaceSpecificConfiguration": true
        }
    },
    "trace": "verbose",
    "workspaceFolders": [
        {
            "uri": "file:///home/florian/syncthing/FHWN/AERO/2_Semester_SS24/JTP_Solar_Cells/report",
            "name": "report"
        }
    ]
}


2024-04-14T08:53:52.496Z Info: Creating bug report...
2024-04-14T08:53:52.496Z Info: LTeX Status
2024-04-14T08:53:52.496Z Info: ----------------------------------------
2024-04-14T08:53:52.496Z Info: Info about vscode-ltex:
2024-04-14T08:53:52.496Z Info: - Path to extension directory: /home/florian/.vscode/extensions/neo-ltex.ltex-13.1.1
2024-04-14T08:53:52.496Z Info: - Path to directory with LTeX user settings (global storage directory): /home/florian/.config/Code/User/globalStorage/neo-ltex.ltex
2024-04-14T08:53:52.496Z Info: - Path to directory with LTeX workspace settings (for the currently opened workspace): /home/florian/syncthing/FHWN/AERO/2_Semester_SS24/JTP_Solar_Cells/report/.vscode
2024-04-14T08:53:52.496Z Info: - Path to directory with LTeX workspace folder settings (for the workspace folder of the currently active text editor): /home/florian/syncthing/FHWN/AERO/2_Semester_SS24/JTP_Solar_Cells/report/.vscode
2024-04-14T08:53:52.496Z Info: - Version: 13.1.1
2024-04-14T08:53:52.496Z Info: Info about ltex-ls:
2024-04-14T08:53:52.496Z Info: - Version: 16.0.0
2024-04-14T08:53:52.496Z Info: - Process ID: n/a
2024-04-14T08:53:52.496Z Info: - Wall clock duration: n/a
2024-04-14T08:53:52.496Z Info: - CPU duration: n/a
2024-04-14T08:53:52.496Z Info: - CPU usage: n/a
2024-04-14T08:53:52.496Z Info: - Total allocated memory: n/a
2024-04-14T08:53:52.496Z Info: - Used memory: n/a
2024-04-14T08:53:52.496Z Info: - Is busy checking: n/a
2024-04-14T08:53:52.496Z Info: - Document URI being checked: n/a
2024-04-14T08:53:52.496Z Info: Currently watched external setting files: n/a
2024-04-14T08:53:52.496Z Info: ----------------------------------------

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

  • Operating system: Linux (linux), x64, 6.1.84 (NixOS 23.11)
  • VS Code: 1.88.0
  • vscode-ltex: x.xx (neo-ltex v13.1.1)
  • ltex-ls: 16.0.0
  • Java: 19.0.2

Actual Java version I have installed:

openjdk 20.0.2 2023-07-18
OpenJDK Runtime Environment Temurin-20.0.2+9 (build 20.0.2+9)
OpenJDK 64-Bit Server VM Temurin-20.0.2+9 (build 20.0.2+9, mixed mode, sharing)

Additional context/information
I had to install ltex-ls manually from nixpkgs, as it does not get installed automatically by the extension.
Furthermore, I don't understand why it says it is using Java 19, when I set the java path to a Java 20 version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.