Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple way to disable only snippets? #67

Closed
HugoPeters1024 opened this issue Dec 11, 2022 · 3 comments
Closed

Simple way to disable only snippets? #67

HugoPeters1024 opened this issue Dec 11, 2022 · 3 comments

Comments

@HugoPeters1024
Copy link

First of all, thanks for the amazing work it is extremely helpful.

I did have one request, while I would like to use nvim-cmp in general, I usually have very little interest in the snippets it provides. Would it be possible to have a simple way of expressing that I don't want the snippets without making the setup fully manual?

Perhaps another solution is the ordering, because the snippet suggestions are often higher in the list of suggestions than fields and methods which is super inconvenient.

@VonHeikemen
Copy link
Owner

VonHeikemen commented Dec 11, 2022

I think the easiest way is to uninstall rafamadriz/friendly-snippets.

Another way is to setup the sources yourself.

local lsp = require('lsp-zero')
lsp.preset('recommended')

lsp.setup_nvim_cmp({
  sources = {
    {name = 'path'},
    {name = 'nvim_lsp', keyword_length = 3},
    {name = 'buffer', keyword_length = 3},
  }
})

lsp.setup()

@HugoPeters1024
Copy link
Author

Thanks for the quick reply, that piece of configuration does not seem to affect anything. I even uninstalled rafamadriz/friendly-snippets but it still recommends a number of snippets as the first suggestions.

@HugoPeters1024
Copy link
Author

Oh nvm, it must have been confused for a bit, now they are gone! Many thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants