microsoft / vscode-dotnettools

This is a feedback repository to capture issues logged for the C# Dev Kit and related extensions from Visual Studio Code
Other
227 stars 11 forks source link

[BUG] No completion for Doc Comments #1174

Closed zstewar1 closed 4 months ago

zstewar1 commented 4 months ago

Describe the Issue

I recently installed vscode and the C# Dev Kit. Intellisense works, but when I create doc comments by typing ///, it doesn't auto-insert anything. On other systems where I've used C# Dev Kit, typing /// will result in it auto inserting /// <summary> and /// </summary> and positioning the cursor on a blank line in the middle.

When typing /// <, intellisense will offer suggestions for tags to use, including summary however selecting a tag only inserts the tag name, not even the closing > (that is it inserts up to /// <summary). I would expect that when I choose a tag from the intellisense suggestions for doc comment tags, it would insert a matching closing tag too.

Steps To Reproduce

Create a new project. Add an empty method, then on the line above it type ///.

Expected Behavior

Intellisense should help me insert doc comments including full closing tags.

Environment Information

Providing as much maybe-relevant information as I can:

zachary@erfinderin $ cat /etc/fedora-release 
Fedora release 40 (Forty)
zachary@erfinderin $ uname -a
Linux erfinderin 6.8.11-300.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 27 14:53:33 UTC 2024 x86_64 GNU/Linux
zachary@erfinderin $ code --version
1.89.1
dc96b837cf6bb4af9cd736aa3af08cf8279f7685
x64
zachary@erfinderin $ dotnet --version
8.0.104

User Settings:

{
    "keyboard.dispatch": "keyCode",
    "vim.useSystemClipboard": true,
    "editor.rulers": [
        100
    ],
    "rust-analyzer.callInfo.full": false,
    "editor.fontSize": 11,
    "editor.autoClosingBrackets": "never",
    "editor.autoClosingQuotes": "never",
    "workbench.startupEditor": "none",
    "window.menuBarVisibility": "compact",
    "window.titleBarStyle": "custom",
    "html.format.templating": true,
    "rust-analyzer.lens.enable": false,
    "rust-analyzer.completion.addCallArgumentSnippets": false,
    "rust-analyzer.completion.addCallParenthesis": false,
    "rust-analyzer.completion.autoself.enable": false,
    "rust-analyzer.inlayHints.enable": false,
    "editor.semanticTokenColorCustomizations": {
        "enabled": true,
        "rules": {
            "*.mutable": {
                "underline": false,
            }
        }
    },
    "vim.textwidth": 100,
    "vim.handleKeys": {
        "<C-d>": true,
        "<C-s>": false,
        "<C-z>": false,
        "<C-p>": false,
    },
    "files.trimTrailingWhitespace": true,
    "files.insertFinalNewline": true,
    "files.trimFinalNewlines": true,
    "rust-analyzer.imports.granularity.group": "module",
    "rust-analyzer.imports.prefix": "crate",
    "rust-analyzer.hover.actions.references.enable": true,
    "rust-analyzer.inlayHints.parameterHints.enable": false,
    "rust-analyzer.inlayHints.typeHints.enable": false,
    "rust-analyzer.inlayHints.closingBraceHints.enable": false,
    "rust-analyzer.inlayHints.chainingHints.enable": false,
    "rust-analyzer.imports.granularity.enforce": true,
    "rust-analyzer.cargo.features": [],
    "editor.wordWrapColumn": 100,
    "evenBetterToml.formatter.columnWidth": 100,
    "html.autoCreateQuotes": false,
    "html.autoClosingTags": false,
    "omnisharp.enableDecompilationSupport": true,
    "editor.fontFamily": "'Jetbrains Mono', 'Droid Sans Mono', 'monospace', monospace",
    "omnisharp.organizeImportsOnFormat": true,
    "[csharp]": {
        "editor.formatOnType": true
    },
    "dotnet.inlayHints.suppressInlayHintsForParametersThatMatchMethodIntent": true,
    "vim.joinspaces": false,
}

Keyboard mappings:

// Place your key bindings in this file to override the defaults
[
    {
        "key": "ctrl+tab",
        "command": "workbench.action.nextEditorInGroup"
    },
    {
        "key": "ctrl+shift+tab",
        "command": "workbench.action.previousEditorInGroup"
    },
    {
        "key": "shift+alt+l",
        "command": "workbench.action.focusNextGroup"
    },
    {
        "key": "shift+alt+h",
        "command": "workbench.action.focusPreviousGroup"
    },
    {
        "key": "shift+alt+j",
        "command": "workbench.action.nextEditorInGroup"
    },
    {
        "key": "shift+alt+k",
        "command": "workbench.action.previousEditorInGroup"
    },
    {
        "key": "ctrl+shift+alt+l",
        "command": "workbench.action.moveEditorToNextGroup"
    },
    {
        "key": "ctrl+shift+alt+h",
        "command": "workbench.action.moveEditorToPreviousGroup"
    },
    {
        "key": "ctrl+shift+alt+k",
        "command": "workbench.action.moveEditorLeftInGroup"
    },
    {
        "key": "ctrl+shift+alt+j",
        "command": "workbench.action.moveEditorRightInGroup"
    }
]

C# Extension Output:

Using dotnet configured on PATH
Dotnet path: /usr/lib64/dotnet/dotnet
Activating C# + C# Dev Kit...
waiting for named pipe information from server...
[stdout] {"pipeName":"/tmp/a219822b.sock"}
received named pipe information from server
attempting to connect client to server...
client has connected to server
[Info  - 10:02:25 PM] [Program] Language server initialized
[Info  - 10:02:28 PM] [WorkspaceProjectFactoryService] Project /home/zachary/dev/kerbal-wasm-plugin/ZStewart.KSPWasm/ZStewart.KSPWasm.csproj loaded by C# Dev Kit

C# Dev Kit Extension Output:

Starting Spawn .NET server...
Starting Open a solution...
Starting Open a solution with environment service...
Starting Clear environment...
Using preinstalled .NET runtime at "/usr/lib64/dotnet/dotnet"
.NET server started and IPC established in 1634ms
Completed Spawn .NET server (1995ms)
Completed Clear environment (2632ms)
Completed Open a solution with environment service (2683ms)
Starting Restore solution...
Selected configuration: null, active configuration: Debug|Any CPU
Completed Open a solution (2690ms)
Starting NuGet restore for the solution.
Starting command: "dotnet" restore /home/zachary/dev/kerbal-wasm-plugin/ZStewart.sln --interactive...
Completed command: "dotnet" restore /home/zachary/dev/kerbal-wasm-plugin/ZStewart.sln --interactive (1104ms)
Completed NuGet restore.
Completed Restore solution (1108ms)
mauve commented 4 months ago

I am also experiencing this.

kade-dentel commented 4 months ago

Also noticed this issue a few days ago. I'm using this extension as a workaround in the meantime - https://github.com/kasecato/vscode-docomment

arkalyanms commented 4 months ago

@dibarbet would you move to our repo and assign to Sam if you have enough info here?

dibarbet commented 4 months ago

Ah, this is a duplicate of https://github.com/dotnet/vscode-csharp/issues/7184, and is fixed in 2.34.10 (prerelease).