rustaceanvim icon indicating copy to clipboard operation
rustaceanvim copied to clipboard

Full Support for SnippetTextEdits in CodeAction

Open IndianBoy42 opened this issue 1 year ago • 3 comments

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

IndianBoy42 avatar May 28 '24 15:05 IndianBoy42

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.

mrcjkb avatar Jun 07 '24 09:06 mrcjkb

As an FYI: Neovim nightly now has vim.snippet to handle LSP snippets. Not sure if this could be applicable here?

JeanMertz avatar Sep 03 '24 12:09 JeanMertz

@JeanMertz yep, thanks. We have been discussing this in https://github.com/L3MON4D3/LuaSnip/issues/235#issuecomment-2154711508

mrcjkb avatar Sep 03 '24 13:09 mrcjkb