Skip to content

Calculate possible code-actions kinds dynamically#871

Open
nemethf wants to merge 1 commit into
masterfrom
scratch/combined-action-kinds
Open

Calculate possible code-actions kinds dynamically#871
nemethf wants to merge 1 commit into
masterfrom
scratch/combined-action-kinds

Conversation

@nemethf

@nemethf nemethf commented Mar 12, 2022

Copy link
Copy Markdown
Collaborator

I thought the server must reply with a subset of the client's list of
codeActionKind during the initialization. But it's clearly not the case.
The typescript-language-server returns these 1:

["source.fixAll.ts" "source.removeUnused.ts" "source.addMissingImports.ts" ...]

The clangd server returns these 2:

["quickfix" "refactor" "info"]

(Additionally, in the current code there is a mismatch between what
Eglot initially sent and the completing read argument of
eglot-code-actions. "source" and "refactor" is missing from
`eglot-code-actions'. Was this intentional?)

Now, Eglot plays safe, and offers the union of the two lists as
possible completions in `eglot-code-actions'.

I thought the server must reply with a subset of the client's list of
codeActionKind during the initialization.  But it's clearly not the case.
The typescript-language-server returns these [1]:

  ["source.fixAll.ts" "source.removeUnused.ts" "source.addMissingImports.ts" ...]

The clangd server returns these [2]:

  ["quickfix" "refactor" "info"]

(Additionally, in the current code there is a mismatch between what
Eglot initially sent and the completing read arguemnt of
eglot-code-actions.  "source" and "refactor" is missing from
`eglot-code-actions'. Was this intentional?)

Now, Eglot plays safe, and offers the union of the two lists as
possible completions in `eglot-code-actions'.

[1]: #847 (comment)
[2]: #860
@minikN

minikN commented Dec 1, 2022

Copy link
Copy Markdown

Any news on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants