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

[Completion] " as commit character #5988

Closed
Oxygels opened this issue Aug 2, 2023 · 4 comments · Fixed by dotnet/roslyn#69351
Closed

[Completion] " as commit character #5988

Oxygels opened this issue Aug 2, 2023 · 4 comments · Fixed by dotnet/roslyn#69351
Assignees
Milestone

Comments

@Oxygels
Copy link

Oxygels commented Aug 2, 2023

Type: Bug

Issue Description

When using the C# extension and with the option
"editor.acceptSuggestionOnCommitCharacter": true
" seems to be incorrectly considered as a commit character

It can be prevented by avoiding completions using Esc but that's not the goal I guess.

Steps to Reproduce

  • Write Console.WriteLine(, the extension should propose some completions with args in first
  • Write " as if you wanted to input a string without accepting completions

Expected Behavior

Console.WriteLine("

Actual Behavior

Console.WriteLine(args"

Logs

C# log

Activating C# + C# Dev Kit + C# IntelliCode...
info: LanguageServerHost[0]
Starting server...

Environment information

VSCode version: 1.80.2
C# Extension: 2.0.312
Using OmniSharp: false

Dotnet Information

Host:
Version: 7.0.9
Architecture: x64
Commit: 8e9a17b221

.NET SDKs installed:
No SDKs were found.

.NET runtimes installed:
Microsoft.NETCore.App 7.0.9 [/home/oxy/.config/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.9/shared/Microsoft.NETCore.App]

Other architectures found:
None

Environment variables:
DOTNET_ROOT [/usr/share/dotnet]

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

Visual Studio Code Extensions
Extension Author Version Folder Name
beardedtheme BeardedBear 8.3.2 beardedbear.beardedtheme-8.3.2
better-cpp-syntax jeff-hykin 1.17.2 jeff-hykin.better-cpp-syntax-1.17.2
cmake twxs 0.0.17 twxs.cmake-0.0.17
cmake-tools ms-vscode 1.14.34 ms-vscode.cmake-tools-1.14.34
copilot GitHub 1.99.289 github.copilot-1.99.289
cpptools-extension-pack ms-vscode 1.3.0 ms-vscode.cpptools-extension-pack-1.3.0
cpptools-themes ms-vscode 2.0.0 ms-vscode.cpptools-themes-2.0.0
csdevkit ms-dotnettools 0.2.100 ms-dotnettools.csdevkit-0.2.100-linux-x64
csharp ms-dotnettools 2.0.312 ms-dotnettools.csharp-2.0.312-linux-x64
doxdocgen cschlosser 1.4.0 cschlosser.doxdocgen-1.4.0
errorlens usernamehw 3.12.0 usernamehw.errorlens-3.12.0
github-vscode-theme GitHub 6.3.4 github.github-vscode-theme-6.3.4
go golang 0.39.1 golang.go-0.39.1
intellicode-api-usage-examples VisualStudioExptTeam 0.2.7 visualstudioexptteam.intellicode-api-usage-examples-0.2.7
intellij-ish-darcula-theme csantiago132 1.0.0 csantiago132.intellij-ish-darcula-theme-1.0.0
isort ms-python 2023.10.1 ms-python.isort-2023.10.1
java redhat 1.21.0 redhat.java-1.21.0-linux-x64
jupyter ms-toolsai 2023.6.1101941928 ms-toolsai.jupyter-2023.6.1101941928-linux-x64
jupyter-keymap ms-toolsai 1.1.2 ms-toolsai.jupyter-keymap-1.1.2
jupyter-renderers ms-toolsai 1.0.17 ms-toolsai.jupyter-renderers-1.0.17
latex-workshop James-Yu 9.13.3 james-yu.latex-workshop-9.13.3
makefile-tools ms-vscode 0.7.0 ms-vscode.makefile-tools-0.7.0
markdown-all-in-one yzhang 3.5.1 yzhang.markdown-all-in-one-3.5.1
markdown-preview-enhanced shd101wyy 0.6.8 shd101wyy.markdown-preview-enhanced-0.6.8
plantuml jebbs 2.17.5 jebbs.plantuml-2.17.5
python ms-python 2023.12.0 ms-python.python-2023.12.0
remote-containers ms-vscode-remote 0.299.0 ms-vscode-remote.remote-containers-0.299.0
remote-explorer ms-vscode 0.4.1 ms-vscode.remote-explorer-0.4.1
remote-ssh ms-vscode-remote 0.102.0 ms-vscode-remote.remote-ssh-0.102.0
remote-ssh-edit ms-vscode-remote 0.86.0 ms-vscode-remote.remote-ssh-edit-0.86.0
remote-wsl ms-vscode-remote 0.80.2 ms-vscode-remote.remote-wsl-0.80.2
rust-analyzer rust-lang 0.3.1607 rust-lang.rust-analyzer-0.3.1607-linux-x64
slint Slint 1.1.1 slint.slint-1.1.1
svg-preview SimonSiefke 2.8.3 simonsiefke.svg-preview-2.8.3
theme tal7aouy 2.9.0 tal7aouy.theme-2.9.0
todo-tree Gruntfuggly 0.0.226 gruntfuggly.todo-tree-0.0.226
vscode-clangd llvm-vs-code-extensions 0.1.24 llvm-vs-code-extensions.vscode-clangd-0.1.24
vscode-dotnet-runtime ms-dotnettools 1.6.0 ms-dotnettools.vscode-dotnet-runtime-1.6.0
vscode-icontheme-nomo-dark be5invis 1.3.6 be5invis.vscode-icontheme-nomo-dark-1.3.6
vscode-java-debug vscjava 0.53.0 vscjava.vscode-java-debug-0.53.0
vscode-java-dependency vscjava 0.23.0 vscjava.vscode-java-dependency-0.23.0
vscode-java-pack vscjava 0.25.13 vscjava.vscode-java-pack-0.25.13
vscode-java-test vscjava 0.39.0 vscjava.vscode-java-test-0.39.0
vscode-jupyter-cell-tags ms-toolsai 0.1.8 ms-toolsai.vscode-jupyter-cell-tags-0.1.8
vscode-jupyter-slideshow ms-toolsai 0.1.5 ms-toolsai.vscode-jupyter-slideshow-0.1.5
vscode-maven vscjava 0.42.0 vscjava.vscode-maven-0.42.0
vscode-pylance ms-python 2023.7.40 ms-python.vscode-pylance-2023.7.40
vscodeintellicode VisualStudioExptTeam 1.2.30 visualstudioexptteam.vscodeintellicode-1.2.30
vscodeintellicode-csharp ms-dotnettools 0.1.26 ms-dotnettools.vscodeintellicode-csharp-0.1.26-linux-x64
vsliveshare ms-vsliveshare 1.0.5877 ms-vsliveshare.vsliveshare-1.0.5877

Extension version: 2.0.312
VS Code version: Code 1.80.2 (2ccd690cbff1569e4a83d7c43d45101f817401dc, 2023-07-27T20:41:52.615Z)
OS version: Linux x64 6.1.39-2-lts
Modes:

@333fred
Copy link
Member

333fred commented Aug 2, 2023

Possible duplicate of #5732. @genlu to advise.

@Oxygels
Copy link
Author

Oxygels commented Aug 2, 2023

I can confirm the issue disappears after setting this option to false.
The issue is, apparently, the default is true

@genlu
Copy link
Member

genlu commented Aug 2, 2023

I see you have both C# devkit and intellicode extensions installed. Could you please let me know if the item being committed are from intellicode or not? i.e. intellicode items has a star prefix

image

@Oxygels
Copy link
Author

Oxygels commented Aug 2, 2023

Yes I have a star before the item, so it is an intellicode item.
With copilot (which disables Intellisense), I don't have this issue but I have another one, the completion menu often doesn't appear so that hides this issue since it's related to the completion.
Particularly, it doesn't show after Console.WriteLine(

However if I manually do Ctrl+Space to show it, I can reproduce even with copilot.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants