LTeX Language Server: LSP language server for LanguageTool :mag::heavy_check_mark: with support for LaTeX :mortar_board:, Markdown :pencil:, and others
If there is no space or tab before the comment body after the start of a line comment, lineCommentRegexString will not recognize it as a comment.
Example in Lua:
I checked in lua, typescript, javascript and rust: similarly, without a space the comment is not recognized. I think the problem #259 is also due to the missing space.
Steps to reproduce
Open new .lua file;
Write comment with typo;
Delete whitespace between -- and comment body;
The diagnostic message disappears.
Expected behavior
A comment without whitespace will be recognizing correctly.
Describe the bug
If there is no space or tab before the comment body after the start of a line comment,
lineCommentRegexString
will not recognize it as a comment.Example in Lua:
I checked in lua, typescript, javascript and rust: similarly, without a space the comment is not recognized. I think the problem #259 is also due to the missing space.
Steps to reproduce
.lua
file;--
and comment body;Expected behavior
A comment without whitespace will be recognizing correctly.
LTeX configuration
This is for Neovim with
lspconfig
:Version information
Additional context/information
I think the fixes are needed in this line: https://github.com/valentjn/ltex-ls/blob/7c031d792110a824951aa003acd3ada158a515b4/src/main/kotlin/org/bsplines/ltexls/parsing/program/ProgramCommentRegexs.kt#L30
Something like this: