@matklad have you tried vim-ext for vscode? analyzer seems incompatible with vim-ext
No, I haven't tried that. Might be a good idea to run it with RUST_LOG=debug and see what's in the log
A common reason for incompatibility is that the client fails to send an initialized message.
@matklad okay, I'll try to debug it.
anyway, while searching for "vim", I got: https://github.com/rust-analyzer/rust-analyzer/search?q=vim&unscoped_q=vim
solution seems already there :slight_smile:
ahh, sorry, I thought that's about VIM the editor, not about vim the vscode plugin
yeah, that's a bad issue without a clear path to fix it : )
Fixing enhancedTyping with VIM would require vscode fix I believe, https://github.com/Microsoft/vscode/issues/13441
This also should really be a part of the protocol, instead of the horrid hack we currently use :)
(I changed the name of this stream as QA for the vscode-extension)
@matklad not sure whether vscode itself is the one to blame. how to stop the rust-analyzer poping up this error message? it's a bit annoying.
I think it's related to https://github.com/rust-analyzer/rust-analyzer/blob/4248b39993e2446c66f732ae9e45fb2f564099f5/crates/ra_lsp_server/src/main_loop.rs#L418-L423 , we could consider not reporting content modified error to the client
But yeah, I wonder if just reponding with
result: null will work as we want?
Is it possible to handle it in vscode client?
I think it's possible, but very complicated. Have you tried just returning a
null result in the server? Does it blow up something?
I have not, I can try in a bit to see if this can fixed easily. It would be nice since the pop-up is somewhat annoying
A workaround fix for this issue in rust-analyzer#903
Not sure if it is related but codelens fails to work once that happens and you have to switch files. My guess is that the client is expecting a specific error but I haven't looked into it
Have you tried it now, after rust-analyzer#903 was merged?
@vipentti not yet but soon,
cargo install-code ing
@matklad ra_lsp failed to figure out the implementations here:
Might be related to the generic param defaults :thinking:
Yeah we don't handle generics in this case.
I would assume that 'go to implementation' in vscode also fails on the above
since the codelens uses that internally
@csmoe where can i find that snippet?
I have a simple case with those features and it seems to work
@Jeremy Kolb it's from rustc codebase