James-Yu / LaTeX-Workshop

Boost LaTeX typesetting efficiency with preview, compile, autocomplete, colorize, and more.
MIT License
10.47k stars 519 forks source link

LaTeX3 syntax highlight fails in environments #4240

Closed SwitWu closed 3 months ago

SwitWu commented 3 months ago

Please fill the following fields with a star (*) and provide as much related information as possible.

Pre-checks*

Please change the following [ ] to [x] for confirmation.

  • [x] The issue has not been reported in this repository.
  • [x] The issue remains after disabling all other extensions and restarting Visual Studio Code.
  • [x] The FAQ cannot address the issue.
  • [x] The issue is not related to compiling a document, or the document can be successfully compiled in the OS terminal but not in Visual Studio Code with this extension.

Environment*

Please write exact version numbers instead of descriptors such as latest.

  • Operating System: [macOS Sonoma 14.4.1]
  • Visual Studio Code Version: [1.88.1 (Universal)]
  • LaTeX Workshop Version: [latest]
  • TeX Distribution Version: [TeX Live 2024]

Please list the environment and version number if you are using VSCodium, Snap or Flatpack versions of Visual Studio Code, and/or Visual Studio Code Remote Containers/SSH/WSL.

The Issue*

Please briefly describe the issue you come across.

LaTeX3/expl3 syntax highlight fails in environments.

Reproduction Steps

Please list out the steps to reproduce your bug. Include relevant environmental variables or any other configuration.

  1. creates a.cls
  2. add the code
    \int_case:nn
    \begin{center}
    \int_case:nn
    \end{center}
  3. The result is image

Expected Behavior

What were you expecting to see? Include any relevant examples or documentation links.

I expect the \int_case:nn in center has the right highlight as that out of center.

Logs

LaTeX Workshop Output*

Please paste the whole log messages below, not parts of ones. The log should start with New log placeholder %WS1% registered.

[Paste the log here. Do not remove the surrounding backquotes (`).]

Developer Tools Console

Please paste the whole log messages below, not parts of ones. This console logs can sometimes be very important in many cases. To access the log, click Help -> Toggle Developer Tools -> Console.

[Paste the log here. Do not remove the surrounding backquotes (`).]

Anything Else?

Add any other context about the problem below.

James-Yu commented 3 months ago

Thank you for filing this issue. We have outsourced our LaTeX syntax highlighting grammar to vscode-latex-basics, could you please post your issue there?