Hey! Sorry to ask here, I reckon it might not be the best place, but I think it's better than an issue, as it really isn't one :slight_smile: .
I'm trying to find an example of code that generates a code lens with a
selectAndApplySourceEdit command, but I can't seem to find a way to get one of those. I browsed through the repo a little and didn't find anything that could help me there, but maybe I wasn't paying enough attention. Can anyone point me to an example or explain a situation in which that code lens would appear?
selectAndApplySourceEdit don't exist anymore, they used to be used for code actions but have been replaced by a different protocol extension: https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/dev/lsp-extensions.md#snippet-textedit
@Florian Diebold I see, nice! I'm adding an extension to LanguageClient-neovim and, considering the date of the commits on those files, I should probably account for users not using the latest version of rust-analyzer. Did this action (
applySourceChange) apply for for example extract variable actions? I will probably downgrade to a version of rust-analyzer that has them and try them out, is that a proper action to be looking at for this command?
Yes, but I would not recommend trying to keep compatibility with old versions
yeah I might just abandon that idea, it does feel like I'll end up in a slippery slope of having to maintain all version of all servers anyways, so yeah, probably not a good idea. Thanks for the help! :bow: