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

Allow control over what extensions contribute to Problems list (and File Explorer) #44141

Closed
thomthom opened this issue Feb 21, 2018 · 22 comments
Assignees
Labels
error-list Problems view feature-request Request for new features or functionality file-decorations languages-diagnostics Source problems reporting on-testplan release-notes Release notes issues
Milestone

Comments

@thomthom
Copy link

I'm using a spell checker extension with VSCode with the intent of seeing the squiggly underlines in the editor for spelling issues.

However, these also get summarised under the Problems tab, and more recently they contribute to the error notation in the Folder view.

These warnings quickly gets noisy. I wish I could control which extensions contribute to these issue
summaries. For spell checking I wish to see the squiggly underline in the editor, but not see them summarized elsewhere.

From what I can tell, my current options are either to disable the spell checker (not a solution) or disable the Folder view warnings (also not desirable as I want warnings from other sources.).

I originally filed a feature request with the extension itself: streetsidesoftware/vscode-spell-checker#186 (comment)

But I was told that it wasn't under the control of the extension and rather a feature of VSCode itself.

image

image

Is there any chance this could be made possible? Maybe a setting once can configure to disable certain providers for the Problems panel and Folder view warnings?

@bpasero bpasero assigned sandy081 and unassigned bpasero Feb 21, 2018
@jrieken jrieken added feature-request Request for new features or functionality error-list Problems view file-decorations labels Feb 26, 2018
@jrieken
Copy link
Member

jrieken commented Feb 26, 2018

I like.. Two option that I can think of: (1) we have a setting which spells out the extensions and the places in which they can show errors/warning or (2) we add a new property the diagnostics api to signal that a diagnostics is 'local', e.g only to be shown in the editor... I kind of prefer the latter but it needs buy-in from extension authors.

@thomthom
Copy link
Author

thomthom commented Feb 26, 2018

I think both sounds like useful features;

(2) Is good to allow extension developers to provide sensible defaults.
(1) Is good to allow the user to override the extension defaults when personal preference doesn't match with the developer's. (Or the extension isn't that actively maintained to add support for the new feature.)

@jrieken jrieken added this to the March 2018 milestone Feb 27, 2018
@jrieken jrieken added the languages-diagnostics Source problems reporting label Mar 14, 2018
@jrieken
Copy link
Member

jrieken commented Mar 14, 2018

Idea from #45436 is to show diagnostics with severity Hint only in the editor...

@thomthom
Copy link
Author

So that would require the extension to update their diagnostics type to this new proposed type?

jrieken added a commit that referenced this issue Mar 14, 2018
@jrieken
Copy link
Member

jrieken commented Mar 14, 2018

The type isn't new, there already existed Error, Warning, Information, and Hint. Most extensions I have checked are already using Hint or Information, e.g. spell checkers, so it should be relatively smooth. First step will be not show Hint in the error panel nor the explorer.

@jrieken
Copy link
Member

jrieken commented Mar 14, 2018

  • only show errors/warnings/information? in the problems panel? @sandy081
  • only show errors/warnings in explorer
  • only visit errors/warnings/information in F8
  • adjust rendering for Hint in the editor (today we don't show a squiggle but the hover...)

@sandy081
Copy link
Member

only show errors/warnings/information? in the problems panel? @sandy081

Instead of not showing it completely, how about providing an option (check box) for showing types of problems. By default hints are deselected?

@jrieken
Copy link
Member

jrieken commented Mar 15, 2018

Hm, unsure.... for information yeah but for hints I am unsure

@jrieken
Copy link
Member

jrieken commented Mar 15, 2018

re #44141 (comment) @DustinCampbell @stevencl how does VS show diagnostics with severity hint? Grey underline as @mjbvz suggests?

sandy081 added a commit that referenced this issue Mar 19, 2018
@sandy081
Copy link
Member

Excluded hints from the Problems panel.

@jrieken
Copy link
Member

jrieken commented Mar 20, 2018

ping @stevencl

@stevencl
Copy link
Member

Sorry for the slow response. Here is an example. In the C# editor, I have a suggestion under this (the keyword is muted and there are three dots underneath).

image

@jrieken
Copy link
Member

jrieken commented Mar 20, 2018

Thanks

@alexdima
Copy link
Member

@stevencl How does this look like for a large (real-life) piece of code? Is there an upper bound to the number of suggestions displayed? Is this the default experience in Visual Studio?

I am concerned that these suggestions might end up dominating the source code or interfering significantly with the source code coloring / presentation.

@jrieken
Copy link
Member

jrieken commented Mar 21, 2018

Using a grey non-repeating squiggle

screen shot 2018-03-21 at 11 29 33

@jrieken
Copy link
Member

jrieken commented Mar 21, 2018

@mjbvz How will TypeScript use this? Will the whole document be full of severity hint diagnostics (basically for each and every applicable code action) or will TypeScript only use it for must-do code actions?

@stevencl
Copy link
Member

Here is a completely made up, non real world example of a few suggestions in one method:
image

Note that this is not the default experience - I changed a few settings so that it would offer suggestions for the likes of this. To get a better feel for it, go to the Tools Options in VS, choose Text editor, C#, Code Style, General and set the severity to Suggestion for a few styles.

I don`t know if there are any upper bounds.

@stevencl
Copy link
Member

Note that in VS, there are 33 general style rules for C# that you can configure the editor to provide suggestions for. Of these, only 16 are set to provide a suggestion by default. The others aren't turned on.

@jrieken
Copy link
Member

jrieken commented Mar 23, 2018

As discussed, using an ellipsis to show diagnostic severity hint.

screen shot 2018-03-23 at 13 26 54

@DustinCampbell
Copy link
Member

Cool! cc @rchande

@jrieken
Copy link
Member

jrieken commented Mar 26, 2018

@mjbvz see #44141 (comment), you might wanna add some config-settings for TypeScript/JavaScript suggestions

@jrieken jrieken closed this as completed Mar 26, 2018
@jrieken jrieken added the release-notes Release notes issues label Mar 28, 2018
@thomthom
Copy link
Author

Will there be further options to control what extensions contribute to the Problems/Explorer panel?

Asking because of this comment: streetsidesoftware/vscode-spell-checker#186 (comment)

The poster used an insider version with the changes that hides Hints;

"cSpell.diagnosticLevel": "Hint",

That worked, but misspelled words then only have the ... indicator in the editor instead of the desired squiggly lines;

@vscodebot vscodebot bot locked and limited conversation to collaborators May 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
error-list Problems view feature-request Request for new features or functionality file-decorations languages-diagnostics Source problems reporting on-testplan release-notes Release notes issues
Projects
None yet
Development

No branches or pull requests

7 participants