ycm-core / YouCompleteMe

A code-completion engine for Vim
http://ycm-core.github.io/YouCompleteMe/
GNU General Public License v3.0
25.43k stars 2.81k forks source link

The completion results provided by YCM with the first 'ctrl+space' are different from those with the second 'ctrl+space'. #4216

Closed ihexon closed 8 months ago

ihexon commented 8 months ago

I'm new here. When completing a simple C file with the YCM engine, the results obtained with the first 'ctrl+space' differ from those obtained with the second 'ctrl+space.'

Is this a feature or a bug?

First ctrl+space gives me

image

Second ctrl+space gives me

image

Thanks~

puremourning commented 8 months ago

It’s a quirk of clangd afaik

bstaletic commented 8 months ago

You could try let g:ycm_clangd_uses_ycmd_caching=1, as it affects the sorting as well. Warning: it will affect performance too.