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

diagnostic error hints when typing are sometimes annoying #6668

Closed
el1s7 opened this issue Nov 14, 2024 · 2 comments
Closed

diagnostic error hints when typing are sometimes annoying #6668

el1s7 opened this issue Nov 14, 2024 · 2 comments
Assignees
Labels
needs repro Issue has not been reproduced yet

Comments

@el1s7
Copy link

el1s7 commented Nov 14, 2024

I don't know if something changed this past few months in this extension or VS Code in general (or if it's just me xD), but the error hints seem to somehow be getting more annoying.

Like, I still haven't finished typing a line of code but I will instantly get a red line hovering on anything while I'm still typing, not only annoying but also distracting. Example (notice the instant red underline):

Image

It would be really good if there were some configuration options such as:

  • diagnosticReportDelay: to set a custom delay/debounce timeout for diagnostic error reporting (i.e. how many ms after typing)
  • dianosticReportOnlyOnSave: to only show the error reporting when the file is saved.

It seems that there was an option before for setting the delay in the old microsoft/pylance-release (namely diagnosticPublishDelay), but there's no option anywhere now.

For comparison, if we look at this actual repo showcase GIF in readme from 3 years ago, you can notice that there is a bit longer delay before the warning underline report as you type.

Also, I just noticed that if I disable Pylance, and VS Code fallbacks to Jade, then there's a bit longer delay as well.

@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Nov 14, 2024
@el1s7
Copy link
Author

el1s7 commented Dec 18, 2024

@rchiodo @KacieKK can we have a configuration option for setting the delay/debounce for error reporting?

It was previously a supported configuration at the old python-language-server.

@rchiodo
Copy link
Contributor

rchiodo commented Dec 18, 2024

I think this should be relatively easy to support. Analysis already has a throttle here:
https://github.com/microsoft/pyright/blob/1f5a2bcdd8967804dba55762b5dbbe735867fece/packages/pyright-internal/src/analyzer/service.ts#L71, but I'm not sure if that applies to parse errors. The errors you're seeing are parse/syntax errors for invalid code.

That shouldn't be too hard to throttle either. Transferring issue to enhancements for upvotes.

@microsoft microsoft locked and limited conversation to collaborators Dec 18, 2024
@rchiodo rchiodo converted this issue into discussion #6787 Dec 18, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
needs repro Issue has not been reproduced yet
Projects
None yet
Development

No branches or pull requests

3 participants