valentjn / ltex-ls

LTeX Language Server: LSP language server for LanguageTool :mag::heavy_check_mark: with support for LaTeX :mortar_board:, Markdown :pencil:, and others
https://valentjn.github.io/ltex
Mozilla Public License 2.0
786 stars 38 forks source link

Ltex crashing after using math delimiters $$ #143

Open tiagovla opened 2 years ago

tiagovla commented 2 years ago

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 = }, textDocument = { uri = "file:///home/tiagovla/test/hello.tex" }} 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 =
}, 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" }} 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" }} 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" }} 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" }} 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" }} 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)): Teset errado Ina0. \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)): Teset errado Ina0. \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: HUNSPELL_RULE:13-16:Encontrado possível erro de ortografia.\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 =
}, textDocument = { uri = "file:///home/tiagovla/test/hello.tex" }} 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 =
}, 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.

sfo commented 2 years ago

Removing the babel package will cause the language detection to default to English. In this case, you get the message info: 'Teset': Possible spelling mistake found. [MORFOLOGIK_RULE_EN_US]. Adding the babel package sets the language accordingly, causing the document to contain no spelling mistakes. Removing the math expression triggers an orthographic error (info: 'Teset': Encontrado possível erro de ortografia. [HUNSPELL_RULE]).

Therefore (and for some additional tests I performed to verify my assumption) I assume that this error seems to occur every time, the language check passes successfully without anything to report.

Check out this MWE:

\documentclass{article}                                                                                                                                                                                                                                                                                                 
\begin{document}
Hello, World!
\end{document}

Then run ltex-cli mwe_en.tex and see the result:

Aug 01, 2022 12:49:14 PM 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(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.io.IOException: Stream closed
    at java.base/java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:176)
    at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:275)
    at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:79)
    ... 7 more
igorlfs commented 1 year ago

Hey @valentjn, could you have another look at this issue? Currently, it's impossible to ltex with Portuguese.

Thanks!