forked from hrsh7th/nvim-cmp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
filter
option to sources (hrsh7th#1067)
* feat: add `source.filter` config This allows the user to specify a `filter` function for each source, like this: ```lua -- don't show entries with kind "Text" from the "nvim_lsp" source sources = { { name = "nvim_lsp", filter = function(entry, ctx) local kind = types.lsp.CompletionItemKind[entry:get_kind()] if kind == "Text" then return true end }, } ``` By utilizing the `ctx` parameter, the user can also ignore certain entries in certain contexts. * fixup! feat: add `source.filter` config * fixup! feat: add `source.filter` config
- Loading branch information
1 parent
b16e5bc
commit 913eb85
Showing
3 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters