frederik-uni / zed-cargotom

6 stars 0 forks source link

ignore spacing characters when matching crates #4

Closed kurtbuilds closed 1 month ago

kurtbuilds commented 1 month ago

When I autocomplete packages in rust, the match ignores spacing characters (_ and -). so tokioc will match tokio_cron tokio-cache, tokio-channel, tokiocli and more.

This is especially helpful because there's no standardization in crates.io whether _ or - is used as the crate name.

frederik-uni commented 1 month ago

that's already how it behaves. What's the issue/suggestion?

kurtbuilds commented 1 month ago

That's weird. Is it possible this is before the index has been mirrored down locally? It's working right now, but it definitely wasn't when I first installed the extension earlier.

There's a related quibble issue, which is that if I do use a -, it ends the completion, so typing tokio- will close the completion box, rather than completing to tokio-scheduler, tokio-cassandra and so on.

frederik-uni commented 1 month ago

that this behavior didn't work from the beginning could be due to using the crates.io api while the index wasn't downloaded yet. I don't host the api and therefor can't be fixed.

That's weird. Is it possible this is before the index has been mirrored down locally? It's working right now, but it definitely wasn't when I first installed the extension earlier.

There's a related quibble issue, which is that if I do use a -, it ends the completion, so typing tokio- will close the completion box, rather than completing to tokio-scheduler, tokio-cassandra and so on.

this was fixed about a minute ago. restarting the lsp in a few minutes should fix that

kurtbuilds commented 1 month ago

Thank you for fixing these issues. Been loving Zed and this is a critical part of my workflow when using it!