James-Yu / LaTeX-Workshop

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

If you type `\\`, suggestions may be displayed #3083

Closed Yarakashi-Kikohshi closed 2 years ago

Yarakashi-Kikohshi commented 2 years ago

I checked issues, but I couldn't find a similar report. This issue about IntelliSense feature, so compilation is not relevant.

Seems to be Bug.

If you type \\, suggestions may be displayed

Type \\ to see the suggestions, as shown below.

doubleBackSlash

No such suggestions are needed when typing \\. It's a little stressful to turn off the display each time.

However, even if you place the cursor on the right side of \\ and push Ctrl+Space, the suggestions is not displayed.

doubleBackSlash2

「候補はありません」 means "There are no candidates" in Japanese.

To reproduce

I wasn't sure how to reproduce it. This issue may or may not occur without disabling extensions other than LaTeX Workshop. But I couldn't see the suggestions appearing when I disabled other extensions than LaTeX Workshop. (By chance?) I couldn't examine in detail the difference between when the suggestions was displayed and when it wasn't.

What I tried

At first, I thought it was due to interference with one particular extension. However, I was able to see the suggestion appearing when used with one of installed extensions. Any extensions.

I repeated the following operations:

  1. Developer: Reload Window
  2. Type \\
  3. Check if the suggestion is displayed
  4. Repeat steps 1 to 3 about 3 times
  5. Disable one extension and enable another
  6. Go to 1

I conclude that it is an accidental phenomenon, not an interference with any of the extensions. Of course, I cannot deny that this conclusion may be wrong.

Expected behavior

Don't show any suggestions when typing \\. (always)

Settings

Suggestions does not impose settings for global settings. Only for each language.

Each language settings
```jsonc "[latex]": { "editor.wordWrap": "on", "editor.wordSeparators": "./\\()\"'-:,.;<>~!@#$%^&*|+=[]{}`~?.。,、?!()「」[]{}《》てにをはがのともへでや", "files.trimTrailingWhitespace": true, "editor.tabSize": 2, "editor.insertSpaces": true, "editor.detectIndentation": false, "editor.autoIndent": "full", "editor.scrollBeyondLastLine": false, "editor.padding.bottom": 250, "editor.suggestSelection": "recentlyUsedByPrefix", "editor.acceptSuggestionOnEnter": "on", "editor.tabCompletion": "off", "editor.quickSuggestions": { "other": true, "comments": false, "strings": false }, "editor.suggest.snippetsPreventQuickSuggestions": false, // "editor.suggest.showKeywords": false, "editor.suggest.showWords": true, "editor.formatOnSave": false, "editor.defaultFormatter": "James-Yu.latex-workshop", "editor.unicodeHighlight.ambiguousCharacters": true, "editor.unicodeHighlight.invisibleCharacters": true, "editor.unicodeHighlight.nonBasicASCII": "inUntrustedWorkspace", "editor.unicodeHighlight.allowedCharacters": { ",": true, ".": true, "!": true, "?": true, "[": true, "]": true, "{": true, "}": true, "<": true, ">": true, }, }, ```

Logs

Show the logs with and without suggestions are displayed.

Some user names are in hidden letters.

LaTeX Workshop Output

Output (suggestions are displayed)
``` [18:49:33] Initializing LaTeX Workshop. [18:49:33] Extension root: c:\Users\■■■\.vscode\extensions\james-yu.latex-workshop-8.23.0 [18:49:33] $PATH: C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Program Files\Git\usr\bin;C:\Program Files\dotnet\;C:\bin\nodejs\;D:\node_global;C:\Users\■■■\AppData\Local\Microsoft\WindowsApps;C:\bin\VSCode-x64\bin;C:\MinGW\bin;D:\texlive\2021\bin\win32;C:\Users\■■■\AppData\Roaming\npm [18:49:33] $SHELL: undefined [18:49:33] vscode.env.appName: Visual Studio Code [18:49:33] vscode.env.remoteName: undefined [18:49:33] vscode.env.uiKind: 1 [18:49:33] editor.acceptSuggestionOnEnter: "on" [18:49:33] latex-workshop.bind.enter.key: true [18:49:33] latex-workshop.docker.enabled: false [18:49:33] latex-workshop.docker.image.latex: "" [18:49:33] latex-workshop.hover.preview.mathjax.extensions: [ "boldsymbol", "mathtools", "empheq" ] [18:49:33] latex-workshop.intellisense.package.enabled: true [18:49:33] latex-workshop.intellisense.update.aggressive.enabled: false [18:49:33] latex-workshop.intellisense.update.delay: 1000 [18:49:33] latex-workshop.latex.autoBuild.run: "never" [18:49:33] latex-workshop.latex.outDir: "%DIR%" [18:49:33] latex-workshop.latex.recipes: [ { "name": "#LuaLaTeX: 1 time test Build", "tools": [ "lualatex" ] } ] [18:49:33] latex-workshop.latex.tools: [ { "name": "lualatex", "command": "lualatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOC%" ] } ] [18:49:33] latex-workshop.viewer.pdf.internal.keyboardEvent: "auto" [18:49:33] Creating a new file watcher. [18:49:33] watcherOptions: {"useFsEvents":false,"usePolling":false,"interval":300,"binaryInterval":1000,"awaitWriteFinish":{"stabilityThreshold":250}} [18:49:33] Creating PDF file watcher. [18:49:33] watcherOptions: {"useFsEvents":false,"usePolling":false,"interval":300,"binaryInterval":1000,"awaitWriteFinish":{}} [18:49:33] Creating Bib file watcher. [18:49:33] watcherOptions: {"useFsEvents":false,"usePolling":false,"interval":300,"binaryInterval":1000,"awaitWriteFinish":{"stabilityThreshold":250}} [18:49:33] Set $LATEXWORKSHOP_DOCKER_LATEX: "" [18:49:34] [Server] Creating LaTeX Workshop http and websocket server. [18:49:34] Bibtex format config: {"tab":" ","case":"lowercase","left":"{","right":"}","trailingComma":false,"sort":["key"],"alignOnEqual":true,"sortFields":true,"fieldsOrder":["title","author","editor","year","journal","publisher","school","institution"],"firstEntries":["string","xdata"]} [18:49:34] LaTeX Workshop initialized. [18:49:34] Bibtex format config: {"tab":" ","case":"lowercase","left":"{","right":"}","trailingComma":false,"sort":["key"],"alignOnEqual":true,"sortFields":true,"fieldsOrder":["title","author","editor","year","journal","publisher","school","institution"],"firstEntries":["string","xdata"]} [18:49:34] Trigger characters for intellisense of LaTeX documents: ["\\",",","{"] [18:49:34] Bibtex format config: {"tab":" ","case":"lowercase","left":"{","right":"}","trailingComma":false,"sort":["key"],"alignOnEqual":true,"sortFields":true,"fieldsOrder":["title","author","editor","year","journal","publisher","school","institution"],"firstEntries":["string","xdata"]} [18:49:34] Current workspace folders: ["file:///d:/vsnotes/EDiT-notes/issue"] [18:49:34] Current workspaceRootDir: file:///d:/vsnotes/EDiT-notes/issue [18:49:34] Found root file from active editor: d:\vsnotes\EDiT-notes\issue\James-Yu_LaTeX-Workshop\synctexTest.tex [18:49:34] Root file changed: from undefined to d:\vsnotes\EDiT-notes\issue\James-Yu_LaTeX-Workshop\synctexTest.tex [18:49:34] Start to find all dependencies. [18:49:34] Root file languageId: latex [18:49:34] [Server] Server successfully started: {"address":"127.0.0.1","family":"IPv4","port":62822} [18:49:34] Reset file watcher. [18:49:34] Parsing a file and its subfiles: d:\vsnotes\EDiT-notes\issue\James-Yu_LaTeX-Workshop\synctexTest.tex [18:49:34] Parse fls file. [18:49:34] Cannot find fls file: d:\vsnotes\EDiT-notes\issue\James-Yu_LaTeX-Workshop\synctexTest.fls [18:49:34] Added to file watcher: d:\vsnotes\EDiT-notes\issue\James-Yu_LaTeX-Workshop\synctexTest.tex [18:49:34] Snippet data loaded. [18:49:34] Checking for duplicate labels: d:\vsnotes\EDiT-notes\issue\James-Yu_LaTeX-Workshop\synctexTest.tex. [18:49:36] Manager.fileWatcher.getWatched: {"d:\\vsnotes\\EDiT-notes\\issue\\James-Yu_LaTeX-Workshop":["synctexTest.tex"]} [18:49:36] Manager.filesWatched: ["d:\\vsnotes\\EDiT-notes\\issue\\James-Yu_LaTeX-Workshop\\synctexTest.tex"] [18:49:36] BibWatcher.bibWatcher.getWatched: {} [18:49:36] BibWatcher.bibsWatched: [] [18:49:36] PdfWatcher.pdfWatcher.getWatched: {} [18:49:36] PdfWatcher.pdfsWatched: [] [18:49:40] LOG command invoked: compiler [18:49:44] Current workspace folders: ["file:///d:/vsnotes/EDiT-notes/issue"] [18:49:44] Current workspaceRootDir: file:///d:/vsnotes/EDiT-notes/issue [18:49:44] Found root file from active editor: d:\vsnotes\EDiT-notes\issue\James-Yu_LaTeX-Workshop\synctexTest.tex [18:49:44] Keep using the same root file: d:\vsnotes\EDiT-notes\issue\James-Yu_LaTeX-Workshop\synctexTest.tex ```
Output (suggestions are not displayed)
``` [19:11:36] Initializing LaTeX Workshop. [19:11:36] Extension root: c:\Users\■■■\.vscode\extensions\james-yu.latex-workshop-8.23.0 [19:11:36] $PATH: C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Program Files\Git\usr\bin;C:\Program Files\dotnet\;C:\bin\nodejs\;D:\node_global;C:\Users\■■■\AppData\Local\Microsoft\WindowsApps;C:\bin\VSCode-x64\bin;C:\MinGW\bin;D:\texlive\2021\bin\win32;C:\Users\■■■\AppData\Roaming\npm [19:11:36] $SHELL: undefined [19:11:36] vscode.env.appName: Visual Studio Code [19:11:36] vscode.env.remoteName: undefined [19:11:36] vscode.env.uiKind: 1 [19:11:36] editor.acceptSuggestionOnEnter: "on" [19:11:36] latex-workshop.bind.enter.key: true [19:11:36] latex-workshop.docker.enabled: false [19:11:36] latex-workshop.docker.image.latex: "" [19:11:36] latex-workshop.hover.preview.mathjax.extensions: [ "boldsymbol", "mathtools", "empheq" ] [19:11:36] latex-workshop.intellisense.package.enabled: true [19:11:36] latex-workshop.intellisense.update.aggressive.enabled: false [19:11:36] latex-workshop.intellisense.update.delay: 1000 [19:11:36] latex-workshop.latex.autoBuild.run: "never" [19:11:36] latex-workshop.latex.outDir: "%DIR%" [19:11:36] latex-workshop.latex.recipes: [ { "name": "#LuaLaTeX: 1 time test Build", "tools": [ "lualatex" ] } ] [19:11:36] latex-workshop.latex.tools: [ { "name": "lualatex", "command": "lualatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOC%" ] } ] [19:11:36] latex-workshop.viewer.pdf.internal.keyboardEvent: "auto" [19:11:36] Creating a new file watcher. [19:11:36] watcherOptions: {"useFsEvents":false,"usePolling":false,"interval":300,"binaryInterval":1000,"awaitWriteFinish":{"stabilityThreshold":250}} [19:11:36] Creating PDF file watcher. [19:11:36] watcherOptions: {"useFsEvents":false,"usePolling":false,"interval":300,"binaryInterval":1000,"awaitWriteFinish":{}} [19:11:36] Creating Bib file watcher. [19:11:36] watcherOptions: {"useFsEvents":false,"usePolling":false,"interval":300,"binaryInterval":1000,"awaitWriteFinish":{"stabilityThreshold":250}} [19:11:36] Set $LATEXWORKSHOP_DOCKER_LATEX: "" [19:11:37] [Server] Creating LaTeX Workshop http and websocket server. [19:11:37] Bibtex format config: {"tab":" ","case":"lowercase","left":"{","right":"}","trailingComma":false,"sort":["key"],"alignOnEqual":true,"sortFields":true,"fieldsOrder":["title","author","editor","year","journal","publisher","school","institution"],"firstEntries":["string","xdata"]} [19:11:37] LaTeX Workshop initialized. [19:11:37] Bibtex format config: {"tab":" ","case":"lowercase","left":"{","right":"}","trailingComma":false,"sort":["key"],"alignOnEqual":true,"sortFields":true,"fieldsOrder":["title","author","editor","year","journal","publisher","school","institution"],"firstEntries":["string","xdata"]} [19:11:37] Trigger characters for intellisense of LaTeX documents: ["\\",",","{"] [19:11:37] Bibtex format config: {"tab":" ","case":"lowercase","left":"{","right":"}","trailingComma":false,"sort":["key"],"alignOnEqual":true,"sortFields":true,"fieldsOrder":["title","author","editor","year","journal","publisher","school","institution"],"firstEntries":["string","xdata"]} [19:11:37] Current workspace folders: ["file:///d:/vsnotes/EDiT-notes/issue"] [19:11:37] Current workspaceRootDir: file:///d:/vsnotes/EDiT-notes/issue [19:11:37] Found root file from active editor: d:\vsnotes\EDiT-notes\issue\James-Yu_LaTeX-Workshop\synctexTest.tex [19:11:37] Root file changed: from undefined to d:\vsnotes\EDiT-notes\issue\James-Yu_LaTeX-Workshop\synctexTest.tex [19:11:37] Start to find all dependencies. [19:11:37] Root file languageId: latex [19:11:37] [Server] Server successfully started: {"address":"127.0.0.1","family":"IPv4","port":54342} [19:11:37] Reset file watcher. [19:11:37] Parsing a file and its subfiles: d:\vsnotes\EDiT-notes\issue\James-Yu_LaTeX-Workshop\synctexTest.tex [19:11:37] Parse fls file. [19:11:37] Cannot find fls file: d:\vsnotes\EDiT-notes\issue\James-Yu_LaTeX-Workshop\synctexTest.fls [19:11:37] Added to file watcher: d:\vsnotes\EDiT-notes\issue\James-Yu_LaTeX-Workshop\synctexTest.tex [19:11:37] Snippet data loaded. [19:11:37] Checking for duplicate labels: d:\vsnotes\EDiT-notes\issue\James-Yu_LaTeX-Workshop\synctexTest.tex. [19:11:39] Manager.fileWatcher.getWatched: {"d:\\vsnotes\\EDiT-notes\\issue\\James-Yu_LaTeX-Workshop":["synctexTest.tex"]} [19:11:39] Manager.filesWatched: ["d:\\vsnotes\\EDiT-notes\\issue\\James-Yu_LaTeX-Workshop\\synctexTest.tex"] [19:11:39] BibWatcher.bibWatcher.getWatched: {} [19:11:39] BibWatcher.bibsWatched: [] [19:11:39] PdfWatcher.pdfWatcher.getWatched: {} [19:11:39] PdfWatcher.pdfsWatched: [] ```

Developer Tools Console

Developer Tools Console (suggestions are displayed)
``` workbench.desktop.main.js:sourcemap:578 INFO IExtensionHostStarter.start() took 39 ms. workbench.desktop.main.js:sourcemap:578 ERR [Extension Host] (node:14232) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (Use `Code --trace-deprecation ...` to show where the warning was created) workbench.desktop.main.js:sourcemap:75 [Extension Host] (node:14232) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.(Use `Code --trace-deprecation ...` to show where the warning was created) I @ workbench.desktop.main.js:sourcemap:75 workbench.desktop.main.js:sourcemap:578 WARN [File Watcher (node.js)] correcting a path to watch that seems to be a symbolic link or wrong casing (original: c:\Users\■■■\AppData\Roaming\Code\User\settings.json, real: D:\dotfiles\.vscode\user.settings\settings.json) workbench.desktop.main.js:sourcemap:578 WARN [File Watcher (node.js)] correcting a path to watch that seems to be a symbolic link or wrong casing (original: c:\Users\■■■\AppData\Roaming\Code\User\keybindings.json, real: D:\dotfiles\.vscode\user.settings\keybindings.json) workbench.desktop.main.js:sourcemap:1722 Overwriting grammar scope name to file mapping for scope text.tex. Old grammar file: file:///c%3A/bin/VSCode-x64/resources/app/extensions/latex/syntaxes/TeX.tmLanguage.json. New grammar file: file:///c%3A/Users/■■■/.vscode/extensions/james-yu.latex-workshop-8.23.0/syntax/TeX.tmLanguage.json register @ workbench.desktop.main.js:sourcemap:1722 workbench.desktop.main.js:sourcemap:1722 Overwriting grammar scope name to file mapping for scope text.tex.latex. Old grammar file: file:///c%3A/bin/VSCode-x64/resources/app/extensions/latex/syntaxes/LaTeX.tmLanguage.json. New grammar file: file:///c%3A/Users/■■■/.vscode/extensions/james-yu.latex-workshop-8.23.0/syntax/LaTeX.tmLanguage.json register @ workbench.desktop.main.js:sourcemap:1722 workbench.desktop.main.js:sourcemap:1722 Overwriting grammar scope name to file mapping for scope text.bibtex. Old grammar file: file:///c%3A/bin/VSCode-x64/resources/app/extensions/latex/syntaxes/Bibtex.tmLanguage.json. New grammar file: file:///c%3A/Users/■■■/.vscode/extensions/james-yu.latex-workshop-8.23.0/syntax/Bibtex.tmLanguage.json register @ workbench.desktop.main.js:sourcemap:1722 workbench.desktop.main.js:sourcemap:1722 Overwriting grammar scope name to file mapping for scope text.tex.markdown_latex_combined. Old grammar file: file:///c%3A/bin/VSCode-x64/resources/app/extensions/latex/syntaxes/markdown-latex-combined.tmLanguage.json. New grammar file: file:///c%3A/Users/■■■/.vscode/extensions/james-yu.latex-workshop-8.23.0/syntax/markdown-latex-combined.tmLanguage.json register @ workbench.desktop.main.js:sourcemap:1722 workbench.desktop.main.js:sourcemap:1722 Overwriting grammar scope name to file mapping for scope source.cpp.embedded.latex. Old grammar file: file:///c%3A/bin/VSCode-x64/resources/app/extensions/latex/syntaxes/cpp-grammar-bailout.tmLanguage.json. New grammar file: file:///c%3A/Users/■■■/.vscode/extensions/james-yu.latex-workshop-8.23.0/syntax/cpp-grammar-bailout.tmLanguage.json register @ workbench.desktop.main.js:sourcemap:1722 workbench.desktop.main.js:sourcemap:578 WARN [File Watcher (node.js)] correcting a path to watch that seems to be a symbolic link or wrong casing (original: c:\Users\■■■\AppData\Roaming\Code\User\snippets, real: D:\dotfiles\.vscode\snippets) ```
Developer Tools Console (suggestions are not displayed)
``` workbench.desktop.main.js:sourcemap:578 INFO IExtensionHostStarter.start() took 29 ms. workbench.desktop.main.js:sourcemap:578 ERR [Extension Host] (node:16240) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (Use `Code --trace-deprecation ...` to show where the warning was created) workbench.desktop.main.js:sourcemap:75 [Extension Host] (node:16240) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.(Use `Code --trace-deprecation ...` to show where the warning was created) I @ workbench.desktop.main.js:sourcemap:75 workbench.desktop.main.js:sourcemap:578 WARN [File Watcher (node.js)] correcting a path to watch that seems to be a symbolic link or wrong casing (original: c:\Users\■■■\AppData\Roaming\Code\User\settings.json, real: D:\dotfiles\.vscode\user.settings\settings.json) workbench.desktop.main.js:sourcemap:578 WARN [File Watcher (node.js)] correcting a path to watch that seems to be a symbolic link or wrong casing (original: c:\Users\■■■\AppData\Roaming\Code\User\keybindings.json, real: D:\dotfiles\.vscode\user.settings\keybindings.json) workbench.desktop.main.js:sourcemap:1722 Overwriting grammar scope name to file mapping for scope text.tex. Old grammar file: file:///c%3A/bin/VSCode-x64/resources/app/extensions/latex/syntaxes/TeX.tmLanguage.json. New grammar file: file:///c%3A/Users/■■■/.vscode/extensions/james-yu.latex-workshop-8.23.0/syntax/TeX.tmLanguage.json register @ workbench.desktop.main.js:sourcemap:1722 workbench.desktop.main.js:sourcemap:1722 Overwriting grammar scope name to file mapping for scope text.tex.latex. Old grammar file: file:///c%3A/bin/VSCode-x64/resources/app/extensions/latex/syntaxes/LaTeX.tmLanguage.json. New grammar file: file:///c%3A/Users/■■■/.vscode/extensions/james-yu.latex-workshop-8.23.0/syntax/LaTeX.tmLanguage.json register @ workbench.desktop.main.js:sourcemap:1722 workbench.desktop.main.js:sourcemap:1722 Overwriting grammar scope name to file mapping for scope text.bibtex. Old grammar file: file:///c%3A/bin/VSCode-x64/resources/app/extensions/latex/syntaxes/Bibtex.tmLanguage.json. New grammar file: file:///c%3A/Users/■■■/.vscode/extensions/james-yu.latex-workshop-8.23.0/syntax/Bibtex.tmLanguage.json register @ workbench.desktop.main.js:sourcemap:1722 workbench.desktop.main.js:sourcemap:1722 Overwriting grammar scope name to file mapping for scope text.tex.markdown_latex_combined. Old grammar file: file:///c%3A/bin/VSCode-x64/resources/app/extensions/latex/syntaxes/markdown-latex-combined.tmLanguage.json. New grammar file: file:///c%3A/Users/■■■/.vscode/extensions/james-yu.latex-workshop-8.23.0/syntax/markdown-latex-combined.tmLanguage.json register @ workbench.desktop.main.js:sourcemap:1722 workbench.desktop.main.js:sourcemap:1722 Overwriting grammar scope name to file mapping for scope source.cpp.embedded.latex. Old grammar file: file:///c%3A/bin/VSCode-x64/resources/app/extensions/latex/syntaxes/cpp-grammar-bailout.tmLanguage.json. New grammar file: file:///c%3A/Users/■■■/.vscode/extensions/james-yu.latex-workshop-8.23.0/syntax/cpp-grammar-bailout.tmLanguage.json register @ workbench.desktop.main.js:sourcemap:1722 workbench.desktop.main.js:sourcemap:578 WARN [File Watcher (node.js)] correcting a path to watch that seems to be a symbolic link or wrong casing (original: c:\Users\■■■\AppData\Roaming\Code\User\snippets, real: D:\dotfiles\.vscode\snippets) ```

