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

add option to hide declarations in 'Outline' #12422

Closed
mrx23dot opened this issue Jun 28, 2024 · 3 comments
Closed

add option to hide declarations in 'Outline' #12422

mrx23dot opened this issue Jun 28, 2024 · 3 comments
Labels
enhancement Improvement to an existing feature Feature: Document Symbol Outline view and breadcrumbs Language Service more votes needed Issues that have been postponed until more community members upvote it
Milestone

Comments

@mrx23dot
Copy link

Type: Feature Request

In C code every prototype is also listed in Outline not just the function itself, which is just annoying.

image

I tried to hide them with

    "outline.showEnums": false,
    "outline.showClasses": false,
    "outline.showFields": false,
    "outline.showTypeParameters": false,
    "outline.showObjects": false,
    "outline.showConstructors": false,
    "outline.showPackages": false,

but none of them worked

Extension version: 1.17.5
VS Code version: Code 1.73.1 (6261075646f055b99068d3688932416f2346dd3b, 2022-11-09T04:27:29.066Z)
OS version: Windows_NT x64 10.0.19045
Modes: Unsupported
Sandboxed: No

@sean-mcmanus sean-mcmanus added Language Service Feature: Document Symbol Outline view and breadcrumbs enhancement Improvement to an existing feature labels Jun 28, 2024
@sean-mcmanus
Copy link
Collaborator

This is currently "by design", but we can treat this as a enhancement request. This occurs only if the declaration and definition are in the same file (a potential "workaround" would be to put the declarations in a header file). And the function declarations don't need to be declared if you're able to put the definitions used by later definitions before they're used if there's no mutual dependency.

@sean-mcmanus sean-mcmanus added the more votes needed Issues that have been postponed until more community members upvote it label Jun 28, 2024
@mrx23dot
Copy link
Author

mrx23dot commented Jun 29, 2024

If there are already so many options to hide different objects I would assume adding a new one would be max 3 lines of code, since object type already has a label "declaration"

    "outline.showEnums": false,
    "outline.showClasses": false,
    "outline.showFields": false,
    "outline.showTypeParameters": false,
    "outline.showObjects": false,
    "outline.showConstructors": false,
    "outline.showPackages": false,

My point is that in simple C I don't see much benefit listing any prototypes, thus it would always be noise.
As refecence, Eclipse IDE has an option to hide prototypes too.

About workaround, critical sw requires explicit prototypes before function definitions.
And most code base is already legacy code, so we cannot just freely move things around.

Copy link

This feature request is being closed due to insufficient upvotes. Please leave a 👍-upvote or 👎-downvote reaction on the issue to help us prioritize it. When enough upvotes are received, this issue will be eligible for our backlog.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 28, 2024
@github-actions github-actions bot added this to the Triage milestone Aug 28, 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 Feature: Document Symbol Outline view and breadcrumbs Language Service more votes needed Issues that have been postponed until more community members upvote it
Projects
Status: Done
Development

No branches or pull requests

2 participants