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

Filtering certain source results #20

Open
Chaitanyabsprip opened this issue Dec 25, 2021 · 5 comments
Open

Filtering certain source results #20

Chaitanyabsprip opened this issue Dec 25, 2021 · 5 comments

Comments

@Chaitanyabsprip
Copy link

https://www.reddit.com/r/neovim/comments/o5siul/is_there_a_preferred_way_to_disable_lsp/

I am basically trying to do what the OP in the above post is. However I wish to do that for all servers and not only lua.

I want to filter out the text type completions coming from the server.

@scallaway
Copy link

I too am trying to do the same thing!

image

In this image, if I try and call console.log({ command }); the actual constant that I want is towards the bottom of the list, with a load of unnecessary Text values above it.

I don't have a very complex cmp setup, so I'm surprised that it's acting in this way.

@hrsh7th
Copy link
Owner

hrsh7th commented May 11, 2022

I guess you are using null-ls.nvim. It's completion feature sometimes suggest false positve candidates.

@scallaway
Copy link

I will seek assistance over there!

@scallaway
Copy link

In my case, it was the fact that I had the "spell" source enabled through null-ls which was producing those suggestions.

Turning that off (at least in the file types where I don't want it) sorted my issues.

@bennypowers
Copy link

bennypowers commented Jul 5, 2022

Take this javascript source:

import { html, render } from 'lit-html';

render(html`
  <p>I'm a little teapot</p>
  
`, document.body);

With the cursor on the line below the <p> tag, I'd like to receive emmet completions from emmet_ls, but when the cursor is on the line beneath the import statement, I certainly would not like to receive emmet completions.

I would like the ability to filter lsp snippets by treesitter context.

Could SourceConfig also take an enabled predicate?

sanathsharma added a commit to sanathsharma/dotfiles that referenced this issue Sep 9, 2024
suggests text which are anoying in coding context. See
hrsh7th/cmp-nvim-lsp#20 for more info on the
issue
sanathsharma added a commit to sanathsharma/dotfiles that referenced this issue Sep 9, 2024
suggests text which are anoying in coding context. See
hrsh7th/cmp-nvim-lsp#20 for more info on the
issue
sanathsharma added a commit to sanathsharma/dotfiles that referenced this issue Sep 9, 2024
suggests text which are anoying in coding context. See
hrsh7th/cmp-nvim-lsp#20 for more info on the
issue
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

4 participants