Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird highlighting with LaTeX #89

Closed
frangkli opened this issue Apr 19, 2020 · 3 comments
Closed

Weird highlighting with LaTeX #89

frangkli opened this issue Apr 19, 2020 · 3 comments

Comments

@frangkli
Copy link

I just installed this plugin and tried it in my latex file. The grammar check works wonderfully but the underline and highlighting of mistakes seem to be off. The space before the word is highlighted and underlined while the last character of the word is not highlighted nor underlined.

Illustration: _lorem
Expected: lorem
(Bold means highlighted and underlined)

I was thinking this might be a problem with conceal or specifically tex conceal? Any ideas for fix?

@matze-dd
Copy link
Contributor

matze-dd commented Apr 20, 2020

I encounter a possibly related issue with German texts containing German "Umlauts" like 'Ä'.
It seems to me that there is a problem with UTF-8 encoded (or other non-ASCII) texts, since byte and character offsets may differ in this case.
If a line contains a non-ASCII character in the part before the spelling error, highlighting of the error is shifted.

PS. When editing LaTeX files, YaLafi (see section on Vim) might be interesting.

@frangkli
Copy link
Author

If a line contains a non-ASCII character in the part before the spelling error, highlighting of the error is shifted.

Yeah that might be it because I had directional quotes (not " but double quotes with directions like what is rendered in latex with `` and '') which could have caused the problem.

@matze-dd
Copy link
Contributor

matze-dd commented May 4, 2020

The alternative plugin [vim-LanguageTool] does not exhibit this problem. However, you cannot continue editing while LanguageTool is running.
Interestingly, [ALE] that focuses on asynchronous checks and also has a LanguageTool interface, seems to know the same issue as vim-grammarous.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants