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

Integration with rust_tools/lsps that provide ssr #19

Open
IndianBoy42 opened this issue Feb 25, 2023 · 3 comments
Open

Integration with rust_tools/lsps that provide ssr #19

IndianBoy42 opened this issue Feb 25, 2023 · 3 comments

Comments

@IndianBoy42
Copy link

I really like the interactive ui. rust_analyzer provides a interface for structure search and replace, but using it through rust_tools.nvim amounts to just typing in the command line which isn't as intuitive as this plugin.

How hard would it be to integrate with rust_tools or any other lsp that provides SSR

@cshuaimin
Copy link
Owner

This plugin is quite different from rust_analyzer's ssr. This plugin

  • requires you to select a region first
  • search as you type
  • search in the current buffer only
    which is not the same in rust_analyzer. So I don't think it's possible to make the UI work with different "ssr providers".

Rust_analyzer allows you to type a // foo($a) ==>> $a.foo() comment and run ssr as code actions. I think it's more usable as you can edit it in normal mode. Is this what you want?

@IndianBoy42
Copy link
Author

With a little scaffolding keymap to copy over selected region into a comment of that structure it could work actually. I'll just go with that then

Also, how feasible would previewing the changes as we type be for this plugin?

@cshuaimin
Copy link
Owner

I’ve planned to add preview to each confirmation window when replacing.

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

2 participants