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

🐛 Biome LSP does not announce the quickfix.suppressRule code action to a client #4116

Closed
1 task done
vitallium opened this issue Sep 29, 2024 · 2 comments
Closed
1 task done
Labels
A-LSP Area: language server protocol S-Enhancement Status: Improve an existing feature

Comments

@vitallium
Copy link
Contributor

Environment information

CLI:
  Version:                      1.9.2
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.17.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         unset

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 false

Workspace:
  Open Documents:               0

What happened?

  1. When Biome LSP sends its capabilities back to the client, it doesn't send the quickfix.suppressRule code action among the default code actions: quickfix.biome, source.fixAll.biome and source.organizeImports.biome`.
  2. Without that capability the client does not know that this code action is available on the server side.

How to reproduce:

  1. Install the Zed editor and the Biome extension
  2. Create a simple Typescript file with the following content:
let hello;
  1. You should see the reported linting error from Biome LSP, but if you click on the available code actions, the quickfix.suppressRule option will be missing.

See also microsoft/vscode-eslint#1905 (comment)

Thanks! Let me know if you need anything else.

Expected result

The Biome LSP should send all possible code actions to a client to ensure that:

  1. The client knows about possible code actions
  2. The client does not send an invalid code action to a server.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@ematipico
Copy link
Member

Not a bug, because we don't handle that yet.

PRs are welcome

@ematipico ematipico added A-LSP Area: language server protocol S-Enhancement Status: Improve an existing feature labels Sep 29, 2024
@vitallium
Copy link
Contributor Author

Not a bug, because we don't handle that yet.

PRs are welcome

@ematipico Hi, thanks for the quick reply! I’m happy to contribute, but I’d like to know if you have anything specific in mind for the implementation, or should I just send a PR and we can iterate from there? Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LSP Area: language server protocol S-Enhancement Status: Improve an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants