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

Code actions are not available in Zed #270

Open
rcjsuen opened this issue Jul 31, 2024 · 1 comment
Open

Code actions are not available in Zed #270

rcjsuen opened this issue Jul 31, 2024 · 1 comment
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Jul 31, 2024

image

connection.onCodeAction((codeActionParams: CodeActionParams): Command[] | PromiseLike<CodeAction[]> => {
if (applyEditSupport && codeActionParams.context.diagnostics.length > 0) {

Looks like we are a little over-aggressive here. Even if the client does not support workspace/applyEdit (which Zed does not), we can still just send code actions back with edit populated for the client to apply the edit locally.

@rcjsuen rcjsuen added the bug label Jul 31, 2024
@rcjsuen
Copy link
Owner Author

rcjsuen commented Jul 31, 2024

This alters the behaviour we initially implemented for #183 so the test that was added there will need to be updated accordingly. Looking at how things are now, we should have reviewed our implementations for textDocument/codeAction and textDocument/executeCommand when we made changes for #225.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant