You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the migration away from lsp4j and the associated refactoring of the coercer, I missed something. The coercer checks code actions for a key :preferred, which is put in the json as "preferred". This key used to be translated into "isPreferred" which is what the LSP spec defines.
This explains why clients no longer sort preferred code actions at the top.
Rather than fix the issue here in lsp4clj, I'd rather fix the problem in the language servers. I don't like using the coercer to create a slightly different format than the LSP spec. We do that some, but I don't want to do it any more. So, I propose that we find the usages of :preferred in each language server, and convert them to :is-preferred. When that's done, we can change lsp4clj to check for that key.
I have access to clojure-lsp and the language server that my company works on, so I can take care of this in both. I'm opening this issue so that anyone else who uses lsp4clj can make the same changes on their end.
The text was updated successfully, but these errors were encountered:
I've applied this fix locally and unfortunately Emacs still doesn't sort the Add require commands first, so there may be something else wrong on the lsp-mode end.
In the migration away from lsp4j and the associated refactoring of the coercer, I missed something. The coercer checks code actions for a key
:preferred
, which is put in the json as"preferred"
. This key used to be translated into"isPreferred"
which is what the LSP spec defines.This explains why clients no longer sort preferred code actions at the top.
Rather than fix the issue here in lsp4clj, I'd rather fix the problem in the language servers. I don't like using the coercer to create a slightly different format than the LSP spec. We do that some, but I don't want to do it any more. So, I propose that we find the usages of
:preferred
in each language server, and convert them to:is-preferred
. When that's done, we can change lsp4clj to check for that key.I have access to clojure-lsp and the language server that my company works on, so I can take care of this in both. I'm opening this issue so that anyone else who uses lsp4clj can make the same changes on their end.
The text was updated successfully, but these errors were encountered: