You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had originally posted this error on the vim-language-server issue, and the author of that projected directed me to vim-vmlparser. Here's my original post:
Describe the bug
I'm not sure why this error is being thrown, it seems to be throwing an error at a specific point and I don't understand why. I have a long regex pattern which is designed to match a timestamp string (%Y-%m-%d %H:%M:%S), and a negation to flag invalid timestamps as errors. The syntax line in question:
Here's an example log file the syntax file highlights: example.log
This file loads successfully, vim doesn't make a similar complaint when applying the syntax highlighting to my log file.
To Reproduce
Steps to reproduce the behavior:
Rename timetracker.txt to timetracker.vim, and ensure vim-language-server parses the file
On errTimestamp line, vim-language-server throws an error.
At first I thought it might be too many capture groups, but I replaced all the nested \(...\) with \%(...\). An interesting thing about this, the character it highlights is the last character of the visual line before it line wraps, or the last visible character of the line with :set nowrap set.
Expected behavior
I don't expect vim to show an error on this line, not when vim itself can parse this line correctly (and not throw an error).
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
I had originally posted this error on the vim-language-server issue, and the author of that projected directed me to vim-vmlparser. Here's my original post:
Describe the bug
I'm not sure why this error is being thrown, it seems to be throwing an error at a specific point and I don't understand why. I have a long regex pattern which is designed to match a timestamp string (
%Y-%m-%d %H:%M:%S
), and a negation to flag invalid timestamps as errors. Thesyntax
line in question:It generates the following error:
I have vim-language-parser installed using vim-lsp (which itself is installed via vim-plug)
Here's a screenshot of the error:
Here's the full copy of my syntax file:
timetracker.txt
Here's an example log file the syntax file highlights:
example.log
This file loads successfully, vim doesn't make a similar complaint when applying the syntax highlighting to my log file.
To Reproduce
Steps to reproduce the behavior:
At first I thought it might be too many capture groups, but I replaced all the nested
\(...\)
with\%(...\)
. An interesting thing about this, the character it highlights is the last character of the visual line before it line wraps, or the last visible character of the line with:set nowrap
set.Expected behavior
I don't expect vim to show an error on this line, not when vim itself can parse this line correctly (and not throw an error).
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Log:
Not sure how to capture logs from vim-language-server. enabling logging in vim-lsp doesn't appear to log the error.
The text was updated successfully, but these errors were encountered: