Skip to content
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

Calculate possible code-actions kinds dynamically #871

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nemethf
Copy link
Collaborator

@nemethf nemethf commented Mar 12, 2022

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
Copy link

minikN commented Dec 1, 2022

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