Desktop

Other extensions

to make sure.

Installed extensions
Extension | Version :-----------------------------------|:------- alefragnani.project-manager | 12.5.0 bhughes339.replacerules | 0.4.1 BriteSnow.vscode-toggle-quotes | 0.3.6 CoenraadS.bracket-pair-colorizer | 1.0.62 CoenraadS.bracket-pair-colorizer-2 | 0.2.2 felipecaputo.git-project-manager | 1.8.2 James-Yu.latex-workshop | 8.23.0 MS-CEINTL.vscode-language-pack-ja | 1.64.6 ms-vscode.cpptools | 1.8.4 oderwat.indent-rainbow | 8.2.2 patricklee.vsnotes | 0.7.1 shd101wyy.markdown-preview-enhanced | 0.6.1 taichi.vscode-textlint | 0.11.0 TakumiI.markdowntable | 0.8.0 tamasfe.even-better-toml | 0.14.2 xavierguarch.auto-markdown-toc | 2.1.4 YuTengjing.open-in-external-app | 0.4.1 yzhang.dictionary-completion | 1.1.2 yzhang.markdown-all-in-one | 3.4.0 zokugun.explicit-folding | 0.21.0
jlelong commented 2 years ago

I cannot reproduce the issue.

However, even if you place the cursor on the right side of \\ and push Ctrl+Space, the suggestions is not displayed.

Ctrl+Space triggers intellisense. So, this means that the popup menu you get in the first screenshot does not come from the extension intelissense. It may come from snippets. Do you have user snippets?

Yarakashi-Kikohshi commented 2 years ago

Snippets starting with \ are not registered.

The user snippet looks like this:

snippet.json
```json { "Document Environment": { "prefix": "document", "body": [ "\\begin{document}", "$0\n\n\n\n\n\n\n\n\n\n", "\\end{document}", ], "description": "Document Environment" }, "Insert Figure": { "prefix": "figure", "body": [ "\\begin{figure}[tbh]", "\t\\centering", "\t\\includegraphics[width=0.8\\linewidth]{${1}.pdf}", "\t\\caption{${2}}", "\t\\label{fig: ${3}}", "\\end{figure}", "", "${0}", ], "description": "Insert Graphics", }, "Insert Table": { "prefix": "table", "body": [ "\\begin{table}[tbh]", "\t\\centering", "\t\\caption{${1}}", "\t\\label{tbl: ${2}}", "%%%%% tabular", "\t${3:$TM_SELECTED_TEXT}", "%%%%%", "\\end{table}", "", "${0}", ], "description": "Insert Table", }, "Insert tabular environment": { "prefix": "tabular", "body": [ "\\begin{tabular}{${1}} \\hline", "\t${2}", "\t\\\\\\", "\t\\hline", "\\end{tabular}", ], "description": "Insert tabular environment", }, "Comment Line": { "prefix": "comment-line", "body": [ "%%%%% ----- ${1:$TM_SELECTED_TEXT} ----- %%%%%", ], "description": "Comment Line", }, "csname": { "prefix": "csname", "body": [ "\\csname ${1:$TM_SELECTED_TEXT}\\endcsname", ], "description": "\\csname \\endcsname", }, "Add break and indents": { "prefix": "Add break and indents", "body": [ "", "\t", ], "description": "Add break and indents", }, "Line breaks and Relational operator": { "prefix": "Line breaks and Relational operator", "body": [ "", "\\\\\\", "${1|& =,=,= {} &,\\eqdef,\\coloneqq,\\eqqcolon,& \\eqdef,& \\coloneqq,& \\eqqcolon|}", "$0", ], "description": "'\\' and '='", }, "Relational operator: '='": { "prefix": "Relation operator", "body": [ "${1|& =,=,= {} &,\\eqdef,\\coloneqq,\\eqqcolon,& \\eqdef,& \\coloneqq,& \\eqqcolon|}", "$0", ], "description": "Relational operator: '='", }, "Inequality sign: '>'": { "prefix": "Inequality sign", "body": [ "${1|>,\\geq,\\gg,& >,& \\geq,& \\gg|}", "$0", ], "description": "Inequality sign: '>'", }, "Inequality sign: '<'": { "prefix": "Inequality sign", "body": [ "${1|<,\\leq,\\ll,& <,& \\leq,& \\ll|}", "$0", ], "description": "Inequality sign: '<'", }, "Line break and Ampasamd": { "prefix": "Line break and Ampasamd", "body": [ "", "${1|& ,& \\text{}|}", ], "description": "Line break and Ampasamd", }, "Line break": { "prefix": "Line break", "body": [ "", "\\\\\\", "$0", ], "description": "Line break", }, "jsclasses": { "prefix": [ "uplatex", "jsclasses", ], "body": [ "\\RequirePackage{plautopatch}", "\\documentclass[uplatex,dvipdfmx,11pt,a4paper]{js${1|article,report,book|}}", "\\usepackage[uplatex,deluxe]{otf}", "\\usepackage[left=25mm,right=25mm,top=30mm,bottom=30mm]{geometry}", "% \\newgeometry{left=10mm,right=15mm,top=10mm,bottom=20mm}% a5用", "$0", ], "description": "jsclasses's documentclass settings" }, "jlreq for upLaTeX": { "prefix": [ "uplatex", "jlreq", ], "body": [ "\\RequirePackage{plautopatch}", "\\documentclass[dvipdfmx,${1| ,report|},11pt,a4paper]{jlreq}", "\\usepackage[uplatex,deluxe]{otf}", "\\usepackage[left=25mm,right=25mm,top=30mm,bottom=30mm]{geometry}", "% \\newgeometry{left=10mm,right=15mm,top=10mm,bottom=20mm}% a5用", "$0", ], "description": "jlreq's documentclass settings" }, "jlreq for LuaLaTex": { "prefix": [ "lualatex", "jlreq", ], "body": [ "\\documentclass[${1| ,report|},11pt,a4paper]{jlreq}", "\\usepackage{luatexja}", "\\usepackage[left=25mm,right=25mm,top=30mm,bottom=30mm]{geometry}", "% \\newgeometry{left=10mm,right=15mm,top=10mm,bottom=20mm}% a5用", "$0", ], "description": "jlreq's documentclass settings for LuaLaTeX" }, "AMS Math package": { "prefix": "ams-math", "body": [ "\\usepackage[tbtags]{amsmath}", "\\usepackage{amssymb, upgreek, mathrsfs}", "\\usepackage{mathtools}", "\\usepackage{empheq}", ], "description": "AMS math package" }, "Hyper reference for Japanese": { "prefix": "hyperref-ja", "body": [ "\\usepackage{hyperref}", "\\usepackage{pxjahyper}", ], "description": "Hyper reference for Japanese" }, "Additional package": { "prefix": "additional", "body": [ "\\usepackage{graphicx}", "\\usepackage{xcolor}", "\\usepackage{array}", "\\usepackage{subcaption}", ], "description": "Additional Package" }, "Some settings": { "prefix": "some-settings", "body": [ "\\hypersetup{", "\tcolorlinks=true,", "\tlinkcolor=red,", "\turlcolor=cyan,", "}", "% \\hypersetup{colorlinks=true,linkcolor=black,urlcolor=black}", "\\renewcommand{\\thefootnote}{\\arabic{footnote})}", "\\mathtoolsset{showonlyrefs=true}", "% \\usepackage[inline]{showlabels}", ], "description": "Some settings" }, "note":{ "prefix": "note", "body": [ "\\usepackage{my_note_setting}", ], "description": "note 環境の導入", }, } ```

