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

VSCode 1.36 breaks syntax highlighting with minted environments #1476

Closed
autinerd opened this issue Jul 4, 2019 · 3 comments
Closed

VSCode 1.36 breaks syntax highlighting with minted environments #1476

autinerd opened this issue Jul 4, 2019 · 3 comments
Labels
external issue Issue with something else than LaTeX-Wokshop vscode issue Issue related to VSCode itself

Comments

@autinerd
Copy link

autinerd commented Jul 4, 2019

Disable all the other extensions except for LaTeX Workshop, and check that you still see this issue. [Required]

You still see this issue?: Yes

Make sure to visit the wiki FAQ before filling an issue.

Describe the bug [Required]
When using a minted environment, the syntax highlighting after the code inside the minted environment doesn't work properly. It still uses the first one for all next minted environments, and LaTeX syntax highlighting doesn't work properly at all (numbers and the word before and after a period are highlighted)

To Reproduce
Steps to reproduce the behavior:
Insert a minted environment into the document.
Examples:

\begin{listing}[htbp]
    \begin{minted}{python}
def main():
    return [test for test in range(3)]
    \end{minted}
\end{listing}

\begin{listing}[htbp]
    \begin{minted}{c}
struct test {
int test2;
int test3;
int test4;
}
    \end{minted}
\end{listing}
This is a test sentence. Here is a number: 39

Expected behavior
Everything works like it did in VSCode 1.35

Logs [Required]
No messages in both logs, which can say anything about it.

Screenshots
Test 1
Test 2

Desktop [Required]:

  • OS: Linux Mint
  • VS Code version: 1.36
  • Extension version: 7.0.2

Additional context
With 1.35 everything was fine.

@jlelong
Copy link
Collaborator

jlelong commented Jul 4, 2019

This issue appears only with c and cpp, so I think it is a bug in the C/C++ grammar. Using java code works fine

\begin{listing}[htbp]
    \begin{minted}{python}
def main():
    return [test for test in range(3)]
    \end{minted}
\end{listing}

\begin{listing}[htbp]
    \begin{minted}{java}
class test {
int test2;
int test3;
int test4;
}
    \end{minted}
\end{listing}
This is a test sentence. Here is a number: 39

I think a bug report should be filled against vscode repo microsoft/vscode/issues/76603

@autinerd
Copy link
Author

autinerd commented Jul 5, 2019

Thank you very much! I have now as a workaround like you did in your initial post in the vscode issue changed the LaTeX.plist from source.cpp to source.c, because I'm only using C code and the LaTeX syntax highlighting is more important to me.

But glad to know that it's not the fault from LaTeX-Workshop!

@jlelong
Copy link
Collaborator

jlelong commented Jul 6, 2019

We cannot do much on the extension side. As I understand from microsoft/vscode/issues/76603, it will be fixed in the next release of VSCode.

@jlelong jlelong added the external issue Issue with something else than LaTeX-Wokshop label Jul 6, 2019
@jlelong jlelong closed this as completed Jul 6, 2019
@jlelong jlelong added the vscode issue Issue related to VSCode itself label Jul 12, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
external issue Issue with something else than LaTeX-Wokshop vscode issue Issue related to VSCode itself
Projects
None yet
Development

No branches or pull requests

2 participants