ltex-plus / lsp-cli-plus

CLI language client for LSP language servers
Mozilla Public License 2.0
2 stars 0 forks source link

no diagnostics for german #20

Open arantxax opened 17 hours ago

arantxax commented 17 hours ago

Describe the bug I just downloaded ltex+ as ltex-ls to use as command-line/offline/stand-alone grammar checker. The first run should take long enough, but it seems that the server initialization is taking too long or has too many threads working on. For english text works fine.

Steps to reproduce

  1. Download ZIP file: ltex-ls-plus-18.2.0-windows-x64
  2. Extract it in your desktop.
  3. Create a "test" directory in your desktop.
  4. Create a simple test.tex file in the "test" directory.
  5. Copy the folder "ltex+" in the as subfolder in "test".
  6. Go to "test\ltex+\ltex-ls-plus-18.2.0\bin"
  7. Right click on the directory and select "open in Terminal"
  8. ./ltex-cli-plus.bat ../../../test.tex --client-configuration=".lsp-cli.json" --verbose

Expected behavior

I want the server to be initialized and correct the grammatical errors in the tex document.

**Sample document**
This is the specific document in LaTeX:

\documentclass{article}
\usepackage[ngerman]{babel}
\begin{document}

\selectlanguage{ngerman}  % Explicitly set language to German
%Three banana.
Ein Satz auf Deutsch Sprache.

\end{document}

LTeX configuration Configuration settings from .lsp-cli.json:

{
  "programName": "ltex-cli-plus",
  "helpMessage": {
    "description": "LTeX CLI - Command-line interface for LTeX LS",
    "visibleArguments": [
      "--client-configuration",
      "--verbose"
    ]
  },
  "defaultValues": {
    "--hide-commands": true,
    "--server-command-line": "ltex-ls-plus.bat"
  }
}

Details LTeX LS log Paste the log (output) of LTeX LS here:

`Nov. 24, 2024 3:00:03 PM org.bsplines.lspcli.client.LspCliLanguageClient$Companion startLanguageServerProcess
INFORMATION: Starting language server with command line 'C:\Users\eckhardt-da-silva.a\Desktop\test\ltex+\ltex-ls-plus-18.2.0\bin\ltex-ls-plus.bat' in directory 'C:\Users\eckhardt-da-silva.a\Desktop\test\ltex+\ltex-ls-plus-18.2.0\bin'...
Nov. 24, 2024 3:00:04 PM org.bsplines.lspcli.client.LspCliLanguageClient initializeLanguageServer
INFORMATION: Initializing language server...
Nov. 24, 2024 3:00:11 PM org.bsplines.lspcli.client.Checker checkFile
INFORMATION: Checking '..\..\..\test.tex'...
Nov. 24, 2024 3:00:11 PM org.bsplines.lspcli.client.Checker checkFile
INFORMATION: Waiting for diagnostics for file '..\..\..\test.tex'...

`

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

Operating system: Windows 11 Business ltex-ls: 18.2.0 Java: jdk-21.0.4+7 (this one installed/embedded in the installation files) Additional context/information

arantxax commented 17 hours ago

UPDATE: By writing "Ein Satz auf Deutsch Spraches." with an extra S in the end, the diagnostic is released and, therefore, I am able to correct the grammar error. I'm not really satisfied, because the previous test "Ein Satz auf Deutsch Sprache." was wrong too. It should have corrected for: "Ein Satz auf deutsche Sprache." I know that the grammar rules are outside of this fork's scope, so I'll close the issue and work on a bigger test.