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

VSCode: don't underline if there's already an error #1653

Closed
KraXen72 opened this issue Dec 11, 2023 · 5 comments · Fixed by #1659
Closed

VSCode: don't underline if there's already an error #1653

KraXen72 opened this issue Dec 11, 2023 · 5 comments · Fixed by #1659

Comments

@KraXen72
Copy link

since oxc is so quick, i often get to look at overlapping underlines with the default typescript extension:
image

it looks ugly.
obviously, i know that it's incorrect, i just haven't finished typing yet.
if it can't be detected that error underlines are overlapping with oxc blue ones, please add an option to the vscode extension to support a debounce time in ms.
Thanks!

@IWANABETHATGUY
Copy link
Contributor

@Boshen, here are my thoughts.
I did some quick research, there are a few ways we can implement linting debounce:

  1. Use a pull-based diagnostics implementation, but I think it is more suitable for the large project analysis scenario(e.g. typescript type checking, only specific file, and its dependency would be affected), also the implementation complexity is pretty high.
  2. debounce on the server side, better code reuse, but not sure if it is easy to implement debounce in Rust.

@Boshen
Copy link
Member

Boshen commented Dec 12, 2023

@Boshen, here are my thoughts. I did some quick research, there are a few ways we can implement linting debounce:

  1. Use a pull-based diagnostics implementation, but I think it is more suitable for the large project analysis scenario(e.g. typescript type checking, only specific file, and its dependency would be affected), also the implementation complexity is pretty high.
  2. debounce on the server side, better code reuse, but not sure if it is easy to implement debounce in Rust.

How does ESLint, Biome and Ruff do it?

@IWANABETHATGUY
Copy link
Contributor

microsoft/vscode-eslint#1461, microsoft/vscode-eslint#222, eslint has a default 200ms debounce on client side.Also user can choose lint timing onSaved or onChanged, maybe we can follow this?

@Boshen
Copy link
Member

Boshen commented Dec 12, 2023

microsoft/vscode-eslint#1461, microsoft/vscode-eslint#222, eslint has a default 200ms debounce on client side.Also user can choose lint timing onSaved or onChanged, maybe we can follow this?

Let's follow! Take a look at how Biome / Ruff does it since they are written in Rust.

@IWANABETHATGUY
Copy link
Contributor

both biome and ruff don't have a debounce logic, so I think following the eslint would be just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants