Skip to content

Commit

Permalink
docs: add default provider options to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Saghen committed Oct 24, 2024
1 parent e3a811b commit 49e5112
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ MiniDeps.add({
module = 'blink.cmp.sources.lsp',

--- *All* of the providers have the following options available
--- NOTE: All of these options may be functions to enable dynamic behavior
--- NOTE: All of these options may be functions to get dynamic behavior
--- See the type definitions for more information
enabled = true, -- whether or not to enable the provider
transform_items = nil, -- function to transform the items before they're returned
Expand All @@ -259,11 +259,24 @@ MiniDeps.add({
name = 'Path',
module = 'blink.cmp.sources.path',
score_offset = 3,
opts = {
trailing_slash = false,
label_trailing_slash = true,
get_cwd = function(context) return vim.fn.expand(('#%d:p:h'):format(context.bufnr)) end,
show_hidden_files_by_default = false,
}
},
snippets = {
name = 'Snippets',
module = 'blink.cmp.sources.snippets',
score_offset = -3,
opts = {
friendly_snippets = true,
search_paths = { vim.fn.stdpath('config') .. '/snippets' },
global_snippets = { 'all' },
extended_filetypes = {},
ignored_filetypes = {},
}

--- Example usage for disabling the snippet provider after pressing trigger characters (i.e. ".")
-- enabled = function(ctx) return ctx ~= nil and ctx.trigger.kind == vim.lsp.protocol.CompletionTriggerKind.TriggerCharacter end,
Expand Down

0 comments on commit 49e5112

Please sign in to comment.