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

[BUG] TreeSitter compatability for LaTeX environments broken #329

Open
average-sphere-spectrum-enjoyer opened this issue Apr 5, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@average-sphere-spectrum-enjoyer

Describe the bug

Commit 99ddf57 of nvim-treesitter breaks the coloring of the "environments" in LaTeX. To reproduce the bug:

  1. Use a commit of nvim-treesitter newer than 99ddf57.
  2. Open a .tex file with \begin{environment} ... \end{environment}

An example could be the file bug.tex:

\begin{document}

hello world

\end{document}

It currently looks like (with transparent background):
incorrect

Expected behaviour

It should look something like this (this is what it looks like when using the parent commit of 99ddf57 - again, with transparent background):

correct

This has quite a big influence on the UX as one uses environments in LaTeX constantly. For a "bigger" example see the correct:
correct-full
and incorrect:
incorrect-full

Screenshots

It should work as..

@average-sphere-spectrum-enjoyer
Copy link
Author

Reading the commit message we get "Language-specific subcaptures should instead be added in user config or
a custom language plugin".
I don't know how treesitter and colorschemes work, but I guess it should be possible to simply copy the earlier @markup.environment to some builtin version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants