fannheyward / coc-rust-analyzer

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

coc/rust-analyzer too verbose? #1052

Closed tlafebre closed 2 years ago

tlafebre commented 2 years ago

Hello,

I'm using vim with coc and rust-analyzer. After a recent update I'm seeing a lot of distracting information with regard to types in my editor (the darkish blue color at the end of every line):

image

I didn't do anything to activate it; could it be that this was activated after an update?

I tried to deactivate it by changing my coc settings as follows:

{
  "rust-analyzer.server.path": "/home/user/.cargo/bin/rust-analyzer",
  "coc.preferences.formatOnSaveFiletypes": [ "rust"],
  "diagnostic.errorSign": "✘",
  "diagnostic.infoSign": "i",
  "languageserver": {
    "rust": {
      "command": "rust-analyzer",
      "filetypes": ["rust"],
      "rootPatterns": ["Cargo.toml"]
    }
  },
  "rust-analyzer.diagnostics.enable": false,
  "rust-analyzer.inlayHints.enable": false,
  "rust-analyzer.inlayHints.chainingHints.enable": false,
  "rust-analyzer.inlayHints.closureReturnTypeHints.enable": "never",
  "rust-analyzer.inlayHints.typeHints.enable": false,
  "rust-analyzer.inlayHints.parameterHints.enable": false,
  "rust-analyzer.signatureInfo.detail": "parameters"
}

But they don't have any effect. What am I missing here?

Thanks!

What's the output of :CocInfo

## versions

vim version: VIM - Vi IMproved 9.0 9000399
node version: v16.17.0
coc.nvim version: 0.0.82-b797c032 2022-09-04 21:59:01 +0800
coc.nvim directory: /home/user/.vim/pack/coc/start/coc.nvim
term: dumb
platform: linux

## Log of coc.nvim

2022-09-11T20:36:06.087 INFO (pid:389) [services] - registered service "languageserver.rust"
2022-09-11T20:36:06.098 INFO (pid:389) [services] - rust state change: stopped => starting
2022-09-11T20:36:06.152 INFO (pid:389) [services] - registered service "rust-analyzer"
2022-09-11T20:36:06.152 INFO (pid:389) [services] - Rust Analyzer Language Server state change: stopped => starting
2022-09-11T20:36:06.155 INFO (pid:389) [plugin] - coc.nvim initialized with node: v16.17.0 after 146ms
2022-09-11T20:36:06.170 INFO (pid:389) [language-client-index] - Language server "languageserver.rust" started with 402
2022-09-11T20:36:06.187 INFO (pid:389) [language-client-index] - Language server "rust-analyzer" started with 406
2022-09-11T20:36:06.205 INFO (pid:389) [services] - rust state change: starting => running
2022-09-11T20:36:06.205 INFO (pid:389) [services] - Rust Analyzer Language Server state change: starting => running
2022-09-11T20:36:06.229 INFO (pid:389) [services] - service languageserver.rust started
2022-09-11T20:36:06.233 INFO (pid:389) [services] - service rust-analyzer started
2022-09-11T20:38:47.648 INFO (pid:389) [attach] - receive notification: showInfo []
fannheyward commented 2 years ago

You've set rust-analyzer in your coc-settings.json with languageserver, not coc-rust-analyzer. You can disable the inlay hint by setting "inlayHint.filetypes": [].