Open mainrs opened 4 days ago
I also use crates.nvim
, and when I was writing blink.compat I also had trouble getting it to work. I believe it was due the the difference in how blink triggers sources and how nvim-cmp handled the same, but I don't recall the exact problem. However, I switched to using crates.nvim's in-process LSP server, rather than directly using it as a source. Here's my config for that:
{
"Saecki/crates.nvim",
event = { "BufRead Cargo.toml" },
opts = {
completion = {
crates = {
enabled = true,
},
},
lsp = {
enabled = true,
actions = true,
completion = true,
hover = true,
},
},
},
As far as I know, this does the same as using just the nvim-cmp source, as well as more (LSP hover, etc). Is there a specific use case for using crates directly as a source that isn't covered by using its LSP server? If so, I'll look into fixing it.
Feature Description
I was trying to make blink work with https://github.com/saecki/crates.nvim using the compat layer. But I couldn't get it to work correctly. I don't get completions for the version inside of
Cargo.toml
files (as showcased in the video inside the readme file).My configuration looks like this:
I was also wondering if it is possible to rely on the lazy loading event that I configured for
crates.nvim
when using blink.compat, since I would have to add it inside thedependencies
field.