-
Notifications
You must be signed in to change notification settings - Fork 184
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
LSP code actions on save not working #2495
Comments
Quick notes 1 Issue with the JSON schema
2 the code action on save is never sent to BiomeHere is the initialize response for Biome:
note Here is the initialize response for ESLint:
note This is important because when Then, there is this peace of code that probably needs to change: def _get_code_actions_on_save(cls, view: sublime.View) -> dict[str, bool]:
view_code_actions = cast(Dict[str, bool], view.settings().get('lsp_code_actions_on_save') or {})
code_actions = userprefs().lsp_code_actions_on_save.copy()
code_actions.update(view_code_actions)
allowed_code_actions = dict()
for key, value in code_actions.items():
- if key.startswith('source.'):
+ if key.startswith('source.') or key.startswith('quickfix.'):
allowed_code_actions[key] = value
return allowed_code_actions
And the third thing... All in all, there are things to fix on the Sublime Text LSP side. |
My impression was that only I said "rules" and not "spec" because that functionality is technically not specified and we're just trying to follow what Microsoft does in its products. I would start with creating a Biome issue to discuss that. |
Though if |
related microsoft/language-server-protocol#1629 (comment)
Just with this sentence, it kind of looks like QuickFix should not be in the list for code actions on save. |
From this comment I understand that it does not work in VS code, meaning ST behaves the same?
|
EDIT: I had disabled the biome linter in biome.json. And that is the reason why it didn't work in VS Code.
Yes. For more details ->
Triggering the VS Code req/res for the `quickfix.biome` code action
|
I've been reading biomejs/biome#1570 where people seem to be using |
My bad. I had I enabled the linter and code action on save started to work in VS Code.
|
I have read the LSP spec 2 times recently and went through few LSP spec issues and the way I understood is the following -> Biome should rename the code action on save to be more spec compliant. I've opened a ticket at the biome repo biomejs/biome#3339 |
Using the instructions for formatting on save does not seem to be working.
It works fine when called via the command palette.
Also seems like the action does not match the expected format?
The text was updated successfully, but these errors were encountered: