add blink sources

This commit is contained in:
2025-06-19 18:27:14 +03:00
parent 09a7cda545
commit 08583ff839
2 changed files with 67 additions and 24 deletions

View File

@@ -2,11 +2,12 @@ return {
'saghen/blink.cmp',
-- optional: provides snippets for the snippet source
dependencies = {
'mikavilpas/blink-ripgrep.nvim',
'rafamadriz/friendly-snippets',
{ 'L3MON4D3/LuaSnip', version = 'v2.*' }
},
-- use a release tag to download pre-built binaries
version = 'v1.0.*',
version = 'v1.4.*',
opts = {
fuzzy = { implementation = 'prefer_rust_with_warning' },
@@ -34,7 +35,47 @@ return {
},
sources = {
default = { 'lsp', 'snippets', 'path', 'buffer' },
default = { 'lazydev', 'lsp', 'snippets', 'ripgrep', 'path', 'buffer' },
providers = {
lazydev = {
name = 'LazyDev',
module = 'lazydev.integrations.blink',
-- make lazydev completions top priority (see `:h blink.cmp`)
score_offset = 100,
},
ripgrep = {
module = 'blink-ripgrep',
name = 'Ripgrep',
-- the options below are optional, some default values are shown
---@module 'blink-ripgrep'
---@type blink-ripgrep.Options
opts = {
max_filesize = '1M',
project_root_marker = '.git',
project_root_fallback = true,
search_casing = '--ignore-case',
additional_rg_options = {},
fallback_to_regex_highlighting = true,
ignore_paths = {},
additional_paths = {},
future_features = {
backend = {
use = 'ripgrep',
},
},
debug = false,
},
transform_items = function(_, items)
for _, item in ipairs(items) do
-- example: append a description to easily distinguish rg results
item.labelDetails = {
description = '(rg)',
}
end
return items
end,
},
},
},
signature = { enabled = true }