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

JSDoc-style multi-line comments are wrongly indented #12249

Open
thennothinghappened opened this issue Apr 23, 2024 · 1 comment · May be fixed by microsoft/vscode#211202
Open

JSDoc-style multi-line comments are wrongly indented #12249

thennothinghappened opened this issue Apr 23, 2024 · 1 comment · May be fixed by microsoft/vscode#211202
Assignees
Labels
enhancement Improvement to an existing feature Language Service quick fix Visual Studio Code Caused by (or depends on changes from) VS Code
Projects
Milestone

Comments

@thennothinghappened
Copy link

thennothinghappened commented Apr 23, 2024

Environment

  • OS and Version: MacOS Ventura 13.5
  • VS Code Version: 1.88.1
  • C/C++ Extension Version: v1.19.9
  • If using SSH remote, specify OS of remote machine: N/A

Bug Summary and Steps to Reproduce

Bug Summary: When writing a multi-line documentation comment, the ending line is not indented correctly.

Steps to reproduce:

  1. On a new line, start a multi-line documentation comment: /**.
  2. The closing */ will be autocompleted, placing the cursor right before it.
  3. Press enter to expand the comment to a new line.
  4. The closing */ will not be correctly indented with the contents of the comment:
/**
 *
*/

Expected behavior:
I'd expect the closing comment line to be indented by one space to match with the comment body:

/**
 *
 */

Configuration and Logs

Log Diagnostics:

-------- Diagnostics - 24/04/2024, 08:42:08
Version: 1.19.9
Current Configuration:
{
    "name": "Mac",
    "includePath": [
        "${workspaceFolder}/**"
    ],
    "defines": [],
    "macFrameworkPath": [
        "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks"
    ],
    "cStandard": "c17",
    "cppStandard": "c++17",
    "intelliSenseMode": "macos-clang-arm64",
    "intelliSenseModeIsExplicit": false,
    "cStandardIsExplicit": false,
    "cppStandardIsExplicit": false,
    "mergeConfigurations": false,
    "compilerPath": "/usr/bin/clang++",
    "compilerPathIsExplicit": true,
    "browse": {
        "path": [
            "${workspaceFolder}/**"
        ],
        "limitSymbolsToIncludedHeaders": true
    }
}
cpptools version (native): 1.19.9.0
No active translation units.

------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 9124

c_cpp_properties.json:

N/A - Problem presents with no configuration given with no workspace needed.

Language Server Log:

loggingLevel: Debug
loggingLevel has changed to: Debug
LSP: (invoked) cpptools/didChangeCppProperties (id: 6)
LSP: Sending response (id: 6)
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors

Other Extensions

Issue presents without any other extensions.

Additional context

No response

sean-mcmanus added a commit to sean-mcmanus/vscode that referenced this issue Apr 24, 2024
This fixes the issue at microsoft/vscode-cpptools#12249 .

This was removed in microsoft@98fa77a .

Then PR microsoft#160357 added /* */ autoClosingPair.
@sean-mcmanus
Copy link
Collaborator

@thennothinghappened I have a PR against VS Code at microsoft/vscode#211202 which fixes this. You could also apply that PR manually to get the same behavior (although a VS Code update might overwrite those changes).

@sean-mcmanus sean-mcmanus self-assigned this Apr 24, 2024
@sean-mcmanus sean-mcmanus added Language Service Visual Studio Code Caused by (or depends on changes from) VS Code enhancement Improvement to an existing feature labels Apr 24, 2024
@sean-mcmanus sean-mcmanus added this to the 1.21 milestone Apr 30, 2024
@sean-mcmanus sean-mcmanus added this to Triage in 1.21 via automation Apr 30, 2024
@sean-mcmanus sean-mcmanus moved this from Triage to To do in 1.21 May 2, 2024
@sean-mcmanus sean-mcmanus moved this from To do to In progress in 1.21 May 2, 2024
@sean-mcmanus sean-mcmanus modified the milestones: 1.21, 1.21.0 May 2, 2024
@sean-mcmanus sean-mcmanus moved this from In progress to Pull Request in 1.21 May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement to an existing feature Language Service quick fix Visual Studio Code Caused by (or depends on changes from) VS Code
Projects
1.21
Pull Request
Development

Successfully merging a pull request may close this issue.

2 participants