Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Consecutive comment lines are not foldable in Python but are in (at least some) other languages #5904

Closed
jolsen-mitsu opened this issue May 22, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@jolsen-mitsu
Copy link

jolsen-mitsu commented May 22, 2024

Environment data

  • Language Server version: 2024.5.101
  • OS and version: linux x64
  • Python version (and distribution if applicable, e.g. Anaconda): Python 3.11.9 (main, Apr 6 2024, 17:59:24) [GCC 11.4.0]
  • python.analysis.indexing: true
  • python.analysis.typeCheckingMode: standard
    Version: 1.89.1 (user setup)
    Commit: dc96b837cf6bb4af9cd736aa3af08cf8279f7685
    Date: 2024-05-07T05:13:33.891Z
    Electron: 28.2.8
    ElectronBuildId: 27744544
    Chromium: 120.0.6099.291
    Node.js: 18.18.2
    V8: 12.0.267.19-electron.0
    OS: Windows_NT x64 10.0.22621

Only enabled extensions I have, to make sure other extension not interfering with this functionality:

  • Pylance 2924,5,191
  • Pylint 2023.10.1 preview
  • Python 2024.7.11371014

Code Snippet

"""'
this will fold
properly
"""

# the folding option
# is missing for these consecutive 
# comments. It works in other languages, 
# like in Javascript with // comment markers

code-folding

Repro Steps

Add several contiguous single-line comments in python language-selected editor. Hover mouse on the first comment between the comment and the line number column. Ideally, a fold/unfold icon would appear and be actionable.

Expected behavior

I expect the multiple single-line comments to be foldable in Python, like they are in JavaScript

Actual behavior

They are not treated as foldable, so there is no option to fold them

Logs

After setting logLevel to Trace and restarting VS Code, there is no output in the panel to copy.

@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label May 22, 2024
@debonte debonte added enhancement New feature or request and removed needs repro Issue has not been reproduced yet labels May 22, 2024
@debonte
Copy link
Contributor

debonte commented May 22, 2024

Moving this issue to discussions as an enhancement request for comments and upvotes.

@microsoft microsoft locked and limited conversation to collaborators May 22, 2024
@debonte debonte converted this issue into discussion #5905 May 22, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants