fannheyward / coc-rust-analyzer

rust-analyzer extension for coc.nvim
MIT License
1.13k stars 39 forks source link

unresolved import regex: maybe a missing crate regex? #1203

Closed laoshaw closed 10 months ago

laoshaw commented 10 months ago

What's the output of :CocInfo

vim version: VIM - Vi IMproved 9.0 9002049
node version: v18.18.1
coc.nvim version: 0.0.82-d1568d56 2023-09-29 19:43:34 +0800
coc.nvim directory: /Users/tester/.vim/plugged/coc.nvim
term: iTerm.app
platform: darwin

## Log of coc.nvim

2023-11-03T21:06:33.148 INFO (pid:81511) [plugin] - coc.nvim initialized with node: v18.18.1 after 388
2023-11-03T21:06:33.148 INFO (pid:81511) [services] - LanguageClient Rust Analyzer Language Server state change: stopped => starting
2023-11-03T21:06:33.154 INFO (pid:81511) [language-client-index] - Language server "rust-analyzer" started with 81567
2023-11-03T21:06:33.167 INFO (pid:81511) [services] - LanguageClient Rust Analyzer Language Server state change: starting => running
2023-11-03T21:06:33.194 INFO (pid:81511) [services] - service rust-analyzer started
2023-11-03T21:06:36.849 INFO (pid:81511) [attach] - receive notification: showInfo []

What's the output of :CocCommand rust-analyzer.serverVersion 0.3.1713-standalone 2023-10-28

What's your coc-rust-analyzer version? You can get it from :CocList extensions 0.75.0

Issue: I have a simple helloworld program and 'cargo run' just fine, it uses regex, but vim complains it can not find regex:

src/main.rs| 1 col 5-9 error| unresolved import 'regex': maybe a missing crate 'regex'?

vscode worked fine for me though

fannheyward commented 10 months ago

The error format isn't like coc/coc-rust-analyzer's.

laoshaw commented 10 months ago

Thanks! indeed it's from ALE, I forgot to turn that off for rust.