Skip to content

Code actions are no longer preferred #32

Open
@mainej

Description

@mainej

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions