Code Monkey home page Code Monkey logo

ltex-ls's Introduction

Julian Valentin (@valentjn)

Hi! I'm the maintainer of LTEX (an extension for VS Code), the creator of bsplines.org and sparsegrids.org, and the former administrator and contributor of SG⁺⁺ (also, a member of the Church of B-Splines with the very prestigious title of Cardinal of B-Splines).

Some of my more interesting repositories:

Name Description
vscode-ltex LTEX, grammar/spell checker for VS Code with LanguageTool and LaTeX support (homepage)
ltex-ls LTEX Language Server, the language server behind LTEX
class-notes LATEX-ed class notes (German) taken during various mathematics and computer science classes
thesis-arxiv Source code of my PhD thesis (arXiv version): “B-Splines for Sparse Grids: Algorithms and Application to Higher-Dimensional Optimization”
uni-stuttgart-phdthesis-template Unofficial LuaLATEX template for PhD theses at the University of Stuttgart, Germany; used e.g. for my PhD thesis
uni-stuttgart-beamer-template Unofficial LATEX template for Beamer presentations at the University of Stuttgart, Germany
turnips Yet another turnip price simulator for Animal Crossing: New Horizons
santa-racer-rust Open-source clone of an old Christmas-themed advergame (without image/sound assets)

ltex-ls's People

Contributors

adamvoss avatar alexanderzeilmann avatar biozic avatar dependabot[bot] avatar ed359 avatar ldap avatar scaomath avatar sfo avatar sondalex avatar valentjn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ltex-ls's Issues

Code actions not working in neovim

Describe the bug
In neovim, code actions work when choosing one of the "correction" option, but not when choosing one of the following:

  • Add <word> to dictionary
  • Hide false positives
  • Disable rule

Steps to reproduce
Steps to reproduce the behavior:

  1. Create a markdown file with the following line CustomWord is not a word
  2. CustomWord is rightly marked as not a correct word
  3. Move the cursor on it
  4. Type: :lua vim.lsp.buf.code_action()
  5. Choose 5: Add 'CustomWord' to dictionary
  6. Nothing happens, the error is still here. And there is no error message either.

Expected behavior
I expect it to add the CustomWord to dictionary and remove errors linked to it in the rest of the document, without having to manually add the word in the configuration.

Sample document

CustomWord is not a word

LTeX configuration
I'm using it in neovim with lspconfig and nvim-lsp-installer with the default config, just calling it:

nvim_lsp.ltex.setup {
  on_attach = on_attach
  }

LTeX LS log
No error log unfortunately.

Version information

  • OS: Linux <hostname> 5.18.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 09 Jun 2022 16:14:10 +0000 x86_64 GNU/Linux
  • ltex-ls: 15.2.0
  • Java: 11.0.12

CLI parameters unresponsive

Describe the bug
CLI options don't seem to work except for --version, even -V doesn't seem to work

Steps to reproduce
Steps to reproduce the behavior:

1 - try to execute the supplied ltex-ls script with -V or any option doesn't change anything.

Expected behavior
work as described

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

  • Operating system: Linux, Manjaro
  • ltex-ls: 11.00
  • Java: openjdk 15.0.2 2021-01-19
    OpenJDK Runtime Environment (build 15.0.2+7)
    OpenJDK 64-Bit Server VM (build 15.0.2+7, mixed mode)

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

generic language code "es" gives spelling corrections

Describe the bug
According to https://valentjn.github.io/ltex/settings.html#ltexlanguage

"Use a specific variant like "en-US" or "de-DE" instead of the generic language code like "en" or "de" to obtain spelling corrections (in addition to grammar corrections)."

This does not seem to apply to Spanish: the generic "es" (there is also a specific variant "es-AR") gives spelling corrections.

Steps to reproduce
Steps to reproduce the behavior:

Create a configuration file with

  1. Call the CLI program on any file with, say, both English and Spanish words as
echo '{"ltex.language":"es"}' > config; ./ltex-cli --client-configuration=config /home/ramon/tmp/minimal.tex

You get output such as

/home/ramon/tmp/minimal.tex:10:1: info: 'Cucaracho': Se ha encontrado un posible error ortográfico. [MORFOLOGIK_RULE_ES]
Cucaracho
Use 'Cucaracha'
Use 'Cu caracho'
Use 'Cucara cho'
  1. Compare that with using ltex.language = "en":
echo '{"ltex.language":"en"}' > config; ./ltex-cli --client-configuration=config ~/tmp/minimal.tex

No spelling errors reported.

Expected behavior
Since both "es" and "es-AR" exist, ltex.language set to "es" should not do spelling checks.

I understand, though, that this might be debatable. There is an "es-AR" but no other specific "es" variants (say, "es-ES" for "es" for Spain or "es-MX" for Mexico, etc).

Sample document

\documentclass[10pt,letterpaper]{article}

\begin{document}

She go home. And now she goes spellingerrorhome

Hola
Holaaa
Cucaracha
Cucaracho

\end{document}

LTeX configuration

I am using no other configuration.

Version information

Additional context/information
Note: of course, this also happens if using ltex-ls from Emacs with https://github.com/emacs-languagetool/lsp-ltex and doing (setq lsp-ltex-language "es") (the Emacs LSP process shows spelling errors) vs setting the language to "en" (no spelling errors reported).

Cannot override LatexCommandSignature defaults from user config currently

Hi,

Short version
I would like to be able to override the default action for a LatexCommandSignature but currently, because default actions are listed first in the possible command list, is seems that the hard-coded action takes precedence over the user-defined one.

Detailed analysis with references to code locations

  1. Default actions for LatexCommandSignature are defined here (example line):

  2. This list of defaults is used to initiate the commandSignatures and commandSignatureMap in LatexAnnotatedTextBuilder here

    private List<LatexCommandSignature> commandSignatures =

  3. Then the user settings are parsed and user-provided commands are appended to the list of commands here

    for (String commandPrototype : settings.getDummyCommandPrototypes()) {
    and here
    for (String commandPrototype : settings.getIgnoreCommandPrototypes()) {

  4. Later, the list of possible possibleCommandSignatures is retrieved here:

    @Nullable List<LatexCommandSignature> possibleCommandSignatures =

  5. Then possibleCommandSignatures is iterated over to find the best match:

    for (LatexCommandSignature latexCommandSignature : possibleCommandSignatures) {

  6. If a more precise match is found, then it is retained as the best candidate. But if multiple "best matches" are in the possibleCommandSignatures list, then only the first one will be used. Due to the construction of the list, the first one is the default hard-coded value, while the user-defined one would have come after.

Proposed changes

There are 2 possible solutions to allow the user-defined one to "win":

What do you think? (personally, I believe the first solution (>=) is better)

PS: I don't have a Java development environment to test any of these deductions and possible solutions. I hope my code-reading was accurate, but I won't be able to open a pull request myself, sorry.

Make ltex.latex.commands more expressive

Is your feature request related to a problem? Please describe.
TeX has weird hyphenation rules that prevents it from breaking hyphenated compound words such as 'high-performance'. The hyphenat package is used to trick TeX into hyphenating the constituent words in a hyphenated compound word. In my LaTeX document, I can write high\hyp{}performance and TeX will be able to hyphenate 'per·for·mance'. But because LTeX's parser replaces \hyp{} by an empty string I get the following diagnostic in my document:

'highperformance': Possible spelling mistake found. LTeX(MORFOLOGIK_RULE_EN_US)

In LTeX's settings, ltex.latex.commands can be used to change how the LaTeX parser should treat commands in the prose, but it is not expressive enough to give a rule for replacing \hyp{} with '-'.

Describe the solution you'd like
Extend parser configuration to support arbitrary replacements, including replacing \hyp{} with '-'.

Describe alternatives you've considered
I tried adding the rule "\\hyp{}": "dummy", but that prevents LanguageTool from checking the spelling of the individual words.

Support language tool language auto detection

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Using actual real-world examples that explain why you and many other users would benefit from the feature increases the request's chances of being implemented.

LanguageTool have language auto detection:

  -adl, --autoDetect       auto-detect the language of the input text - note this will not detect
                           variants like 'English (US)', so you will not get spell checking for
                           languages with variants

It would be great if ltex-ls provided a means to use that instead of only supporting hardcoded language.

Describe the solution you'd like
A clear and concise description of what you want to happen.

I wish some setting, no design in specific.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

None, currently I'm just configuring it manually.

Additional context
Add any other context or screenshots about the feature request here.

sylvainhalle/textidote#151

Dense pandoc-style TeX is not parsed

Describe the bug
Release 9.2.0 added support for Pandoc-style display math blocks.

Pandoc-style single-line display math blocks will not be parsed by LTeX, despite them being allowed in https://pandoc.org/MANUAL.html#math.

Even if LTex won't implement single-line display math block parsing, multi-line display math blocks that occurs after (an odd number of) single-line display math blocks should probably still be parsed.

Steps to reproduce

  1. Open the below sample document in VSCode with LTeX
  2. Line 6 should have a grammar warning, despite being in a math block. Line 3 should not have a grammar warning, despite not being in a math block.

Expected behavior
Lines 1 and 6 should not be checked, while line 3 should be.

Sample document

$$do not check me$$

do not check me

$$
do not check me
$$

LTeX configuration
Default configuration

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

  • Operating system: Windows 11
  • ltex-ls: 15.2
  • Java: 15

Allow mapping custom extensions to language IDs

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

I'm trying to use LTeX with .mdx files, which are almost entirely Markdown.

Describe the solution you'd like

While native support for MDX would be great (there are a few syntaxes that can throw the parser off, but pretty easy to ignore), it can also make sense to simply open a setting to map arbitrary file extensions to language IDs. In essence, I'd be enabling the "markdown" language for files ending with .mdx, as shown here:

} else if (fileName.endsWith(".md")) {
"markdown"

Describe alternatives you've considered

In VSCode, mapping "files.associations": { "*.mdx": "markdown" } successfully enables LTeX for .mdx files, but it's a global setting, so other extensions and syntax highlighters will also treat the file as Markdown.

Additional context

Another (imperfect) solution would be to simply add || fileName.endsWith(".mdx") to the above snippet. There are also other common Markdown extensions that may be worth adding (sindresorhus/markdown-extensions). It's imperfect, because the parser doesn't recognize JSX snippets within the Markdown, and appears to treat them as empty string.

Screen Shot 2021-11-13 at 1 43 11 PM

Problem in detection of lang: in yaml front matter

Describe the bug
In the case where lang: language where language is not in quotes, the yaml parsers seems to take on all following options as a language: 'language\nfollowingtitle: option\n'

Steps to reproduce
Steps to reproduce the behavior:

  1. Create document with some options after lang: language in yaml front matter. The language shouldn't be encased in quotes
  2. ltex can't initialize because the language is not recognized

Expected behavior
Only us language string and stop at newline

Sample document

---
lang: en
title: This is a test
---

Text.

LTeX LS log

 `ERROR][2022-02-16 10:48:51] .../vim/lsp/rpc.lua:420    "rpc"   "/Users/guillaumeallain/.local/share/nvim/lsp_servers/ltex/ltex-ls/bin/ltex-ls" "stderr"        "févr. 16, 2022 10:48:51 A.M. org.bsplines.ltexls.languagetool.LanguageToolJavaInterface <init>\nGRAVE: 'en\ntitle: This is a test' is not a recognized language. Leaving LanguageTool uninitialized, checking disabled.\n"`

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

  • Operating system: macOS 11.6.3
  • ltex-ls: 15.2.0

Additional context/information

This works without problem when the language string is between quotes. By looking at tests, this doesn't seem like something that can be seen by the current tests for the yaml front matter

LaTeX parser incorrectly recognizes names with diactrics

Describe the bug
If a name have several diactrics, only the part of it is recognized as a word.

Steps to reproduce
Steps to reproduce the behavior:

  1. Have a name Žák in the text, written as {\v Z}{\'a}k.
  2. ltex parses it as “ák” and produces the error “'ák': Possible spelling mistake found.”

Expected behavior
It should be recognized correctly.

LTeX configuration
Default.

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

  • Operating system: ArchLinux
  • ltex-ls: 15.2
  • Java: openjdk 17.0.1

Spellchecking in spanish

Hi, I'm using Neovim, I have the ltex-ls server installed with LspInstall, but when I activate it, it gives alarms for every single word I type in my LaTeX document (I'm writing in spanish), and I wasn't able to find a way to change this language spellcheck in the init.lua file. I'd appreciate if someone has the answer to this, bc all my documents are written in spanish, so I get many alarms of the spellchecking.
In a ltex-ls page I saw that just loading the \usepackage[spanish]{babel} in the LaTeX document the ltex-ls would detect it and automatically change the language, but it didn't work.
Thanks in advance.

Wrong mapping for `portuguese` language

Hey there!

First off, great extension, I love it, awesome stuff with LATEX support.

I've seemed to have identified what looks to be an issue when trying to enclose portuguese text using babel commands. I've tried them all: foreignlanguage, selectlanguage, the otherlanguage environment. Magic comments work fine with the language tag, but that had me thinking.

I resorted, as documented, to use the babeltags command in my document's preamble like so

\babeltags{pt=portuguese}

To my surprise, and confusion, when using textpt or the now available pt environment, checking worked wonderfully.

I tracked down when support for babel commands were introduced and noticed this line over here when initializing the babelLanguageMap

The language portugese is not made available by babel, only making available the codenames portuguese (spelled correctly) and the historically short portuges. I'm not sure this is either a typo or that babel used to support portugese as well in the past. If it was a typo, I suggest its removal, keeping it otherwise.

Regardless, I would recommend adding the proper mappings. While I'm at it, I'd also suggest adding the historical aliases for compatibility reasons, if those are interesting to support as well. Some java pseudo-code follows:

babelLanguageMap.put("brazil", "pt-BR");
babelLanguageMap.put("brazilian", "pt-BR");
babelLanguageMap.put("portuges", "pt");
babelLanguageMap.put("portuguese", "pt");

Quick disclaimer: I'm not sure this is enough to fix the whole problem, but from what little I've looked at, it seems to be enough. If it is, I can gladly submit a PR adding the missing mappings. Removing the portugese mapping is up for debate. I honestly don't recall if that language codename was supported once, but it doesn't appear to be documented in the most recent version of the documentation.

Ltex do not pick a file as dictionary

Describe the bug
When defining dictionary.en-US = ":path/to/file", the words in the text file are not added to the word list.

Steps to reproduce

test config test.json:

{
    "dictionary": {
        "en-US": [
            "pluto",
            ":/path/to/test.txt"
        ]
    }
}

test dictionary test.txt:

pippo

run the code:

echo "This is pippo and pluto." | ltex-cli --client-configuration=test.json -

I get the output:

-:1:9: info: 'pippo': Possible spelling mistake found. [MORFOLOGIK_RULE_EN_US]
This is *pippo* and pluto.
        Use 'hippo'

Expected behavior
One would expect that the words listed in test.txt are not found as errors.

LTeX configuration
see above

LTeX LS log
see above

Version information

Linux (Archlinux).

{
  "ltex-ls": "15.2.0",
  "java": "11.0.12"
}

Adding support for OpenAPI documents

I'm looking into how I can reuse this tool to validate OpenAPI document's descriptions, summaries, and titles etc. I would like to know if there is a extension point which I can provide the regions of the document that I would like to inspect for grammer and spellings. So for OpenAPI document I can provide those regions based on the OpenAPI grammer.

Support class and style files

Is your feature request related to a problem? Please describe.
LTEX-LS reports a lot of false positives in cls and sty files.

Describe the solution you'd like
Support cls and sty files.

Related question
Does LTEX-LS distinguish filetypes over languageId or by file extension? Is LaTex filtering of commands disabled if the languageId (or extension) does not match?

Markdown Language Detection by using the frontmatter

Is your feature request related to a problem? Please describe.
I find myself writing a lot of documents in german and in english.
Having to "hardcode" the language into my lsp (or getting no spell correction) means I have to edit my config everytime I switch languages.

Describe the solution you'd like
I would love a new option in ltex.language something like frontmatter which parses the frontmatter for markdown and sets the language according to that.

e.g. in my markdown document:

---
title: Mein Document
language: de-DE
--

Das ist deutscher Text.

and in another:

---
title: My Document
language: en-US
--

This is english Text.

Describe alternatives you've considered
I tried finding a nice cli program that parses a file and gives heuristics about which language it might be and then configure depending on that in my neovim config. This won't work for new documents and I will have to restart my editor everytime I edit a document in a different language.

Add gitcommit files support

Hi and thanks for this awesome tool and your work ! This is a really handy tool !

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

When I edit my commit message, I like to have the things I write grammar-checked, and I'd like to use ltex-ls for that.

Describe the solution you'd like

There is actually two solutions:

  1. Add a gitcommit filetype, that ignores comments in the file (starting with #)
  2. Add the ability to create custom filetypes, with something like regexes to "parse" them.

Describe alternatives you've considered

I tried using the plaintext version, but it is not that great.

Additional context

Not sure if that applies here.

Homebrew formula

Is your feature request related to a problem? Please describe.
It's convenient to install the server using Homebrew. This not related to any problem.

Describe the solution you'd like
To have a Homebrew formula to make it easy to install ltex-ls.

Describe alternatives you've considered
I have made a pull request to Homebrew to have ltex-ls added to their core tap, you can find the pull request here. Feel free to suggest changes.

Additional context
Homebrew is used by many developers to easily install and maintain software in Mac and Linux.

How to correct define dictionary

Hello, I´m trying to make ltex-ls work with the builtin neovim lsp client, the basic stuff is already working (linting) out of the box, but when I try to define a dictionary it doesn't respect my definition.

Spurious spelling errors in Spanish formulas

When setting the languages to Spanish "es", math formulas start showing some spelling mistakes similar to "dumm", "dummy1" or "ina4".

This is the English document, which produces no errors when using ltex-cli en.tex

\documentclass{article}
\begin{document}
\section{Section}
$$x$$
\(x\)
\end{document}

The Spanish version is almost the same:

\documentclass{article}
\begin{document}
\section{Sección}
$$x$$
\(x\)
\end{document}

When executing with:

echo '{"ltex.language":"es"}' > config; ltex-cli --client-configuration=config --verbose es.tex

It produces the following diagnostics:

es.tex:4:4: info: 'Dumm': Se ha encontrado un posible error ortográfico. [MORFOLOGIK_RULE_ES]
$$x$$
   Use 'Durmió'
   Use 'Rummy'
es.tex:5:4: info: 'Ina1': Se ha encontrado un posible error ortográfico. [MORFOLOGIK_RULE_ES]
\(x\)
   Use 'Una'
   Use 'Final'
   Use 'Unas'
   Use 'Iba'
   Use 'Ana'

The same happens if the formula is empty or is a complex formula, but $$x$$ is just used as a demostration.

  • Operating system: Kubuntu 20.04 5.11.0-46-generic
  • ltex-ls: 15.2.0
  • Java: 11.0.15

Docker image

Describe the problems you are having
I just want to avoid Java tool chain in my system, since I don't know anything about Java. Yes it sounds really stupid :)

Describe the solution you'd like
It would be nice to have a Docker image alongside the release. Some linting tools (which are hard to build from source) support this alternative method like hadolint.
You don't need to publish it to DockerHub though. Just a Dockerfile file is helpful enough. Publishing it through GitHub container registry is also an option.

Additional context
I have a working image, simply by just spinning up an Alpine base, copying the release over and installing opendjdk11-jdk on it. It works but not ideal. A Dockerfile file with detailed build instruction would be nice (I can't seem to find the build from source instruction anywhere).

Missing accent and special character support

Describe the bug
Several accents and special characters are missing support. I am particularly interested in proper handling of \H{o} -> ő. See the details below.

Steps to reproduce
Steps to reproduce the behavior:

  1. Save the latex code given below as a .tex file
  2. Open it in VSCode with the LTeX plugin enabled
  3. Observe the poor handling of some accents. One can add Erdős to the dictionary but still get a spelling error on Erd\H{o}s, and the Polish words are marked as errors when the latex command is used to insert the accent (rather than using the correct unicode letter).

Expected behavior
The accent commands \H, \k and similar should be correctly parsed and interpreted by LTeX

Sample document

\documentclass{article}

\usepackage[utf8]{inputenc} % not necessary with newer versions of latex
\usepackage[T1]{fontenc} % necessary to allow the various accents
\usepackage{lmodern} % (optional) load a modern font
\usepackage{hyperref} % for hyperlinks

\begin{document}

\section{Information on diacritics in latex}

\url{https://tex.stackexchange.com/tags/accents/info}\\
\url{https://en.wikibooks.org/wiki/LaTeX/Special_Characters}

\section{Missing support in LTeX}


\begin{enumerate}
    \item Erd\H{o}s should be recognised as Erdős
% LTeX: SETTINGS language=pl-PL
    \item miesi\k{a}c should be recognised as miesiąc 
    \item miesi\k{e}cznie should be recognised as miesięcznie
    \item b\l\k{a}d should be recognised as błąd
\end{enumerate}

% LTeX: SETTINGS language=en-GB

\subsection{Further unsupported diacritics (without examples)}
\begin{enumerate}
    \item o with a bar under the letter: \b{o}
    \item u with a dot under the letter: \d{u}
    \item o with a breve over the letter: \u{o}
    \item s, c with a caron/h\'{a}\v{c}ek over the letter: \v{s}, \v{c}
    \item tie accents \t{oo} or \t{o}o
    \item dotless i, j: \i, \j
\end{enumerate}

\section{Diacritics with support}

\begin{enumerate}
    \item \AA, \O, \aa, \ss, \o: see \href{https://github.com/valentjn/ltex-ls/blob/1b6d0e8fb4753d43ffd968f4ac87b38d6a61eb36/ltexls-core/src/main/java/org/bsplines/ltexls/parsing/latex/LatexAnnotatedTextBuilder.java#L563}{this url}.
    \item Grave accent on AEIOUaeiou, acute accent on AEIOUYaeiouy, circumflex on AEIOUYaeiouy, tilde on AEINOUaeinou, umlaut on AEIOUYaeiouy, macron on AEIOUYaeiouy, dot on AEIOaeo, cedilla on Cc, ring on AUau,
see \href{https://github.com/valentjn/ltex-ls/blob/1b6d0e8fb4753d43ffd968f4ac87b38d6a61eb36/ltexls-core/src/main/java/org/bsplines/ltexls/parsing/latex/LatexAnnotatedTextBuilder.java#L290}{this url}.
\end{enumerate}

\end{document}

LTeX configuration
N/A, no configuration necessary to observe bug

LTeX LS log
N/A, the bug produces no log output

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

  • Operating system: Windows 10
  • ltex-ls: 10.0.0
  • Java: unknown (this is irrelevant to the bug)

Additional context/information
None

Ltex crashing after using math delimiters $$

Describe the bug
In portuguese, after the first use of the math delimiters $$, Ltex stops working (both ltex-ls and ltex-cli).

Steps to reproduce

  1. Open sample document
  2. Add/Remove $$

Expected behavior
It should work normally like it does when the line \usepackage[brazilian]{babel} is removed.

Sample document

\documentclass[a4paper, twoside, 11pt]{article}
\usepackage[brazilian]{babel}

\begin{document}
Teset errado $a+b$.
\end{document}

LTeX configuration
Default lspconfig for neovim.

LTeX LS log

Jan 15, 2022 3:35:19 AM org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor run
SEVERE: java.io.IOException: Stream closed
org.eclipse.lsp4j.jsonrpc.JsonRpcException: java.io.IOException: Stream closed
        at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:122)
        at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
        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)
Caused by: java.io.IOException: Stream closed
        at java.base/java.io.BufferedInputStream.getBufIfOpen(Unknown Source)
        at java.base/java.io.BufferedInputStream.read(Unknown Source)
        at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:79)
        ... 7 more
[DEBUG][2022-01-15 03:49:02] .../lua/vim/lsp.lua:962	"LSP[ltex]"	"client.request"	1	"textDocument/codeAction"	{  context = {    diagnostics = { {        code = "HUNSPELL_RULE",        codeDescription = {          href = "https://community.languagetool.org/rule/show/HUNSPELL_RULE?lang=pt-BR"        },        message = "'Teset': Encontrado possível erro de ortografia.",        range = {          end = {            character = 5,            line = 4          },          start = {            character = 0,            line = 4          }        },        severity = 3,        source = "LTeX"      } }  },  range = {    end = <1>{      character = 12,      line = 4    },    start = <table 1>  },  textDocument = {    uri = "file:///home/tiagovla/test/hello.tex"  }}	<function 1>	1
[DEBUG][2022-01-15 03:49:02] .../vim/lsp/rpc.lua:347	"rpc.send"	{  id = 53,  jsonrpc = "2.0",  method = "textDocument/codeAction",  params = {    context = {      diagnostics = { {          code = "HUNSPELL_RULE",          codeDescription = {            href = "https://community.languagetool.org/rule/show/HUNSPELL_RULE?lang=pt-BR"          },          message = "'Teset': Encontrado possível erro de ortografia.",          range = {            end = {              character = 5,              line = 4            },            start = {              character = 0,              line = 4            }          },          severity = 3,          source = "LTeX"        } }    },    range = {      end = <1>{        character = 12,        line = 4      },      start = <table 1>    },    textDocument = {      uri = "file:///home/tiagovla/test/hello.tex"    }  }}
[DEBUG][2022-01-15 03:49:02] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  id = 53,  jsonrpc = "2.0",  result = {}}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:347	"rpc.send"	{  jsonrpc = "2.0",  method = "textDocument/didChange",  params = {    contentChanges = { {        text = "\\documentclass{article}\n\\usepackage[brazilian]{babel}\n\n\\begin{document}\nTeset errado .\n\\end{document}\n"      } },    textDocument = {      uri = "file:///home/tiagovla/test/hello.tex",      version = 145    }  }}
[DEBUG][2022-01-15 03:49:06] .../lua/vim/lsp.lua:962	"LSP[texlab]"	"client.request"	3	"textDocument/completion"	{  context = {    triggerCharacter = " ",    triggerKind = 2  },  position = {    character = 13,    line = 4  },  textDocument = {    uri = "file:///home/tiagovla/test/hello.tex"  }}	<function 1>	1
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:347	"rpc.send"	{  id = 37,  jsonrpc = "2.0",  method = "textDocument/completion",  params = {    context = {      triggerCharacter = " ",      triggerKind = 2    },    position = {      character = 13,      line = 4    },    textDocument = {      uri = "file:///home/tiagovla/test/hello.tex"    }  }}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  id = 36,  jsonrpc = "2.0",  method = "workspace/configuration",  params = {    items = { {        section = "texlab"      } }  }}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  id = 37,  jsonrpc = "2.0",  result = {    isIncomplete = false,    items = {}  }}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:464	"server_request: callback result"	{  result = { {      auxDirectory = ".",      bibtexFormatter = "texlab",      build = {        args = { "-pdf", "-interaction=nonstopmode", "-pvc", "-synctex=1", "-shell-escape", "%f" },        executable = "latexmk",        forwardSearchAfter = false,        onSave = false      },      chktex = {        onEdit = false,        onOpenAndSave = true      },      diagnosticsDelay = 50,      formatterLineLength = 120,      forwardSearch = {        args = { "--synctex-forward", "%l:1:%f", "%p" },        executable = "zathura"      },      latexFormatter = "latexindent",      latexindent = {        modifyLineBreaks = false      }    } },  status = true}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:347	"rpc.send"	{  id = 36,  jsonrpc = "2.0",  result = { {      auxDirectory = ".",      bibtexFormatter = "texlab",      build = {        args = { "-pdf", "-interaction=nonstopmode", "-pvc", "-synctex=1", "-shell-escape", "%f" },        executable = "latexmk",        forwardSearchAfter = false,        onSave = false      },      chktex = {        onEdit = false,        onOpenAndSave = true      },      diagnosticsDelay = 50,      formatterLineLength = 120,      forwardSearch = {        args = { "--synctex-forward", "%l:1:%f", "%p" },        executable = "zathura"      },      latexFormatter = "latexindent",      latexindent = {        modifyLineBreaks = false      }    } }}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///home/tiagovla/test/hello.tex"  }}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///home/tiagovla/test/hello.aux"  }}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///home/tiagovla/test/hello.log"  }}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///home/tiagovla/test/indent.log"  }}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:347	"rpc.send"	{  jsonrpc = "2.0",  method = "textDocument/didChange",  params = {    contentChanges = { {        text = "\\documentclass{article}\n\\usepackage[brazilian]{babel}\n\n\\begin{document}\nTeset errado .\n\\end{document}\n"      } },    textDocument = {      uri = "file:///home/tiagovla/test/hello.tex",      version = 145    }  }}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  id = "198",  jsonrpc = "2.0",  method = "window/workDoneProgress/create",  params = {    token = '{"uri":"file:///home/tiagovla/test/hello.tex","operation":"checkDocument","uuid":"06feca76-0e4f-595a-2db0-2a8ac1024ee1"}'  }}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:464	"server_request: callback result"	{  result = vim.NIL,  status = true}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:347	"rpc.send"	{  id = "198",  jsonrpc = "2.0",  result = vim.NIL}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "$/progress",  params = {    token = '{"uri":"file:///home/tiagovla/test/hello.tex","operation":"checkDocument","uuid":"06feca76-0e4f-595a-2db0-2a8ac1024ee1"}',    value = {      cancellable = false,      kind = "begin",      message = "file:///home/tiagovla/test/hello.tex",      title = "Checking document"    }  }}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  id = "199",  jsonrpc = "2.0",  method = "workspace/configuration",  params = {    items = { {        scopeUri = "file:///home/tiagovla/test/hello.tex",        section = "ltex"      } }  }}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:464	"server_request: callback result"	{  result = { {      dictionary = {        ["en-US"] = { "heu" }      },      disabledRules = {},      hiddenFalsePositives = {}    } },  status = true}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:347	"rpc.send"	{  id = "199",  jsonrpc = "2.0",  result = { {      dictionary = {        ["en-US"] = { "heu" }      },      disabledRules = {},      hiddenFalsePositives = {}    } }}
[ERROR][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:420	"rpc"	"ltex-ls"	"stderr"	"Jan 15, 2022 3:49:06 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked\nFINE: Checking the following text in language 'en-US' via LanguageTool: \" \"\n"
[ERROR][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:420	"rpc"	"ltex-ls"	"stderr"	"Jan 15, 2022 3:49:06 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment\nFINE: Obtained 0 rule matches\n"
[ERROR][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:420	"rpc"	"ltex-ls"	"stderr"	"Jan 15, 2022 3:49:06 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked\nFINE: Checking the following text in language 'pt-BR' via LanguageTool: \"\\n\\nTeset errado . \"\n"
[ERROR][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:420	"rpc"	"ltex-ls"	"stderr"	"Jan 15, 2022 3:49:06 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment\nFINE: Obtained 2 rule matches\n"
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "$/progress",  params = {    token = '{"uri":"file:///home/tiagovla/test/hello.tex","operation":"checkDocument","uuid":"06feca76-0e4f-595a-2db0-2a8ac1024ee1"}',    value = {      kind = "end"    }  }}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = { {        code = "HUNSPELL_RULE",        codeDescription = {          href = "https://community.languagetool.org/rule/show/HUNSPELL_RULE?lang=pt-BR"        },        message = "'Teset': Encontrado possível erro de ortografia.",        range = {          end = {            character = 5,            line = 4          },          start = {            character = 0,            line = 4          }        },        severity = 3,        source = "LTeX"      } },    uri = "file:///home/tiagovla/test/hello.tex"  }}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:347	"rpc.send"	{  jsonrpc = "2.0",  method = "textDocument/didChange",  params = {    contentChanges = { {        text = "\\documentclass{article}\n\\usepackage[brazilian]{babel}\n\n\\begin{document}\nTeset errado $.\n\\end{document}\n"      } },    textDocument = {      uri = "file:///home/tiagovla/test/hello.tex",      version = 146    }  }}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:347	"rpc.send"	{  jsonrpc = "2.0",  method = "textDocument/didChange",  params = {    contentChanges = { {        text = "\\documentclass{article}\n\\usepackage[brazilian]{babel}\n\n\\begin{document}\nTeset errado $.\n\\end{document}\n"      } },    textDocument = {      uri = "file:///home/tiagovla/test/hello.tex",      version = 146    }  }}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  id = "200",  jsonrpc = "2.0",  method = "window/workDoneProgress/create",  params = {    token = '{"uri":"file:///home/tiagovla/test/hello.tex","operation":"checkDocument","uuid":"18a84c0a-0ef0-ff7b-d585-29c2aef999bc"}'  }}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:464	"server_request: callback result"	{  result = vim.NIL,  status = true}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:347	"rpc.send"	{  id = "200",  jsonrpc = "2.0",  result = vim.NIL}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "$/progress",  params = {    token = '{"uri":"file:///home/tiagovla/test/hello.tex","operation":"checkDocument","uuid":"18a84c0a-0ef0-ff7b-d585-29c2aef999bc"}',    value = {      cancellable = false,      kind = "begin",      message = "file:///home/tiagovla/test/hello.tex",      title = "Checking document"    }  }}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  id = "201",  jsonrpc = "2.0",  method = "workspace/configuration",  params = {    items = { {        scopeUri = "file:///home/tiagovla/test/hello.tex",        section = "ltex"      } }  }}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:464	"server_request: callback result"	{  result = { {      dictionary = {        ["en-US"] = { "heu" }      },      disabledRules = {},      hiddenFalsePositives = {}    } },  status = true}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:347	"rpc.send"	{  id = "201",  jsonrpc = "2.0",  result = { {      dictionary = {        ["en-US"] = { "heu" }      },      disabledRules = {},      hiddenFalsePositives = {}    } }}
[ERROR][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:420	"rpc"	"ltex-ls"	"stderr"	"Jan 15, 2022 3:49:06 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked\nFINE: Checking the following text in language 'en-US' via LanguageTool: \" \"\n"
[ERROR][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:420	"rpc"	"ltex-ls"	"stderr"	"Jan 15, 2022 3:49:06 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment\nFINE: Obtained 0 rule matches\n"
[ERROR][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:420	"rpc"	"ltex-ls"	"stderr"	"Jan 15, 2022 3:49:06 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked\nFINE: Checking the following text in language 'pt-BR' via LanguageTool: \"\\n\\nTeset errado \"\n"
[ERROR][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:420	"rpc"	"ltex-ls"	"stderr"	"Jan 15, 2022 3:49:06 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment\nFINE: Obtained 1 rule match\n"
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "$/progress",  params = {    token = '{"uri":"file:///home/tiagovla/test/hello.tex","operation":"checkDocument","uuid":"18a84c0a-0ef0-ff7b-d585-29c2aef999bc"}',    value = {      kind = "end"    }  }}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = { {        code = "HUNSPELL_RULE",        codeDescription = {          href = "https://community.languagetool.org/rule/show/HUNSPELL_RULE?lang=pt-BR"        },        message = "'Teset': Encontrado possível erro de ortografia.",        range = {          end = {            character = 5,            line = 4          },          start = {            character = 0,            line = 4          }        },        severity = 3,        source = "LTeX"      } },    uri = "file:///home/tiagovla/test/hello.tex"  }}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///home/tiagovla/test/hello.tex"  }}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///home/tiagovla/test/hello.aux"  }}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///home/tiagovla/test/hello.log"  }}
[DEBUG][2022-01-15 03:49:06] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///home/tiagovla/test/indent.log"  }}
[DEBUG][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:347	"rpc.send"	{  jsonrpc = "2.0",  method = "textDocument/didChange",  params = {    contentChanges = { {        text = "\\documentclass{article}\n\\usepackage[brazilian]{babel}\n\n\\begin{document}\nTeset errado $a.\n\\end{document}\n"      } },    textDocument = {      uri = "file:///home/tiagovla/test/hello.tex",      version = 147    }  }}
[DEBUG][2022-01-15 03:49:07] .../lua/vim/lsp.lua:962	"LSP[ltex]"	"client.request"	1	"textDocument/completion"	{  context = {    triggerKind = 1  },  position = {    character = 15,    line = 4  },  textDocument = {    uri = "file:///home/tiagovla/test/hello.tex"  }}	<function 1>	1
[DEBUG][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:347	"rpc.send"	{  id = 54,  jsonrpc = "2.0",  method = "textDocument/completion",  params = {    context = {      triggerKind = 1    },    position = {      character = 15,      line = 4    },    textDocument = {      uri = "file:///home/tiagovla/test/hello.tex"    }  }}
[DEBUG][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:347	"rpc.send"	{  jsonrpc = "2.0",  method = "textDocument/didChange",  params = {    contentChanges = { {        text = "\\documentclass{article}\n\\usepackage[brazilian]{babel}\n\n\\begin{document}\nTeset errado $a.\n\\end{document}\n"      } },    textDocument = {      uri = "file:///home/tiagovla/test/hello.tex",      version = 147    }  }}
[DEBUG][2022-01-15 03:49:07] .../lua/vim/lsp.lua:962	"LSP[texlab]"	"client.request"	3	"textDocument/completion"	{  context = {    triggerKind = 1  },  position = {    character = 15,    line = 4  },  textDocument = {    uri = "file:///home/tiagovla/test/hello.tex"  }}	<function 1>	1
[DEBUG][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:347	"rpc.send"	{  id = 38,  jsonrpc = "2.0",  method = "textDocument/completion",  params = {    context = {      triggerKind = 1    },    position = {      character = 15,      line = 4    },    textDocument = {      uri = "file:///home/tiagovla/test/hello.tex"    }  }}
[DEBUG][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  id = 54,  jsonrpc = "2.0",  result = {}}
[DEBUG][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  id = "202",  jsonrpc = "2.0",  method = "window/workDoneProgress/create",  params = {    token = '{"uri":"file:///home/tiagovla/test/hello.tex","operation":"checkDocument","uuid":"fb4be3be-88ac-672d-7bff-bc5e9809d5e4"}'  }}
[DEBUG][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  id = 37,  jsonrpc = "2.0",  method = "workspace/configuration",  params = {    items = { {        section = "texlab"      } }  }}
[DEBUG][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  id = 38,  jsonrpc = "2.0",  result = {    isIncomplete = false,    items = {}  }}
[DEBUG][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:464	"server_request: callback result"	{  result = vim.NIL,  status = true}
[DEBUG][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:347	"rpc.send"	{  id = "202",  jsonrpc = "2.0",  result = vim.NIL}
[DEBUG][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:464	"server_request: callback result"	{  result = { {      auxDirectory = ".",      bibtexFormatter = "texlab",      build = {        args = { "-pdf", "-interaction=nonstopmode", "-pvc", "-synctex=1", "-shell-escape", "%f" },        executable = "latexmk",        forwardSearchAfter = false,        onSave = false      },      chktex = {        onEdit = false,        onOpenAndSave = true      },      diagnosticsDelay = 50,      formatterLineLength = 120,      forwardSearch = {        args = { "--synctex-forward", "%l:1:%f", "%p" },        executable = "zathura"      },      latexFormatter = "latexindent",      latexindent = {        modifyLineBreaks = false      }    } },  status = true}
[DEBUG][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:347	"rpc.send"	{  id = 37,  jsonrpc = "2.0",  result = { {      auxDirectory = ".",      bibtexFormatter = "texlab",      build = {        args = { "-pdf", "-interaction=nonstopmode", "-pvc", "-synctex=1", "-shell-escape", "%f" },        executable = "latexmk",        forwardSearchAfter = false,        onSave = false      },      chktex = {        onEdit = false,        onOpenAndSave = true      },      diagnosticsDelay = 50,      formatterLineLength = 120,      forwardSearch = {        args = { "--synctex-forward", "%l:1:%f", "%p" },        executable = "zathura"      },      latexFormatter = "latexindent",      latexindent = {        modifyLineBreaks = false      }    } }}
[DEBUG][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "$/progress",  params = {    token = '{"uri":"file:///home/tiagovla/test/hello.tex","operation":"checkDocument","uuid":"fb4be3be-88ac-672d-7bff-bc5e9809d5e4"}',    value = {      cancellable = false,      kind = "begin",      message = "file:///home/tiagovla/test/hello.tex",      title = "Checking document"    }  }}
[DEBUG][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  id = "203",  jsonrpc = "2.0",  method = "workspace/configuration",  params = {    items = { {        scopeUri = "file:///home/tiagovla/test/hello.tex",        section = "ltex"      } }  }}
[DEBUG][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:464	"server_request: callback result"	{  result = { {      dictionary = {        ["en-US"] = { "heu" }      },      disabledRules = {},      hiddenFalsePositives = {}    } },  status = true}
[DEBUG][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:347	"rpc.send"	{  id = "203",  jsonrpc = "2.0",  result = { {      dictionary = {        ["en-US"] = { "heu" }      },      disabledRules = {},      hiddenFalsePositives = {}    } }}
[ERROR][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:420	"rpc"	"ltex-ls"	"stderr"	"Jan 15, 2022 3:49:07 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked\nFINE: Checking the following text in language 'en-US' via LanguageTool: \" \"\n"
[ERROR][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:420	"rpc"	"ltex-ls"	"stderr"	"Jan 15, 2022 3:49:07 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment\nFINE: Obtained 0 rule matches\n"
[ERROR][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:420	"rpc"	"ltex-ls"	"stderr"	"Jan 15, 2022 3:49:07 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked\nFINE: Checking the following text in language 'pt-BR' via LanguageTool: \"\\n\\nTeset errado \"\n"
[ERROR][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:420	"rpc"	"ltex-ls"	"stderr"	"Jan 15, 2022 3:49:07 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment\nFINE: Obtained 1 rule match\n"
[DEBUG][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "$/progress",  params = {    token = '{"uri":"file:///home/tiagovla/test/hello.tex","operation":"checkDocument","uuid":"fb4be3be-88ac-672d-7bff-bc5e9809d5e4"}',    value = {      kind = "end"    }  }}
[DEBUG][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = { {        code = "HUNSPELL_RULE",        codeDescription = {          href = "https://community.languagetool.org/rule/show/HUNSPELL_RULE?lang=pt-BR"        },        message = "'Teset': Encontrado possível erro de ortografia.",        range = {          end = {            character = 5,            line = 4          },          start = {            character = 0,            line = 4          }        },        severity = 3,        source = "LTeX"      } },    uri = "file:///home/tiagovla/test/hello.tex"  }}
[DEBUG][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///home/tiagovla/test/hello.tex"  }}
[DEBUG][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///home/tiagovla/test/hello.aux"  }}
[DEBUG][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///home/tiagovla/test/hello.log"  }}
[DEBUG][2022-01-15 03:49:07] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///home/tiagovla/test/indent.log"  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:347	"rpc.send"	{  jsonrpc = "2.0",  method = "textDocument/didChange",  params = {    contentChanges = { {        text = "\\documentclass{article}\n\\usepackage[brazilian]{babel}\n\n\\begin{document}\nTeset errado $a+.\n\\end{document}\n"      } },    textDocument = {      uri = "file:///home/tiagovla/test/hello.tex",      version = 148    }  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:347	"rpc.send"	{  jsonrpc = "2.0",  method = "textDocument/didChange",  params = {    contentChanges = { {        text = "\\documentclass{article}\n\\usepackage[brazilian]{babel}\n\n\\begin{document}\nTeset errado $a+.\n\\end{document}\n"      } },    textDocument = {      uri = "file:///home/tiagovla/test/hello.tex",      version = 148    }  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  id = "204",  jsonrpc = "2.0",  method = "window/workDoneProgress/create",  params = {    token = '{"uri":"file:///home/tiagovla/test/hello.tex","operation":"checkDocument","uuid":"ac9ece0e-ac90-5e60-d7ed-eeb687064a08"}'  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:464	"server_request: callback result"	{  result = vim.NIL,  status = true}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:347	"rpc.send"	{  id = "204",  jsonrpc = "2.0",  result = vim.NIL}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "$/progress",  params = {    token = '{"uri":"file:///home/tiagovla/test/hello.tex","operation":"checkDocument","uuid":"ac9ece0e-ac90-5e60-d7ed-eeb687064a08"}',    value = {      cancellable = false,      kind = "begin",      message = "file:///home/tiagovla/test/hello.tex",      title = "Checking document"    }  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  id = "205",  jsonrpc = "2.0",  method = "workspace/configuration",  params = {    items = { {        scopeUri = "file:///home/tiagovla/test/hello.tex",        section = "ltex"      } }  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:464	"server_request: callback result"	{  result = { {      dictionary = {        ["en-US"] = { "heu" }      },      disabledRules = {},      hiddenFalsePositives = {}    } },  status = true}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:347	"rpc.send"	{  id = "205",  jsonrpc = "2.0",  result = { {      dictionary = {        ["en-US"] = { "heu" }      },      disabledRules = {},      hiddenFalsePositives = {}    } }}
[ERROR][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:420	"rpc"	"ltex-ls"	"stderr"	"Jan 15, 2022 3:49:09 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked\nFINE: Checking the following text in language 'en-US' via LanguageTool: \" \"\n"
[ERROR][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:420	"rpc"	"ltex-ls"	"stderr"	"Jan 15, 2022 3:49:09 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment\nFINE: Obtained 0 rule matches\n"
[ERROR][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:420	"rpc"	"ltex-ls"	"stderr"	"Jan 15, 2022 3:49:09 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked\nFINE: Checking the following text in language 'pt-BR' via LanguageTool: \"\\n\\nTeset errado \"\n"
[ERROR][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:420	"rpc"	"ltex-ls"	"stderr"	"Jan 15, 2022 3:49:09 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment\nFINE: Obtained 1 rule match\n"
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "$/progress",  params = {    token = '{"uri":"file:///home/tiagovla/test/hello.tex","operation":"checkDocument","uuid":"ac9ece0e-ac90-5e60-d7ed-eeb687064a08"}',    value = {      kind = "end"    }  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = { {        code = "HUNSPELL_RULE",        codeDescription = {          href = "https://community.languagetool.org/rule/show/HUNSPELL_RULE?lang=pt-BR"        },        message = "'Teset': Encontrado possível erro de ortografia.",        range = {          end = {            character = 5,            line = 4          },          start = {            character = 0,            line = 4          }        },        severity = 3,        source = "LTeX"      } },    uri = "file:///home/tiagovla/test/hello.tex"  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///home/tiagovla/test/hello.tex"  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///home/tiagovla/test/hello.aux"  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///home/tiagovla/test/hello.log"  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///home/tiagovla/test/indent.log"  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:347	"rpc.send"	{  jsonrpc = "2.0",  method = "textDocument/didChange",  params = {    contentChanges = { {        text = "\\documentclass{article}\n\\usepackage[brazilian]{babel}\n\n\\begin{document}\nTeset errado $a+b.\n\\end{document}\n"      } },    textDocument = {      uri = "file:///home/tiagovla/test/hello.tex",      version = 149    }  }}
[DEBUG][2022-01-15 03:49:09] .../lua/vim/lsp.lua:962	"LSP[ltex]"	"client.request"	1	"textDocument/completion"	{  context = {    triggerKind = 1  },  position = {    character = 17,    line = 4  },  textDocument = {    uri = "file:///home/tiagovla/test/hello.tex"  }}	<function 1>	1
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:347	"rpc.send"	{  id = 55,  jsonrpc = "2.0",  method = "textDocument/completion",  params = {    context = {      triggerKind = 1    },    position = {      character = 17,      line = 4    },    textDocument = {      uri = "file:///home/tiagovla/test/hello.tex"    }  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:347	"rpc.send"	{  jsonrpc = "2.0",  method = "textDocument/didChange",  params = {    contentChanges = { {        text = "\\documentclass{article}\n\\usepackage[brazilian]{babel}\n\n\\begin{document}\nTeset errado $a+b.\n\\end{document}\n"      } },    textDocument = {      uri = "file:///home/tiagovla/test/hello.tex",      version = 149    }  }}
[DEBUG][2022-01-15 03:49:09] .../lua/vim/lsp.lua:962	"LSP[texlab]"	"client.request"	3	"textDocument/completion"	{  context = {    triggerKind = 1  },  position = {    character = 17,    line = 4  },  textDocument = {    uri = "file:///home/tiagovla/test/hello.tex"  }}	<function 1>	1
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:347	"rpc.send"	{  id = 39,  jsonrpc = "2.0",  method = "textDocument/completion",  params = {    context = {      triggerKind = 1    },    position = {      character = 17,      line = 4    },    textDocument = {      uri = "file:///home/tiagovla/test/hello.tex"    }  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  id = "206",  jsonrpc = "2.0",  method = "window/workDoneProgress/create",  params = {    token = '{"uri":"file:///home/tiagovla/test/hello.tex","operation":"checkDocument","uuid":"9ce71116-3c79-3903-ab98-e199c8224a43"}'  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  id = 55,  jsonrpc = "2.0",  result = {}}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  id = 38,  jsonrpc = "2.0",  method = "workspace/configuration",  params = {    items = { {        section = "texlab"      } }  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  id = 39,  jsonrpc = "2.0",  result = {    isIncomplete = false,    items = {}  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:464	"server_request: callback result"	{  result = vim.NIL,  status = true}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:347	"rpc.send"	{  id = "206",  jsonrpc = "2.0",  result = vim.NIL}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:464	"server_request: callback result"	{  result = { {      auxDirectory = ".",      bibtexFormatter = "texlab",      build = {        args = { "-pdf", "-interaction=nonstopmode", "-pvc", "-synctex=1", "-shell-escape", "%f" },        executable = "latexmk",        forwardSearchAfter = false,        onSave = false      },      chktex = {        onEdit = false,        onOpenAndSave = true      },      diagnosticsDelay = 50,      formatterLineLength = 120,      forwardSearch = {        args = { "--synctex-forward", "%l:1:%f", "%p" },        executable = "zathura"      },      latexFormatter = "latexindent",      latexindent = {        modifyLineBreaks = false      }    } },  status = true}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:347	"rpc.send"	{  id = 38,  jsonrpc = "2.0",  result = { {      auxDirectory = ".",      bibtexFormatter = "texlab",      build = {        args = { "-pdf", "-interaction=nonstopmode", "-pvc", "-synctex=1", "-shell-escape", "%f" },        executable = "latexmk",        forwardSearchAfter = false,        onSave = false      },      chktex = {        onEdit = false,        onOpenAndSave = true      },      diagnosticsDelay = 50,      formatterLineLength = 120,      forwardSearch = {        args = { "--synctex-forward", "%l:1:%f", "%p" },        executable = "zathura"      },      latexFormatter = "latexindent",      latexindent = {        modifyLineBreaks = false      }    } }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "$/progress",  params = {    token = '{"uri":"file:///home/tiagovla/test/hello.tex","operation":"checkDocument","uuid":"9ce71116-3c79-3903-ab98-e199c8224a43"}',    value = {      cancellable = false,      kind = "begin",      message = "file:///home/tiagovla/test/hello.tex",      title = "Checking document"    }  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  id = "207",  jsonrpc = "2.0",  method = "workspace/configuration",  params = {    items = { {        scopeUri = "file:///home/tiagovla/test/hello.tex",        section = "ltex"      } }  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:464	"server_request: callback result"	{  result = { {      dictionary = {        ["en-US"] = { "heu" }      },      disabledRules = {},      hiddenFalsePositives = {}    } },  status = true}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:347	"rpc.send"	{  id = "207",  jsonrpc = "2.0",  result = { {      dictionary = {        ["en-US"] = { "heu" }      },      disabledRules = {},      hiddenFalsePositives = {}    } }}
[ERROR][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:420	"rpc"	"ltex-ls"	"stderr"	"Jan 15, 2022 3:49:09 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked\nFINE: Checking the following text in language 'en-US' via LanguageTool: \" \"\n"
[ERROR][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:420	"rpc"	"ltex-ls"	"stderr"	"Jan 15, 2022 3:49:09 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment\nFINE: Obtained 0 rule matches\n"
[ERROR][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:420	"rpc"	"ltex-ls"	"stderr"	"Jan 15, 2022 3:49:09 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked\nFINE: Checking the following text in language 'pt-BR' via LanguageTool: \"\\n\\nTeset errado \"\n"
[ERROR][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:420	"rpc"	"ltex-ls"	"stderr"	"Jan 15, 2022 3:49:09 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment\nFINE: Obtained 1 rule match\n"
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "$/progress",  params = {    token = '{"uri":"file:///home/tiagovla/test/hello.tex","operation":"checkDocument","uuid":"9ce71116-3c79-3903-ab98-e199c8224a43"}',    value = {      kind = "end"    }  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = { {        code = "HUNSPELL_RULE",        codeDescription = {          href = "https://community.languagetool.org/rule/show/HUNSPELL_RULE?lang=pt-BR"        },        message = "'Teset': Encontrado possível erro de ortografia.",        range = {          end = {            character = 5,            line = 4          },          start = {            character = 0,            line = 4          }        },        severity = 3,        source = "LTeX"      } },    uri = "file:///home/tiagovla/test/hello.tex"  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///home/tiagovla/test/hello.tex"  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///home/tiagovla/test/hello.aux"  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///home/tiagovla/test/hello.log"  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///home/tiagovla/test/indent.log"  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:347	"rpc.send"	{  jsonrpc = "2.0",  method = "textDocument/didChange",  params = {    contentChanges = { {        text = "\\documentclass{article}\n\\usepackage[brazilian]{babel}\n\n\\begin{document}\nTeset errado $a+b$.\n\\end{document}\n"      } },    textDocument = {      uri = "file:///home/tiagovla/test/hello.tex",      version = 150    }  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:347	"rpc.send"	{  jsonrpc = "2.0",  method = "textDocument/didChange",  params = {    contentChanges = { {        text = "\\documentclass{article}\n\\usepackage[brazilian]{babel}\n\n\\begin{document}\nTeset errado $a+b$.\n\\end{document}\n"      } },    textDocument = {      uri = "file:///home/tiagovla/test/hello.tex",      version = 150    }  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  id = "208",  jsonrpc = "2.0",  method = "window/workDoneProgress/create",  params = {    token = '{"uri":"file:///home/tiagovla/test/hello.tex","operation":"checkDocument","uuid":"ddaaab86-b0c7-06ef-edf4-945e04483aa0"}'  }}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:464	"server_request: callback result"	{  result = vim.NIL,  status = true}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:347	"rpc.send"	{  id = "208",  jsonrpc = "2.0",  result = vim.NIL}
[DEBUG][2022-01-15 03:49:09] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "$/progress",  params = {    token = '{"uri":"file:///home/tiagovla/test/hello.tex","operation":"checkDocument","uuid":"ddaaab86-b0c7-06ef-edf4-945e04483aa0"}',    value = {      cancellable = false,      kind = "begin",      message = "file:///home/tiagovla/test/hello.tex",      title = "Checking document"    }  }}
[DEBUG][2022-01-15 03:49:10] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  id = "209",  jsonrpc = "2.0",  method = "workspace/configuration",  params = {    items = { {        scopeUri = "file:///home/tiagovla/test/hello.tex",        section = "ltex"      } }  }}
[DEBUG][2022-01-15 03:49:10] .../vim/lsp/rpc.lua:464	"server_request: callback result"	{  result = { {      dictionary = {        ["en-US"] = { "heu" }      },      disabledRules = {},      hiddenFalsePositives = {}    } },  status = true}
[DEBUG][2022-01-15 03:49:10] .../vim/lsp/rpc.lua:347	"rpc.send"	{  id = "209",  jsonrpc = "2.0",  result = { {      dictionary = {        ["en-US"] = { "heu" }      },      disabledRules = {},      hiddenFalsePositives = {}    } }}
[ERROR][2022-01-15 03:49:10] .../vim/lsp/rpc.lua:420	"rpc"	"ltex-ls"	"stderr"	"Jan 15, 2022 3:49:10 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked\nFINE: Checking the following text in language 'en-US' via LanguageTool: \" \"\n"
[ERROR][2022-01-15 03:49:10] .../vim/lsp/rpc.lua:420	"rpc"	"ltex-ls"	"stderr"	"Jan 15, 2022 3:49:10 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment\nFINE: Obtained 0 rule matches\n"
[ERROR][2022-01-15 03:49:10] .../vim/lsp/rpc.lua:420	"rpc"	"ltex-ls"	"stderr"	"Jan 15, 2022 3:49:10 AM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked\nFINE: Checking the following text in language 'pt-BR' via LanguageTool: \"\\n\\nTeset errado Ina0. \"\n"
[ERROR][2022-01-15 03:49:10] .../vim/lsp/rpc.lua:420	"rpc"	"ltex-ls"	"stderr"	"Jan 15, 2022 3:49:10 AM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment\nSEVERE: LanguageTool failed. The following exception occurred:\njava.lang.RuntimeException: java.lang.RuntimeException: Could not check sentence (language: Portuguese (Brazil)): <sentcontent>Teset errado Ina0. </sentcontent>\n\tat org.languagetool.JLanguageTool.performCheck(JLanguageTool.java:1230)\n\tat org.languagetool.JLanguageTool.checkInternal(JLanguageTool.java:970)\n\tat org.languagetool.JLanguageTool.check(JLanguageTool.java:900)\n\tat org.languagetool.JLanguageTool.check(JLanguageTool.java:882)\n\tat org.languagetool.JLanguageTool.check(JLanguageTool.java:869)\n\tat org.bsplines.ltexls.languagetool.LanguageToolJavaInterface.checkInternal(LanguageToolJavaInterface.kt:112)\n\tat org.bsplines.ltexls.languagetool.LanguageToolInterface.check(LanguageToolInterface.kt:22)\n\tat org.bsplines.ltexls.server.DocumentChecker.checkAnnotatedTextFragment(DocumentChecker.kt:138)\n\tat org.bsplines.ltexls.server.DocumentChecker.checkAnnotatedTextFragments(DocumentChecker.kt:91)\n\tat org.bsplines.ltexls.server.DocumentChecker.check(DocumentChecker.kt:279)\n\tat org.bsplines.ltexls.server.LtexTextDocumentItem.check(LtexTextDocumentItem.kt:413)\n\tat org.bsplines.ltexls.server.LtexTextDocumentItem.checkAndGetDiagnostics(LtexTextDocumentItem.kt:295)\n\tat org.bsplines.ltexls.server.LtexTextDocumentItem.checkAndPublishDiagnostics(LtexTextDocumentItem.kt:272)\n\tat org.bsplines.ltexls.server.LtexTextDocumentItem.checkAndPublishDiagnosticsWithoutCache(LtexTextDocumentItem.kt:267)\n\tat org.bsplines.ltexls.server.LtexTextDocumentItem.checkAndPublishDiagnosticsWithoutCache$default(LtexTextDocumentItem.kt:266)\n\tat org.bsplines.ltexls.server.LtexTextDocumentService.didChange$lambda-3(LtexTextDocumentService.kt:227)\n\tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)\n\tat java.base/java.util.concurrent.FutureTask.run(Unknown Source)\n\tat java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)\n\tat java.base/java.lang.Thread.run(Unknown Source)\nCaused by: java.lang.RuntimeException: Could not check sentence (language: Portuguese (Brazil)): <sentcontent>Teset errado Ina0. </sentcontent>\n\tat org.languagetool.JLanguageTool$TextCheckCallable.getOtherRuleMatches(JLanguageTool.java:1883)\n\tat org.languagetool.JLanguageTool$TextCheckCallable.call(JLanguageTool.java:1765)\n\tat org.languagetool.JLanguageTool$TextCheckCallable.call(JLanguageTool.java:1736)\n\tat org.languagetool.JLanguageTool.performCheck(JLanguageTool.java:1226)\n\t... 21 more\nCaused by: java.lang.RuntimeException: fromPos (65) must be less than toPos (65) for match: <sentcontent>HUNSPELL_RULE:13-16:Encontrado possível erro de ortografia.</sentcontent>\n\tat org.languagetool.rules.RuleMatch.setOffsetPosition(RuleMatch.java:326)\n\tat org.languagetool.JLanguageTool.adjustRuleMatchPos(JLanguageTool.java:1345)\n\tat org.languagetool.JLanguageTool$TextCheckCallable.getOtherRuleMatches(JLanguageTool.java:1856)\n\t... 24 more\n\n"
[DEBUG][2022-01-15 03:49:10] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "$/progress",  params = {    token = '{"uri":"file:///home/tiagovla/test/hello.tex","operation":"checkDocument","uuid":"ddaaab86-b0c7-06ef-edf4-945e04483aa0"}',    value = {      kind = "end"    }  }}
[DEBUG][2022-01-15 03:49:10] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///home/tiagovla/test/hello.tex"  }}
[DEBUG][2022-01-15 03:49:10] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///home/tiagovla/test/hello.tex"  }}
[DEBUG][2022-01-15 03:49:10] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///home/tiagovla/test/hello.aux"  }}
[DEBUG][2022-01-15 03:49:10] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///home/tiagovla/test/hello.log"  }}
[DEBUG][2022-01-15 03:49:10] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = {},    uri = "file:///home/tiagovla/test/indent.log"  }}
[DEBUG][2022-01-15 03:49:11] .../lua/vim/lsp.lua:962	"LSP[ltex]"	"client.request"	1	"textDocument/codeAction"	{  context = {    diagnostics = {}  },  range = {    end = <1>{      character = 17,      line = 4    },    start = <table 1>  },  textDocument = {    uri = "file:///home/tiagovla/test/hello.tex"  }}	<function 1>	1
[DEBUG][2022-01-15 03:49:11] .../vim/lsp/rpc.lua:347	"rpc.send"	{  id = 56,  jsonrpc = "2.0",  method = "textDocument/codeAction",  params = {    context = {      diagnostics = {}    },    range = {      end = <1>{        character = 17,        line = 4      },      start = <table 1>    },    textDocument = {      uri = "file:///home/tiagovla/test/hello.tex"    }  }}
[DEBUG][2022-01-15 03:49:11] .../vim/lsp/rpc.lua:454	"rpc.receive"	{  id = 56,  jsonrpc = "2.0",  result = {}}

Version information

  • Operating system: Linux Arch
  • ltex-ls: 15.2.0
  • Java: 11.0.12

Additional context/information
LanguageTool seems to be working on TexStudio.

Commit hook/CI support

Does it possible to create a commit hook that can be used on pre-commit/CI service to keep my repository from grammar mistakes?
I saw it on another projects as linters and I think it's would be great if I could avoid from grammar mistakes automatically.

siunitx issues

when using siunitx, the parser does somehow not work:

an example to reproduce this is the following German sentence

Die Eingangsspannung wird mit einem Flyback - Konverter von ca. \SI{12}{\volt} auf \SI{4,2}{\volt}, die Ladespannung der Batterie, angehoben.

the second \SI generates issues (COMMA_PARENTHESIS_WHITESPACE)

Native executable with GraalVM

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

Thank you for the great software. I like this project because the Language Server Protocol is more stable and solid than LanguageTool Protocol. However, I have one suggestion to be a faster startup. We currently have two issues.

  • Downloading Java VM
  • JavaVM startup is slow.

Describe the solution you'd like

A few years ago, Oracle releases the new Java VM called GraalVM, which provide an AOT compiler that compiles .jar file to a native executable. The optimization makes the binary faster magically and also reduces the largest dependency i.e., Java VM because this is the native compilation.

Describe alternatives you've considered

There is another native compilation is known in Java Community but it is not so actively developed. I guess the GraalVM is more stable since the developer is Oracle.

Additional context

I also consider using this language server in my local service. I'd like to reduce external dependencies. You can see a real-world example like clj-kondo.

openJDK Platform binary process runs forever

Describe the bug
After executing ltex-cli.bat on any tex-file the process openJDK Platform binary (=java.exe), which occupies about 800 MB, remains in RAM of Windows 10.

Steps to reproduce

  1. Run the command

ltex-cli.bat <tex file name>

  1. After finishing this command, inspect the running processes by Task Manager
  2. Will be seen that the process openJDK Platform binary, which occupies about 800 MB, still running in background.

Expected behavior
The process openJDK Platform binary (=java.exe) should be stopped after executing ltex-cli.bat <tex file name>

LTeX configuration
Default

Version information

  • Operating system: Windows 10 21H1
  • ltex-ls: 15.0.0
  • Java: Microsoft openJDK 17

Additional context/information
The problem may be solved by manual "killing" java, say, by insetring in the end of ltex-cli.bat the string

taskkill /f /im java.exe > nul

but this is definitely not the good solution since this string kills ALL the instances of running java.exe.

Error when supplying non-object values to `initializationOptions`

Hi, I am trying to create a Emacs plugin for this language server. I am currently getting this error to get the server up and running.

Apr 04, 2021 2:06:22 AM org.bsplines.ltexls.server.LtexLanguageServer initialize
INFO: ltex-ls 10.0.0 - initializing...
Apr 04, 2021 2:06:22 AM org.bsplines.ltexls.server.LtexLanguageServer initialize
WARNING: clientSupportsWorkDoneProgress = true
Apr 04, 2021 2:06:22 AM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError
SEVERE: Internal error: java.lang.reflect.InvocationTargetException
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
	... 11 more
Caused by: java.lang.ClassCastException: class com.google.gson.JsonNull cannot be cast to class com.google.gson.JsonObject (com.google.gson.JsonNull and com.google.gson.JsonObject are in unnamed module of loader 'app')
	at org.bsplines.ltexls.server.LtexLanguageServer.initialize(LtexLanguageServer.java:77)
	... 16 more

Does ltex-ls support neovim local dictionaries?

ltex-ls correctly highlights some words as not spelled correctly. Sometimes, it is wrong and the word is correctly spelled such as a name for example. Neovim spell checker is fine since the weird word is in a spelling file…

ltex-ls has a system for adding multiple spelling errors at the same time but I could not figure out if the bindings are available in neovim. In any case, should we really have to define them twice? In addition, I could not figure how to do it with the neovim binding 😁

How can I configure ltex-ls to pick out the neovim spelling files?

Configure severity per rule

Is your feature request related to a problem? Please describe.
Generally, I prefer to have spelling errors at a 'warning' severity so there is a clear indication that I need to address them.
Also, I really enjoy LanguageTool's suggestions for e.g. passive voice, or hints about quotes, these errors can be distracting while writing. In particular because they appear as equally severe as spelling mistakes.

Describe the solution you'd like
This could be addressed by configuring a 'hint' severity for PASSIVE_VOICE, while having a 'warning' severity for other errors. I can imagine other users have other preferences. Ideally, one can map diagnostic severity levels to rule ids, e.g.

{
    "EN_QUOTES": "information",
    "PASSIVE_VOICE": "hint"
}

This way, while writing, one can ignore particular suggestions until later, while immediately acting upon brainless spelling errors.

Describe alternatives you've considered
Keeping things as they are now, and learn to ignoring the suggestions ;-)

Either way, I really enjoy using language-tool using vscode-ltex, thank you for developing and maintaining these packages!

Non-server command-line interface (CLI)

Hi, I am using your extension to manually correct markdown files and it works great!

I would like to know if there is a way to write a script inside my visual studio project (nodejs + typescript), that could tell for any given markdown filepath if there is an error or not in the file.

Thanks for your response.


Note: Originally posted as issue 317 “How to use this extension programmatically?” at valentjn/vscode-ltex.

ltex-ls always fails the test when initiation

Hi! I have tried online installation and offline installation but both failed. The output is as follows,

2022-04-04T08:28:16.349Z Info: Setting LTeX UI language to 'zh-cn'.
2022-04-04T08:28:16.349Z Info: Loading i18n messages...
2022-04-04T08:28:16.350Z Info: Loading default i18n messages...
2022-04-04T08:28:16.352Z Info:
2022-04-04T08:28:16.352Z Info: ltex.ltex-ls.path not set.
2022-04-04T08:28:16.352Z Info: Searching for ltex-ls in 'c:\Users\userName.vscode\extensions\valentjn.vscode-ltex-13.1.0\lib'...
2022-04-04T08:28:16.352Z Info: ltex-ls found in 'c:\Users\userName.vscode\extensions\valentjn.vscode-ltex-13.1.0\lib\ltex-ls-15.2.0'.
2022-04-04T08:28:16.352Z Info:
2022-04-04T08:28:16.352Z Info: Using ltex-ls from 'c:\Users\userName.vscode\extensions\valentjn.vscode-ltex-13.1.0\lib\ltex-ls-15.2.0'.
2022-04-04T08:28:16.352Z Info: Using Java bundled with ltex-ls as ltex.java.path is not set.
2022-04-04T08:28:16.353Z Info: Testing ltex-ls...
2022-04-04T08:28:16.353Z Info: Command: "c:\Users\userName\.vscode\extensions\valentjn.vscode-ltex-13.1.0\lib\ltex-ls-15.2.0\bin\ltex-ls.bat"
2022-04-04T08:28:16.353Z Info: Arguments: ["--version"]
2022-04-04T08:28:16.353Z Info: env['JAVA_HOME']: undefined
2022-04-04T08:28:16.353Z Info: env['JAVA_OPTS']: "-Xms64m -Xmx512m"
2022-04-04T08:28:16.950Z Error: Test failed.
2022-04-04T08:28:16.950Z Error: Error details:
2022-04-04T08:28:16.950Z Info: ltex-ls did not print expected version information to stdout.
2022-04-04T08:28:16.950Z Info: stdout of ltex-ls:
2022-04-04T08:28:16.950Z Info: Active code page: 65001
2022-04-04T08:28:16.950Z Info: {
2022-04-04T08:28:16.950Z Info: "ltex-ls": "15.2.0",
2022-04-04T08:28:16.950Z Info: "java": "11.0.12"
2022-04-04T08:28:16.950Z Info: }
2022-04-04T08:28:16.950Z Info:
2022-04-04T08:28:16.950Z Info: stderr of ltex-ls:
2022-04-04T08:28:16.950Z Info:
2022-04-04T08:28:16.950Z Info: You might want to try offline installation, see https://valentjn.github.io/vscode-ltex/docs/installation-and-usage.html#offline-installation.

How can I fix this? Thanks a lot!

Wrong underlining of words starting with markup

Describe the bug
When spell checking a word with an accented character at the beginning, typed using a latex command, the initial accented letter is omitted in the rule reporting a misspelled word.

Steps to reproduce
Type the word \v{s}ekki (which is šekki) into a latex document, with spell checking for English enabled and observe that "ekki" gets underlined, but not the entire word.

Expected behavior
Since šekki is not an English word it should be underlined, including the first character

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.

\documentclass{minimal}
\usepackage[T1]{fontenc}

\begin{document}
Šekki Štefancovi\v{c}.
Štefancovi\v{c} šekki.

\v{S}ekki \v{S}tefancovi\v{c}.
\v{S}tefancovi\v{c} \v{s}ekki.
\end{document}

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.
N/A

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

FINE: Checking the following text in language 'en-US' via LanguageTool: " \n\n\u0160ekki \u0160tefancovi\u010D. \u0160tefancovi\u010D \u0161ekki.\n\n\u0160ekki \u0160tefancovi\u010D. \u0160tefancovi\u010D \u0161ekki. "

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

  • Operating system: Windows 10
  • ltex-ls: 12.1.0-alpha1 (built from source)
  • Java: openJDK 11 LTS

Additional context/information

The log appears to show the correct strings are being sent to the server: \u0160 is Š and \u0161 is š. So something is probably going wrong outside of the (new) latex accent command parsing.

Environment option keywords inside square brackets are not ignored (LaTeX)

Describe the bug
Environments with options in square brackets (e.g. \begin{frame}[noframenumbering]) are spell checked, but I think any options inside the brackets (i.e. noframenumbering) should be ignored. There doesn't seem to be a way to ignore the command using ltex.latex.commands or ltex.latex.environments.

Steps to reproduce
Steps to reproduce the behavior:

  1. Create a frame environment and pass an option keyword which is not an actual word. For example, \begin{frame}[noframenumbering].
  2. Verify that ltex doesn't ignore the environment option keyword: image

Expected behavior
Option keywords in square brackets should be ignored.

Sample document
Minimal working example:

\documentclass{beamer}
\begin{document}
    \begin{frame}[noframenumbering]
        Foo
    \end{frame}
\end{document}

image

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.

{
    "ltex.latex.commands": {
        // Default commands
        "\\label{}": "ignore",
        "\\documentclass[]{}": "ignore",
        "\\cite{}": "dummy",
        "\\cite[]{}": "dummy",
        // Preamble commands
        "\\author{}": "ignore",
        // Beamer commands
        "\\setbeamertemplate{}{}": "ignore",
        "\\addtobeamertemplate{}{}{}": "ignore",
        "\\beamerbutton{}": "default",
        "\\hyperlink{}": "ignore"
    },
    "ltex.latex.environments": {
        // Default environments
        "lstlisting": "ignore",
        "verbatim": "ignore"
    }
}

LTeX LS log

[Info  - 6:01:59 PM] Starting ltex-ls...
Apr 01, 2022 6:02:04 PM org.bsplines.ltexls.server.LtexLanguageServer initialize
INFO: ltex-ls 15.2.0 - initializing...
Apr 01, 2022 6:02:04 PM org.bsplines.ltexls.tools.I18n setLocale
INFO: Setting locale to 'en'
Apr 01, 2022 6:02:04 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: " [noframenumbering] Foo "
Apr 01, 2022 6:02:06 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 1 rule match

Version information

  • Operating system: macOS 12.3
  • ltex-ls: 15.2.0
  • Java: I don't have Java installed, so ltex is using whatever Java it comes bundled with

Additional context/information
None

Sublime Text: Port works only on small examples

Hey,
I created a Sublime Text Plugin LDAP/LSP-ltex-ls which is using the LSP client plugin and your language server to provide language checking for latex and markdown in Sublime Text.

It is already working for little examples:
grafik

But it stuggles with only little more complex examples like:

%!TEX root = ../proposal.tex

This is an \textbf{test}.

% LTeX: language=de-DE
Das ist eine \textbf{Test}.

Das is eine falsche Satz.

In this case the Server does not send any textDocument/publishDiagnostics.
I attached the log for the above example.

lsp.log

--> outgoing request (to the LS)
<-- incoming request (to us)
-> outgoing notification
<- incoming notification
<<< incoming response to some previous outgoing request
>>> outgoing response to some previous incoming request
~~> outgoing error response to some previous incoming request
<~~ incoming error response to some previous outgoing request


The currently supported LSP capabilities in sublime can be found here. I implemented the extensions for progress and workspaceSpecificConfiguration.


I observed, as soon as I correct any spelling mistakes myself (above is -> ist) the grammar check begins to work again.


This may be unrelated but I got this message from time to time:

:: <~~ ltex-ls 31: {'message': 'Internal error.', 'data': "java.util.concurrent.CompletionException: java.lang.NoSuchMethodError: 'java.util.List org.languagetool.markup.AnnotatedText.getMapping()'\r\n\tat java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)\r\n\tat java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)\r\n\tat java.base/java.util.concurrent.CompletableFuture.biApply(CompletableFuture.java:1309)\r\n\tat java.base/java.util.concurrent.CompletableFuture$BiApply.tryFire(CompletableFuture.java:1276)\r\n\tat java.base/java.util.concurrent.CompletableFuture$CoCompletion.tryFire(CompletableFuture.java:1215)\r\n\tat java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)\r\n\tat java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2137)\r\n\tat org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:212)\r\n\tat org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:193)\r\n\tat org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)\r\n\tat org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)\r\n\tat org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)\r\n\tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)\r\n\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\r\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)\r\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)\r\n\tat java.base/java.lang.Thread.run(Thread.java:832)\r\nCaused by: java.lang.NoSuchMethodError: 'java.util.List org.languagetool.markup.AnnotatedText.getMapping()'\r\n\tat org.bsplines.ltexls.parsing.AnnotatedTextFragment.getSubstringOfPlainText(AnnotatedTextFragment.java:41)\r\n\tat org.bsplines.ltexls.languagetool.LanguageToolRuleMatch.<init>(LanguageToolRuleMatch.java:47)\r\n\tat org.bsplines.ltexls.languagetool.LanguageToolRuleMatch.<init>(LanguageToolRuleMatch.java:30)\r\n\tat org.bsplines.ltexls.languagetool.LanguageToolJavaInterface.check(LanguageToolJavaInterface.java:154)\r\n\tat org.bsplines.ltexls.server.DocumentChecker.checkAnnotatedTextFragment(DocumentChecker.java:131)\r\n\tat org.bsplines.ltexls.server.DocumentChecker.checkAnnotatedTextFragments(DocumentChecker.java:67)\r\n\tat org.bsplines.ltexls.server.DocumentChecker.check(DocumentChecker.java:194)\r\n\tat org.bsplines.ltexls.server.LtexTextDocumentItem.lambda$check$2(LtexTextDocumentItem.java:422)\r\n\tat java.base/java.util.concurrent.CompletableFuture.biApply(CompletableFuture.java:1307)\r\n\t... 14 more\r\n", 'code': -32603}

Ignore commented lines for `gitcommit` filetype

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

I love ltex-ls, especially when writing git commit messages as it picks up on grammatical mistakes when spell checking that simple spellchecking would miss.

Right now, it appears the server sends diagnostics for the commented lines pre-populated in the commit messages template:
image

Describe the solution you'd like
Ignore the commented lines (or silence diagnostics for them).

Describe alternatives you've considered
This could hypothetically be implemented client side as well, but I thought I would raise the issue :

NullPointerException when language-tool is uninitialized

When language-tool is not initialized (for example when a configured language can not be found) the following exception will occur:

Sep 16, 2019 10:34:33 AM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError
SEVERE: Internal error: java.lang.reflect.InvocationTargetException
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
	... 11 more
Caused by: java.lang.NullPointerException
	at LanguageToolLanguageServer$1.codeAction(LanguageToolLanguageServer.java:264)
	... 16 more

This is caused by validateDocument returning a Pair with null values.
https://github.com/valentjn/languagetool-languageserver/blob/6cbd92e7d76db2bff589ff57ae3903d36e6e5012/src/main/java/LanguageToolLanguageServer.java#L411

The codeAction method then tries to use this down the line without a check:
https://github.com/valentjn/languagetool-languageserver/blob/6cbd92e7d76db2bff589ff57ae3903d36e6e5012/src/main/java/LanguageToolLanguageServer.java#L264

Add support for AsciiDoc

Is your feature request related to a problem? Please describe.
I want to be able to spell check AsciiDoc documents, which are similar to Markdown but with slightly other syntax and more complex features for books.

Describe the solution you'd like
Full support for AsciiDoc (language identifier 'asciidoc'). Language specification and information here: https://asciidoc.org/

Support for editors other than VSCode

Is your feature request related to a problem? Please describe.
Currently, code actions like Add "..." to dictionary or Disable rule work only in VSCode, as their behavior depends on VSCode setting modification. It will be nicer if it can delegate the responsibility of modifying the setting to clients so that those actions work with other editors, e.g., Emacs.

Describe the solution you'd like
Delegating the responsibility of modifying the setting to clients if possible. (Though this requires some client update too)

Describe alternatives you've considered

Additional context
I'm using LSP-mode on Emacs with lsp-ltex.

Strikethrough support in Markdown

Describe the bug
A clear and concise description of what the bug is.

Steps to reproduce
Steps to reproduce the behavior:

  1. Write any strikethrough text, as in strikethrough (~~strikethrough~~).

Expected behavior
A clear and concise description of what you expected to happen.

Even though not present in the original Markdown and CommonMark, it's present in many well-known variants like GitHub Flavored Markdown, etc. It would be nice to have support for it instead of it being picked as a spelling mistake.

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.

# markmap

## Links

- <https://markmap.js.org/>
- [GitHub](https://github.com/gera2ld/markmap)

## Related

- [coc-markmap](https://github.com/gera2ld/coc-markmap)
- [gatsby-remark-markmap](https://github.com/gera2ld/gatsby-remark-markmap)

## Features

- links
- **inline** ~~text~~ *styles*
- multiline
  text
- `inline code`
-
  ```js
  console.log('code block');
  ```
- KaTeX - $x = {-b \pm \sqrt{b^2-4ac} \over 2a}$

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.

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

[Info  - 9:04:54 PM] Starting ltex-ls...
Nov 14, 2021 9:04:56 PM org.bsplines.ltexls.server.LtexLanguageServer initialize
INFO: ltex-ls 15.0.0 - initializing...
Nov 14, 2021 9:04:56 PM org.bsplines.ltexls.tools.I18n setLocale
INFO: Setting locale to ''
Nov 14, 2021 9:04:56 PM org.bsplines.ltexls.settings.SettingsManager$Companion logDifferentSettings
FINE: Reinitializing LanguageTool due to different settings for language 'en-US': setting 'additionalRules.languageModel', old '', new '/home/francisco/Downloads/ngrams'
Nov 14, 2021 9:04:57 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: "markmap\n\nLinks\n\nDummy0\nGitHub\n\nRelated\n\ncoc-markmap\ngatsby-remark-markmap\n\nFeatures\n\nlinks\ninline ~~"... (truncated to 100 characters)
Nov 14, 2021 9:04:58 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 5 rule matches
Nov 14, 2021 9:10:21 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: "markmap\n\nLinks\n\nDummy0\nGitHub\n\nRelated\n\ncoc-markmap\ngatsby-remark-markmap\n\nFeatures\n\nlinks\ninline ~~"... (truncated to 100 characters)
Nov 14, 2021 9:10:21 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 5 rule matches
Nov 14, 2021 9:10:23 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked
FINE: Checking the following text in language 'en-US' via LanguageTool: "markmap\n\nLinks\n\nDummy0\nGitHub\n\nRelated\n\ncoc-markmap\ngatsby-remark-markmap\n\nFeatures\n\nlinks\ninline ~~"... (truncated to 100 characters)
Nov 14, 2021 9:10:23 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment
FINE: Obtained 5 rule matches

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

  • Operating system: Arch Linux
  • ltex-ls: 15.0.0
  • Java: "Using Java bundled with ltex-ls as ltex.java.path is not set."

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

gif-2021-11-15-183231

Saving settings on other editors fails

Describe the bug
Saving settings on other editors fails

Steps to reproduce
Use any code action that modifies user settings

Expected behavior
Actually not sure - is there any specification in the LSP?

Actual behavior
ltex-ls responds with false

Connected to LDAP/LSP-ltex-ls#3

support for ConTeXt markup

Hello,

how hard/easy would be to add support for ConTeXt markup which is quite nice alternative for LaTeX?

I'm aware that there is one extension available for ConTeXt, but wonder if it can of some help, although I'm more inclined to use vim/SublimeText?

Asciidoctor support

It would be awesome to have support for asciidoctor as a format, the same way as we already have it for markdown or org mode. It's somewhat similar to org in the sense that it's richer than markdown, but not as complex as latex.

Use serverInitiatedProgress instead of custom notifications

Is your feature request related to a problem? Please describe.
ltex-ls is using custom notifications for progress reporting.

Describe the solution you'd like
Replace it with the standard server initiated progress scheme of the LSP specification.
See microsoft/pyright#1268 for a analog discussion

ltex/progress, with progress 0.0 --> window/workDoneProgress/create + $/progress with kind begin
ltex/progress, with progress 1.0 --> $/progress with kind end

Additional context
Simplifies integration with non vscode-ltex clients.

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.