simrat39 / rust-tools.nvim

Tools for better development in rust using neovim's builtin lsp
MIT License
2.16k stars 158 forks source link

Looking for testers #227

Closed simrat39 closed 2 years ago

simrat39 commented 2 years ago

So I've been working on a rewrite / rewhatever of the plugin and am looking for testers to iron out any issues before I can merge it in and get the ball rolling on new features.

https://github.com/simrat39/rust-tools.nvim/tree/modularize_and_inlay_rewrite

Please test and let me know of any issues :pray:

This contains some breaking issues (only in the config mainly), the readme has yet to be rewritten but it will be done soon hopefully

matze commented 2 years ago

Works well for me :+1:

joelpalmer commented 2 years ago

Hi, I am putting this report in this thread. Wasn't sure if you wanted your Issues list used for these testing issues. Let me know if you would like me to move it.

When running :RustCodeAction:

Error detected while processing CursorMoved Autocommands for "<buffer=3>":
E5108: Error executing lua ...art/rust-tools.nvim/lua/rust-tools/code_action_group.lua:284: Expected Lua number
stack traceback:
        [C]: in function 'nvim_win_get_cursor'
        ...art/rust-tools.nvim/lua/rust-tools/code_action_group.lua:284: in function 'on_cursor_move'
        [string ":lua"]:1: in main chunk

This does not happen on master and the Code Actions menu works as expected.

In general, the inlay_hints stuff works fine. I don't see any regressions and nothing is breaking. I will use the feature branch for work today and see if I come across anything else.

Love the plugin! Thanks for your hard work. 💪🏼

matze commented 2 years ago

Interesting, I see the same with :RustCodeAction but I tend to invoke coda actions via vim.lsp.buf.code_action() and that works as expected.

joelpalmer commented 2 years ago

Interesting, I see the same with :RustCodeAction but I tend to invoke coda actions via vim.lsp.buf.code_action() and that works as expected.

Same. Just reporting that this breaks on this feature branch but not on master. I know a lot of people still map to the commands instead of the lua functions. Especially those still transitioning to Lua.

Also, worked all day using this feature branch. Everything else seemed fine. I didn't hit all the commands. But, I did hit most of the underlying lua functions.

My workflow was not impacted. The inlay hints were showing up as expected. 👍🏼

simrat39 commented 2 years ago

Thanks for the reports, RustCodeAction should be fixed now :)

simrat39 commented 2 years ago

Also for the inlay-hints, consider using https://github.com/simrat39/inlay-hints.nvim . I might deprecate the inlay-hints in rust-tools in the future and the plugin above works for other lang servers as well

matze commented 2 years ago

Can you coordinate the efforts with @p00f 's https://github.com/p00f/clangd_extensions.nvim? I haven't checked if it's a problem but I would sleep better if the inlay-hints.nvim plugin does not interfere with it.

p00f commented 2 years ago

@matze it won't be a problem if inlay-hints.nvim doesn't do it for clangd, and if it does you can just disable it in clangd-extensions

matze commented 2 years ago

It does but if it can be disabled for clangd-extensions, that's alright. But wouldn't it make sense to drop it from clangd-extensions in the long run? Would be nice of course, if plugins were able to specify dependencies themselves, so that users do not have to be bothered to list a gazillion auxiliary plugins :shrug:

simrat39 commented 2 years ago

More breaking changes: we no longer override the hover handler for hover actions, users will have to manually set the keymap to hover_actions in their on_attach

simrat39 commented 2 years ago

Can you coordinate the efforts with @p00f 's https://github.com/p00f/clangd_extensions.nvim? I haven't checked if it's a problem but I would sleep better if the inlay-hints.nvim plugin does not interfere with it.

You can disable the hints from clangd extensions and just use the plugin

simrat39 commented 2 years ago

Ok final call for any issues, I've fixed everything that stood out for me, and will merge it either tonight or Monday, so yeah, please let me know if there is anything :+1:

simrat39 commented 2 years ago

Ok merged, let the issues roll in :(