Some people tweeted similar problem on Twitter, so I don't think this issue is unique to me.

jlelong commented 2 years ago

That is strange. The big & co entries come from https://github.com/James-Yu/LaTeX-Workshop/blob/master/data/packages/latex-mathsymbols_cmd.json and are only used by LW intellisense provider, which returns an empty list when invoked after \\.

Could it be that your backslash key acts as a dead or compose key?

Yarakashi-Kikohshi commented 2 years ago

Could it be that your backslash key acts as a dead or compose key?

I'm Japanese, but there is no such way to use keys in Japanese input. (In the first place, I learned for the first time that there is such an input method.)

That is strange. The big & co entries come from https://github.com/James-Yu/LaTeX-Workshop/blob/master/data/packages/latex-mathsymbols_cmd.json and are only used by LW intellisense provider, which returns an empty list when invoked after \\.

I don't understand the detailed behavior, but I also don't understand why \\ triggers \bigl etc. But, there are certainly cases where this behavior is demonstrated.

It ’s just an imagination, https://github.com/James-Yu/LaTeX-Workshop/blob/master/data/packages/latex-mathsymbols_cmd.json contains \\ only in "command" such as \big. I wondered if this was the cause. In fact, when the suggestion is displayed, only \bigl, \Bigl, \biggl and \Biggl are displayed.

jlelong commented 2 years ago

In "command", two \ are used because the first one escapes the second one. So, it is unlikely to be related.

I have just noted that in your first screenshot, the first \ are coloured in blue. This means that the four commands are displayed because the first \ is considered as a match character. This is puzzling as \ is listed as a word separator and only word characters are considered to find a matching pattern. I am pretty sure this happens because \ is registered as a word character. We have to find the culprit.

Does this happen with all extensions deactivated except LW?

Yarakashi-Kikohshi commented 2 years ago

In "command", two \ are used because the first one escapes the second one. So, it is unlikely to be related.

I have just noted that in your first screenshot, the first \ are coloured in blue. This means that the four commands are displayed because the first \ is considered as a match character. This is puzzling as \ is listed as a word separator and only word characters are considered to find a matching pattern. I am pretty sure this happens because \ is registered as a word character. We have to find the culprit.

Sorry. It was an amateur idea.

Does this happen with all extensions deactivated except LW?

Yes. (Only the Japanese localization package is included...)

doubleBackSlash3

However, the issue will be reproduced with a probability of about 1 time after 10 reboots. Not always.

Yarakashi-Kikohshi commented 2 years ago

Regarding the Japanese localization package, I left it as it was because there was no way to disable it, but I uninstalled it and checked if the same problem occurred again. After all, it was reproduced in the same way.

