fannheyward / coc-rust-analyzer

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

Inlay hints not showing up #1190

Closed Rushmore75 closed 11 months ago

Rushmore75 commented 11 months ago

What's the output of :CocInfo

## versions

vim version: NVIM v0.9.2
node version: v20.8.0
coc.nvim version: 0.0.82-d1568d56 2023-09-29 19:43:34 +0800
coc.nvim directory: /home/oliver/Documents/code_projects/sources/config/.config/nvim/plugged/coc.nvim
term: st-256color
platform: linux

## Log of coc.nvim

2023-10-09T23:28:05.976 INFO (pid:18272) [plugin] - coc.nvim initialized with node: v20.8.0 after 380
2023-10-09T23:28:06.146 INFO (pid:18272) [attach] - receive notification: highlight []
2023-10-09T23:28:06.811 INFO (pid:18272) [attach] - receive notification: highlight []
2023-10-09T23:28:07.595 INFO (pid:18272) [services] - LanguageClient Rust Analyzer Language Server state change: stopped => starting
2023-10-09T23:28:07.612 INFO (pid:18272) [language-client-index] - Language server "rust-analyzer" started with 18301
2023-10-09T23:28:07.637 INFO (pid:18272) [services] - LanguageClient Rust Analyzer Language Server state change: starting => running
2023-10-09T23:28:07.690 INFO (pid:18272) [services] - service rust-analyzer started
2023-10-09T23:28:07.741 INFO (pid:18272) [attach] - receive notification: highlight []
2023-10-09T23:28:08.936 INFO (pid:18272) [attach] - receive notification: highlight []
2023-10-09T23:28:09.733 INFO (pid:18272) [attach] - receive notification: highlight []
2023-10-09T23:28:10.270 INFO (pid:18272) [attach] - receive notification: highlight []
2023-10-09T23:28:11.443 INFO (pid:18272) [attach] - receive notification: highlight []
2023-10-09T23:28:14.078 INFO (pid:18272) [attach] - receive notification: showInfo []

What's the output of :CocCommand rust-analyzer.serverVersion

0.3.1689-standalone

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

0.72.0

Inlay hints are not showing up. They used to be, but now aren't. Not sure what happened to them. I have these enabled in my coc-settings.json

    "inlayHint.enable": true,
    "inlayHint.display": true,
    "inlayHint.enableParameter": true,
fannheyward commented 11 months ago

You're using nvim 0.9.2, and latest coc.nvim supports inline inlayHint https://github.com/neoclide/coc.nvim/pull/4648, that needs nvim 0.10+.

Yes, this is a breaking change for nvim stable users. Two solutions:

  1. downgrade your coc.nvim to https://github.com/neoclide/coc.nvim/commit/3dc6153a85ed0f185abec1deb972a66af3fbbfb4
  2. upgrade your nvim to 0.10, yes, this is nightly now.

https://github.com/fannheyward/coc-rust-analyzer/issues/1187

Sorry for the trouble.