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

[Bug] CodeAction not working on latest nightly version #44

Open
hood opened this issue Oct 1, 2021 · 11 comments
Open

[Bug] CodeAction not working on latest nightly version #44

hood opened this issue Oct 1, 2021 · 11 comments

Comments

@hood
Copy link

hood commented Oct 1, 2021

Been using nvim-lsputils's version of the codeAction handler for a while now. Since my latest NeoVim update (version: 0.6.0-dev+368) doesn't work anymore, showing suggestions in the quickfix menu on the bottom instead of the usual popup menu it used before.

Config
2021-10-01_14-42

New, broken, behaviour:
2021-10-01_14-42

The commits which could've possibly caused this misbehaviour:
neovim/neovim@73280a7
neovim/neovim@ec4731d
neovim/neovim@63fde08 (<-- most likely)

@RishabhRD
Copy link
Owner

RishabhRD commented Oct 1, 2021

This PR code action resolve is responsible for it... Checking the file changes to update....

@RishabhRD
Copy link
Owner

Well they have actually removed the support for overriding codeaction.... We can override vim.ui.select for having floating menus.....

There are 2 options... not use codeaction request provided by neovim and implement it self or provide vim.ui.select.

@hood
Copy link
Author

hood commented Oct 1, 2021

Not sure about the best way. I'd say let's try the quickest of the two, then maybe change when a clear indication on how this should be done comes from neovim's maintainers (neovim/neovim#15848)

@RishabhRD
Copy link
Owner

@hood checkout lspactions, it has updated codeaction implementation. I have implemented the codeaction similar to what neovim nightly currently has, just I implemented it such that it is still customizable with vim.lsp.handlers and vim.lsp.with that is reflected in readme. I have not done the implementation for nvim-lsputils yet because I made some bad design decisions in start of project (as I was in my second year of undergrad that time) so it is little complicated to implement that in nvim-lsputils currently and would take a day or two to appear here.

@hood
Copy link
Author

hood commented Oct 1, 2021

Don't worry man, take your time. I can wait. I'll wait for the change to land in nvim-lsputils. What's lspactions btw? An alternative to nvim-lsputils?

@RishabhRD
Copy link
Owner

It is a kind of experimental alternative.... I was trying to stick with vim quickfix list for references, definition, etc just to enhance my productivity but neovim's default implementation was not enough extensible for my workflow... so I thought to write a highly extensible implementation myself and also tried to have better design decisions. So as a result, you can extend lspactions for things like sorting of codeactions by lsp, sorting of references to start with current line, or custom quickfix list behavior, etc... So it can also act like a framework for other's highly customized config.

I would make a breaking change in nvim-lsputils in sometime to have similar design like lspactions once I would be done with remaining experiments with lspactions

@hood
Copy link
Author

hood commented Oct 2, 2021

I've tried using lspactions with no success. Now I have a temporary solution going on: I've brutally overridden vim.lsp.buf with its old version in my configuration files. Let me know when nvim-lsputils has a nightly-compatible version, and if I can help in any way.

@hood
Copy link
Author

hood commented Oct 5, 2021

(no hurry, just checking)
Do you have an ETA for this update?

@hood
Copy link
Author

hood commented Oct 9, 2021

Hey, just to let you know, I implemented a custom plugin to do this as I was too eager to use the latest nightly version asap (I'm impatient, I know). It uses popfix just like this one, and overrides vim.ui.select instead of the codeAction handler. It's really small and has it's made of ~70 LOC in total, with no other dependencies than popfix itself. If you wanna take a look at it, and confirm it's decent enough, I can bring that code into this project, so we can adapt nvim-lsputils to the latest nightly versions. I have no need to keep my plugin alive, it was made just for fun and as a temporary solution, and I think collaborating with you would be better than pushing another plugin into the wild. Let me know.

Link here: https://github.com/hood/popui.nvim

@RishabhRD
Copy link
Owner

That's cool... It would take me time to do that in project as currently I am going through undergraduate interviews for jobs... So busy these days.

@Anakael
Copy link

Anakael commented Apr 19, 2022

Is there any progress? :)

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

No branches or pull requests

3 participants