Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Plugin fails to insert type annotation #57

Open
gvolpe opened this issue Oct 7, 2022 · 2 comments
Open

Plugin fails to insert type annotation #57

gvolpe opened this issue Oct 7, 2022 · 2 comments

Comments

@gvolpe
Copy link

gvolpe commented Oct 7, 2022

Foremost, thanks a lot for making this plugin available to all neo-vimmers out there!

The actions displayed by the code actions menu work most of the time, except for the "Insert type annotation" one of Kind: refactor.rewrite and Name: insert-inferred-type.

However, running :lua vim.lsp.buf.code_action() works without issues. I've tested it using the nvim-metals plugin for the Scala language.

Not sure how to debug this, but happy to do more debugging and provide more details if you can guide me a little bit.

NVIM v0.7.2
nvim-code-action-menu: latest master, revision: 58e12501ea028ff1171f8f06ea53891f7c6e1c3f

Here's a demo video showcasing the issue.

code-actions-menu-2022-10-07_11.56.26.mp4
@weilbith
Copy link
Owner

Damn it. The whole refactoring of this plugin is soooo overdue. I'm afraid something in the NeoVim core has changed again. But it is a bit awkward.
I'm very sorry for your inconvenience. Unless you are willed to dig into the code of the plugin yourself and open a PR. I'm afraid I still struggle to find time to properly work on this plugin again. I got too much intention and was poorly written. 😕

In theory you only have to make a manual call to figure out if this is a command or an edit. Afterwards you can check this or that execute function that calls the underlying NeoVim core functionality. Maybe that gives you already an hint.

But maybe this issue is a good impetus again...

@gvolpe
Copy link
Author

gvolpe commented Oct 16, 2022

@weilbith thanks a lot for your reply! No worries, raised the issue for awareness but you don't owe anyone anything, this is OSS :)

I have never written any Lua, so I may take this opportunity to finally learn some, though it may need to wait for now...

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

No branches or pull requests

2 participants