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

Writing \end would autocomplete with another \end #3783

Open
4 tasks done
ttoommxx opened this issue Mar 21, 2023 · 9 comments
Open
4 tasks done

Writing \end would autocomplete with another \end #3783

ttoommxx opened this issue Mar 21, 2023 · 9 comments
Labels
vscode issue Issue related to VSCode itself

Comments

@ttoommxx
Copy link

ttoommxx commented Mar 21, 2023

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.

  • The issue has not been reported in this repository.
  • The issue remains after disabling all other extensions and restarting Visual Studio Code.
  • The FAQ cannot address the issue.
  • 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: Chrome OS (Crostini - Debian 11)
  • Visual Studio Code Version: 1.76.2
  • LaTeX Workshop Version: 9.7.0
  • TeX Distribution Version: TeX Live 2020

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.

  • When I write \end{theorem} in a \begin{theorem} environment, the extension would auto-complete to \end{theorem} \end{theoren} as if the first end was a \begin

Reproduction Steps

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

  1. write \begin{theorem}
  2. remove the auto-completed \end{theorem}
  3. write \end{theorem} again
    Screen recording 2023-03-21 19.03.30.webm

Expected Behavior

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

  • no auto-completion upon re-writing \end{theorem}

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.

<IT'S JUST EMPTY>

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.

workbench.desktop.main.js:1882 Overwriting grammar scope name to file mapping for scope text.tex.
Old grammar file: file:///usr/share/code/resources/app/extensions/latex/syntaxes/TeX.tmLanguage.json.
New grammar file: file:///home/ttoommxx/.vscode/extensions/james-yu.latex-workshop-9.7.0/syntax/TeX.tmLanguage.json
register @ workbench.desktop.main.js:1882
workbench.desktop.main.js:1882 Overwriting grammar scope name to file mapping for scope text.tex.latex.
Old grammar file: file:///usr/share/code/resources/app/extensions/latex/syntaxes/LaTeX.tmLanguage.json.
New grammar file: file:///home/ttoommxx/.vscode/extensions/james-yu.latex-workshop-9.7.0/syntax/LaTeX.tmLanguage.json
register @ workbench.desktop.main.js:1882
workbench.desktop.main.js:1882 Overwriting grammar scope name to file mapping for scope text.bibtex.
Old grammar file: file:///usr/share/code/resources/app/extensions/latex/syntaxes/Bibtex.tmLanguage.json.
New grammar file: file:///home/ttoommxx/.vscode/extensions/james-yu.latex-workshop-9.7.0/syntax/Bibtex.tmLanguage.json
register @ workbench.desktop.main.js:1882
workbench.desktop.main.js:1882 Overwriting grammar scope name to file mapping for scope text.tex.markdown_latex_combined.
Old grammar file: file:///usr/share/code/resources/app/extensions/latex/syntaxes/markdown-latex-combined.tmLanguage.json.
New grammar file: file:///home/ttoommxx/.vscode/extensions/james-yu.latex-workshop-9.7.0/syntax/markdown-latex-combined.tmLanguage.json
register @ workbench.desktop.main.js:1882
workbench.desktop.main.js:1882 Overwriting grammar scope name to file mapping for scope source.cpp.embedded.latex.
Old grammar file: file:///usr/share/code/resources/app/extensions/latex/syntaxes/cpp-grammar-bailout.tmLanguage.json.
New grammar file: file:///home/ttoommxx/.vscode/extensions/james-yu.latex-workshop-9.7.0/syntax/cpp-grammar-bailout.tmLanguage.json
register @ workbench.desktop.main.js:1882
workbench.desktop.main.js:615  INFO [perf] Render performance baseline is 92ms
DevTools failed to load source map: Could not load content for https://ticino.blob.core.windows.net/sourcemaps/ee2b180d582a7f601fa6ecfdad8d9fd269ab1884/core/vs/workbench/workbench.desktop.main.js.map: Load canceled due to load timeout

Anything Else?

Add any other context about the problem below.

@jlelong
Copy link
Collaborator

jlelong commented Mar 21, 2023

The issue only happens if you start typing \end with the cursor not aligned with the start of \begin. Note after typing the { in \end{, the lines is de-indented. This behaviour is really weird and I have really no idea what could cause this in the extension. I am really wondering if this might not be a VS Code issue.

@jlelong jlelong added can't reproduce Issue cannot be reproduced and removed can't reproduce Issue cannot be reproduced labels Mar 21, 2023
@ttoommxx

This comment was marked as outdated.

@ttoommxx
Copy link
Author

The issue only happens if you start typing \end with the cursor not aligned with the start of \begin. Note after typing the { in \end{, the lines is de-indented. This behaviour is really weird and I have really no idea what could cause this in the extension. I am really wondering if this might not be a VS Code issue.

Exactly, that's when it happens, write backslash, the environment get de-indented and then it autocompletes to \end.

@jlelong
Copy link
Collaborator

jlelong commented Mar 22, 2023

I think this is a VS Code issue. I have reported it microsoft/vscode#178075

@jlelong jlelong added the vscode issue Issue related to VSCode itself label Mar 22, 2023
@ttoommxx
Copy link
Author

Couldn't quite tell whether it was the extension or VScode itself, thanks for sorting that out for me! Shall I close the thread then?

@jlelong
Copy link
Collaborator

jlelong commented Mar 23, 2023

We can leave the issue open for now. I will take care of it.

@James-Yu
Copy link
Owner

It seems that somehow the issue was fixed on vscode side. I will close this issue for now.

2023-12-20.13-32-08.mp4

@ian-h-chamberlain
Copy link

ian-h-chamberlain commented Jan 4, 2024

I'm still seeing this behavior with \end{itemize} on v9.17.0 of the extension and VSCode 1.85.1. The issue as described in microsoft/vscode#178075 seems different than what I'm seeing, but maybe I'm misunderstanding the original issue here... the completion of \end behaves as though it was completing \begin, in my case:

Screen.Recording.2024-01-03.at.22.09.54.mov

Is the the same thing, or should I file a different issue to track this?

@jlelong
Copy link
Collaborator

jlelong commented Jan 4, 2024

With VS Code 1.85.1, I can reproduce microsoft/vscode#178075 with all extensions disabled included LW

Jan-04-2024 07-49-32

When activating LW

Jan-04-2024 07-52-05

@James-Yu, I even tried with a clean and fresh profile and only LW and I always face the issue. I am wondering what particular configuration you could have to prevent the issue from popping up on your side.

@jlelong jlelong reopened this Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vscode issue Issue related to VSCode itself
Projects
None yet
Development

No branches or pull requests

4 participants