James-Yu / LaTeX-Workshop

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

Highlight error of `\%` in `.bib` file #3908

Closed TheAnsIs42 closed 1 year ago

TheAnsIs42 commented 1 year 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:Windows 11 [e.g. Windows 10]
  • Visual Studio Code Version: 1.78.2 [e.g. 1.41.0]
  • LaTeX Workshop Version: 9.11.4 [e.g. 8.5.0]
  • TeX Distribution Version: TeXLive 2023 [e.g. TeX Live 2019 / MiKTeX 2.9.7250]

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.

  • I am using XXX whose version is YY.ZZ

The Issue*

Please briefly describe the issue you come across.

  • the content after \% still highlighted as comment in bibtex file

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.


[18:05:35][Logger] New log placeholder %WS1% registered for c:\Users\fushe\Desktop\ .
[18:05:35][Config] latex-workshop.latex.recipe.default: "lastUsed" .
[18:05:35][Config] latex-workshop.latex.autoBuild.cleanAndRetry.enabled: false .
[18:05:35][Config] latex-workshop.view.pdf.tab.editorGroup: "below" .
[18:05:35][Manager] Set $LATEXWORKSHOP_DOCKER_LATEX: ""
[18:05:35][Server] Creating LaTeX Workshop http and websocket server.
[18:05:35][Server] Server successfully started: {"address":"127.0.0.1","family":"IPv4","port":49601} .
[18:05:35][Extension] Initializing LaTeX Workshop.
[18:05:35][Extension] Extension root: c:\Users\fushe\.vscode\extensions\james-yu.latex-workshop-9.11.4
[18:05:35][Extension] $PATH: C:\Program Files\Microsoft MPI\Bin\;C:\Program Files (x86)\IntelSWToolsMPI\compilers_and_libraries_2020.4.321\windows\mpi\intel64\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\MATLAB\R2023a\bin;C:\Program Files\starship\bin\;C:\Program Files\Git\cmd;C:\Users\fushe\AppData\Local\Microsoft\WindowsApps;;C:\Users\fushe\AppData\Local\Programs\oh-my-posh\bin;C:\Users\fushe\AppData\Local\Programs\Microsoft VS Code\bin;C:\texlive\2023\bin\windows
[18:05:35][Extension] $SHELL: undefined
[18:05:35][Extension] $LANG: undefined
[18:05:35][Extension] $LC_ALL: undefined
[18:05:35][Extension] process.platform: win32
[18:05:35][Extension] process.arch: x64
[18:05:35][Extension] vscode.env.appName: Visual Studio Code
[18:05:35][Extension] vscode.env.remoteName: undefined
[18:05:35][Extension] vscode.env.uiKind: 1
[18:05:35][Extension] LaTeX Workshop initialized.
[18:05:35][Format][Bib] Bibtex format config: {"tab":"  ","case":"lowercase","left":"{","right":"}","trailingComma":false,"sort":["key"],"alignOnEqual":true,"sortFields":false,"fieldsOrder":[],"firstEntries":["string","xdata"]}
[18:05:35][Extension] Trigger characters for intellisense of LaTeX documents: ["\\",",","{"]
[18:05:35][Manager] Current workspace folders: ["file:///c:/Users/fushe/Desktop"]
[18:05:35][Manager] The active document cannot be used as the root file: untitled:Untitled-1
[18:05:35][Manager] Current workspaceRootDir: file:///c:/Users/fushe/Desktop/
[18:05:35][Server] valdOrigin is http://127.0.0.1:49601
[18:05:35][Structure][BibTeX] Parse active BibTeX document for AST.
[18:05:35][Event] ROOT_FILE_SEARCHED
[18:05:35][Structure][BibTeX] Parsed 0 AST items.
[18:05:35][Structure] Structure updated with 0 entries for Untitled-1 .
[18:05:35][Event] STRUCTURE_UPDATED
[18:08:23][Structure][BibTeX] Parse active BibTeX document for AST.
[18:08:23][Structure][BibTeX] Parsed 1 AST items.
[18:08:23][Structure] Structure updated with 1 entries for Untitled-1 .
[18:08:23][Event] STRUCTURE_UPDATED
[18:11:50][Commander] SHOWLOG command invoked: compiler
[18:11:57][Structure] Structure updated with 1 entries for Untitled-1 .
[18:11:57][Event] STRUCTURE_UPDATED

### 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`._

Overwriting grammar scope name to file mapping for scope text.tex. Old grammar file: file:///c%3A/Users/fushe/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/TeX.tmLanguage.json. New grammar file: file:///c%3A/Users/fushe/.vscode/extensions/james-yu.latex-workshop-9.11.4/syntax/TeX.tmLanguage.json register @ workbench.desktop.main.js:1842 workbench.desktop.main.js:1842 Overwriting grammar scope name to file mapping for scope text.tex.latex. Old grammar file: file:///c%3A/Users/fushe/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/LaTeX.tmLanguage.json. New grammar file: file:///c%3A/Users/fushe/.vscode/extensions/james-yu.latex-workshop-9.11.4/syntax/LaTeX.tmLanguage.json register @ workbench.desktop.main.js:1842 workbench.desktop.main.js:1842 Overwriting grammar scope name to file mapping for scope text.bibtex. Old grammar file: file:///c%3A/Users/fushe/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/Bibtex.tmLanguage.json. New grammar file: file:///c%3A/Users/fushe/.vscode/extensions/james-yu.latex-workshop-9.11.4/syntax/Bibtex.tmLanguage.json register @ workbench.desktop.main.js:1842 workbench.desktop.main.js:1842 Overwriting grammar scope name to file mapping for scope text.tex.markdown_latex_combined. Old grammar file: file:///c%3A/Users/fushe/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/markdown-latex-combined.tmLanguage.json. New grammar file: file:///c%3A/Users/fushe/.vscode/extensions/james-yu.latex-workshop-9.11.4/syntax/markdown-latex-combined.tmLanguage.json register @ workbench.desktop.main.js:1842 workbench.desktop.main.js:1842 Overwriting grammar scope name to file mapping for scope source.cpp.embedded.latex. Old grammar file: file:///c%3A/Users/fushe/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/cpp-grammar-bailout.tmLanguage.json. New grammar file: file:///c%3A/Users/fushe/.vscode/extensions/james-yu.latex-workshop-9.11.4/syntax/cpp-grammar-bailout.tmLanguage.json register @ workbench.desktop.main.js:1842 DevTools failed to load source map: Could not load content for https://ticino.blob.core.windows.net/sourcemaps/b3e4e68a0bc097f0ae7907b217c1119af9e03435/node_modules/@vscode/vscode-languagedetection/dist/lib/index.js.map: Fetch through target failed: Target not supported; Fallback: Unknown error DevTools failed to load source map: Could not load content for https://ticino.blob.core.windows.net/sourcemaps/b3e4e68a0bc097f0ae7907b217c1119af9e03435/core/vs/workbench/workbench.desktop.main.js.map: Load canceled due to load timeout



## Anything Else?
> _Add any other context about the problem below._
- screenshot:
![image](https://github.com/James-Yu/LaTeX-Workshop/assets/44214674/b5b5d1cb-c4d6-4eff-9ce1-1b165766fa18)
jlelong commented 1 year ago

Thank you for filing this issue! We have outsourced our LaTeX syntax highlighting grammar to vscode-latex-basics, so we have moved the issue to that repository: