-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add CodeAction codeActionLiteralSupport Feature #4163
Conversation
Without this, rust-analyzer doesn't return any code actions. With it, everything works properly.
Not sure how to raise visibility on this, but this does fix rust-analyzer and doesn't break tests, which is great. Thanks for the improvements on my hasty code. Even though I don't write a ton of Rust, this makes ALE far more useful. The "Implement missing members" action alone is a huge productivity gain. |
Yeah I wanted to debug it but i saw that you had already figure it out so i just improved your pr. |
Special values like for example -1 to denote the end of a line are not supported. [reference](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay... not expert in LSP but from my test I can tell this does not breaks anything on my side and from the comments seems to be very useful.
Thanks for the contribution.
* Advertise codeActionLiteralSupport to LSP server Without this, rust-analyzer doesn't return any code actions. With it, everything works properly. * linter fixes * test cases fixes * Fix underflow of column in position. Special values like for example -1 to denote the end of a line are not supported. [reference](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position) Co-authored-by: Brian Gernhardt <brian@gernhardtsoftware.com>
* Advertise codeActionLiteralSupport to LSP server Without this, rust-analyzer doesn't return any code actions. With it, everything works properly. * linter fixes * test cases fixes * Fix underflow of column in position. Special values like for example -1 to denote the end of a line are not supported. [reference](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position) Co-authored-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Why the Pull Request?
As per ale dev philosophy point 8 this feature is added to allow use code actions like import fixes, implementation of interfaces. This could fix
no code action received from server
mentioned in #3523.The working is based on allowing lsp with capability
CodeActionClientCapabilities
withcodeActionLiteralSupport
to advertise as such.Tasks
References
Credits: @Benabik for initial version