mirror of
https://github.com/iofq/nvim.nix.git
synced 2026-01-23 08:55:16 -06:00
87 lines
1.9 KiB
Lua
87 lines
1.9 KiB
Lua
return {
|
|
{
|
|
'saghen/blink.cmp',
|
|
event = 'VeryLazy',
|
|
dependencies = {
|
|
'mikavilpas/blink-ripgrep.nvim',
|
|
},
|
|
opts = {
|
|
enabled = function()
|
|
return not vim.tbl_contains({ 'snacks_picker_input' }, vim.bo.filetype)
|
|
end,
|
|
fuzzy = {
|
|
sorts = {
|
|
'exact',
|
|
'score',
|
|
'sort_text',
|
|
},
|
|
},
|
|
sources = {
|
|
default = {
|
|
'lsp',
|
|
'path',
|
|
'snippets',
|
|
'ripgrep',
|
|
'buffer',
|
|
},
|
|
providers = {
|
|
lsp = {
|
|
fallbacks = {}, -- include buffer even when LSP is active
|
|
score_offset = 10,
|
|
},
|
|
snippets = {
|
|
score_offset = -10,
|
|
},
|
|
path = {
|
|
opts = {
|
|
get_cwd = function(_)
|
|
return vim.fn.getcwd() -- use nvim pwd instead of current file pwd
|
|
end,
|
|
},
|
|
},
|
|
ripgrep = {
|
|
module = 'blink-ripgrep',
|
|
name = 'rg',
|
|
score_offset = -10,
|
|
async = true,
|
|
},
|
|
},
|
|
},
|
|
cmdline = {
|
|
completion = {
|
|
menu = {
|
|
auto_show = true,
|
|
},
|
|
},
|
|
},
|
|
completion = {
|
|
documentation = {
|
|
auto_show = true,
|
|
auto_show_delay_ms = 500,
|
|
},
|
|
menu = {
|
|
draw = {
|
|
treesitter = { 'lsp' },
|
|
columns = {
|
|
{ 'label', 'label_description', gap = 1 },
|
|
{ 'source_name', 'kind', gap = 1 },
|
|
},
|
|
},
|
|
},
|
|
trigger = {
|
|
show_on_keyword = true,
|
|
},
|
|
},
|
|
signature = {
|
|
enabled = true,
|
|
trigger = {
|
|
show_on_insert = true,
|
|
},
|
|
},
|
|
},
|
|
config = function(_, opts)
|
|
require('blink.cmp').setup(opts)
|
|
vim.treesitter.language.register('markdown', 'blink-cmp-documentation')
|
|
end,
|
|
},
|
|
}
|