doubleBackSlash4

I'm sorry for posting similar content.

tamuratak commented 2 years ago

Even when I disable all the other extensions except LaTeX Workshop, I can reproduce the issue with VS Code 1.64.2.

  1. Set "editor.quickSuggestions" to the default one.
  2. Execute Reload Window again and again until you see the issue.

スクリーンショット 2022-02-15 23 41 23

This might be a bug of VS Code.

I cannot reproduce it with VS Code Insiders:

Version: 1.65.0-insider (Universal) Commit: 50089c3f92c17584a4aca179f51f220b56c22020 Date: 2022-02-14T05:17:15.582Z Electron: 16.0.8 Chromium: 96.0.4664.110 Node.js: 16.9.1 V8: 9.6.180.21-electron.0 OS: Darwin arm64 20.6.0

I hope the issue has been fixed in Insiders.

jlelong commented 2 years ago

That is strange because I have never managed to reproduce the issue with VS Code 1.64.2 even after a lot of reloads.

jlelong commented 2 years ago

Could it be related to microsoft/vscode#83428?

tamuratak commented 2 years ago

Could it be related to https://github.com/microsoft/vscode/issues/83428?

The fix should be included in VS Code 1.64.2. However, I see the issue with VS Code 1.64.2.

How do you think about deleting bigl..\\bigr and other entries from latex-mathsymbols_cmd.json as a workaround?

tamuratak commented 2 years ago

@Yarakashi-Kikohshi if you still see the issue with VS Code 1.65.0-insider, please report to https://github.com/microsoft/vscode.

I recommend users to set "editor.quickSuggestions": false since the feature can have issues as you see.

jlelong commented 2 years ago

I have deactivated all extensions except LW and I can reproduce the issue both with 1.64.2 and VS Code Insiders

I think I have found the culprit. This seems to be related to the recent integration of vscode-latex-basics into VS Code, which defines \ as a word character. In LW, we remove the \ from word characters and our language definition should overwrite the default one but it does not seem to be reliable. If I remove extensions/latex from the VS Code application content, I cannot reproduce the issue anymore.

A reliable way to reproduce the issue is to

Reported to microsoft/vscode#143187.

Yarakashi-Kikohshi commented 2 years ago

@tamuratak

I recommend users to set "editor.quickSuggestions": false since the feature can have issues as you see.

OK. I will do so.

if you still see the issue with VS Code 1.65.0-insider, please report to https://github.com/microsoft/vscode.

jlelong has already posted the issue in VS Code (# 143187). So, if I continue to have the same problem even after this issue is closed, should I just post the issue again on vscode?

tamuratak commented 2 years ago

So, if I continue to have the same problem even after this issue is closed, should I just post the issue again on vscode?

No.

jlelong commented 2 years ago

https://github.com/microsoft/vscode/issues/143187 is fixed. This will be available in the February 2022 release.

I confirm that it is already fixed in 1.65.0-insider Commit: 8440b8f47231147823ba9696913d642e5f2d9d58 Date: 2022-02-25T05:18:40.990Z