mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-07 20:39:04 +03:00
22a2cc6950
This fixes https://github.com/zed-industries/zed/issues/13633 by not sending `source.organizeImports` to the ESLint language server anymore. Turns out that ESLint tells us through its capabilities that it doesn't support that code action kind, but we ignored that. What this code does is to check whether a given server supports specific code action kinds. It does this in two places: 1. When constructing the request: we now filter down the list of requested `kinds`, in case we can do so. If we can't filter down the list, we keep the previous behavior of sending the `language_server.code_action_kinds()` 2. Before sending the request: we now check whether the server even supports sending the request. This fixes the issue by only sending actions to servers that support it. I tested this with various language servers and setups and everything still works (or works better). But of course there are a ton of different combinations of language servers and code actions and file types, so I couldn't test them all. Release Notes: - Fix ESLint language server adding comments on save if the `source.organizeImports` code action was used on save. Zed now filters out code actions sent to the language servers by checking whether they are supported first. ([#13633](https://github.com/zed-industries/zed/issues/13633)). |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
LICENSE-GPL |