0

I use rust-analyzer as LSP-server and hrsh7th/nvim-compe for autocomplete. As you can see on the pic, LSP providing some special completion for default() function, but how can I apply it to my code?

enter image description here

9
  • Press <space>?
    – B Layer
    Sep 1, 2021 at 9:36
  • It just adds a space symbol
    – Fort
    Sep 1, 2021 at 9:41
  • What about <tab> or <enter>? If none of those works then perhaps your configuration isn't right. I don't know anything about the specific plugins you're using, though, so these are just suggestions based on how other autocompletions work. One thing you could try is disabling all other plugins and trying this in isolation...eliminate the possibility of some kind of conflict.
    – B Layer
    Sep 1, 2021 at 9:44
  • No, nothing works. I event commented whole my init.vim. <tab> just making a tabulation, <enter> just adding new line. Maybe instead I should add something to init.vim?
    – Fort
    Sep 1, 2021 at 10:14
  • Excluding your init.vim isn't a good idea. Look at the readme for the plugin. There's a whole bunch of config available. It looks like minimally you need to set 'completeopt'. If you haven't, you should always read the readme and/or docs thoroughly before posting a question.
    – B Layer
    Sep 1, 2021 at 10:19

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.