mrcjkb / rustaceanvim

Supercharge your Rust experience in Neovim! A heavily modified fork of rust-tools.nvim
GNU General Public License v2.0
1.3k stars 47 forks source link

Full Support for SnippetTextEdits in CodeAction #412

Open IndianBoy42 opened 1 month ago

IndianBoy42 commented 1 month ago

Feature description

It would be nice to have support for SnippetTextEdits in code actions considering how much rust-analyzer uses it for assists

https://github.com/rust-lang/rust-analyzer/blob/master/docs/dev/lsp-extensions.md#snippet-textedit

its actually part of the upcoming 3.18 lsp protocol, but I don't know when that means neovim core will support it. I don't know if native vim.snippets supports enough for it but actually either way it would be nice for the snippet function to be overridable so, for example, LuaSnip users can use it with LuaSnip

Reference: https://github.com/L3MON4D3/LuaSnip/issues/235

Half? an implementation previously: https://github.com/simrat39/rust-tools.nvim/tree/snippet_text_edits

mrcjkb commented 1 month ago

Hey :wave:

I will gladly look into picking this up. However, it looks like it will take some time, as there may be things that need to be ironed out in luasnip.