LTeX Language Server: LSP language server for LanguageTool :mag::heavy_check_mark: with support for LaTeX :mortar_board:, Markdown :pencil:, and others
The language server crashes when using the French language, with LanguageTool premium service when typing the following pattern ?} or !}
Steps to reproduce
Check any latex text with "?}" or "!}"
Expected behavior
Should pass without any crash. (working when set to English-US)
Sample document
```
\documentclass{article}
\begin{document}
Je fais des fotes !
\section{huh ?}
\end{document}
```
LTeX configuration
The base config with credentials for LanguageTool premium and set in French
LTeX LS log
```
GRAVE: LanguageTool failed. The following exception occurred:
java.lang.NullPointerException
at org.bsplines.ltexls.languagetool.LanguageToolRuleMatch$Companion.fromLanguageTool(LanguageToolRuleMatch.kt:71)
at org.bsplines.ltexls.languagetool.LanguageToolHttpInterface.checkInternal(LanguageToolHttpInterface.kt:96)
at org.bsplines.ltexls.languagetool.LanguageToolInterface.check(LanguageToolInterface.kt:22)
at org.bsplines.ltexls.server.DocumentChecker.checkAnnotatedTextFragment(DocumentChecker.kt:138)
at org.bsplines.ltexls.server.DocumentChecker.checkAnnotatedTextFragments(DocumentChecker.kt:91)
at org.bsplines.ltexls.server.DocumentChecker.check(DocumentChecker.kt:279)
at org.bsplines.ltexls.server.LtexTextDocumentItem.check(LtexTextDocumentItem.kt:413)
at org.bsplines.ltexls.server.LtexTextDocumentItem.checkAndGetDiagnostics(LtexTextDocumentItem.kt:295)
at org.bsplines.ltexls.server.LtexTextDocumentItem.checkAndPublishDiagnostics(LtexTextDocumentItem.kt:272)
at org.bsplines.ltexls.server.LtexTextDocumentItem.checkAndPublishDiagnosticsWithoutCache(LtexTextDocumentItem.kt:267)
at org.bsplines.ltexls.server.LtexTextDocumentItem.checkAndPublishDiagnosticsWithoutCache$default(LtexTextDocumentItem.kt:266)
at org.bsplines.ltexls.server.LtexTextDocumentService.didSave$lambda-2(LtexTextDocumentService.kt:197)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
```
Version information
List here the version information of the relevant software.
Operating system: Arch Linux
ltex-ls: 16.0.0
Java: 21
Extra info
It can be mitigated by adding a space between ?/! and }
Describe the bug
The language server crashes when using the French language, with LanguageTool premium service when typing the following pattern
?}
or!}
Steps to reproduce
Check any latex text with "?}" or "!}"
Expected behavior Should pass without any crash. (working when set to English-US)
Sample document
LTeX configuration
LTeX LS log
Version information List here the version information of the relevant software.
Extra info
It can be mitigated by adding a space between
?/!
and}