update blink-cmp to 1.6, fix snippets jumps

This commit is contained in:
2025-08-05 17:22:33 +03:00
parent 28fb8bea85
commit c8e33adba0

View File

@@ -7,13 +7,25 @@ return {
{ 'L3MON4D3/LuaSnip', version = 'v2.*' } { 'L3MON4D3/LuaSnip', version = 'v2.*' }
}, },
-- use a release tag to download pre-built binaries -- use a release tag to download pre-built binaries
version = 'v1.4.*', version = 'v1.6.*',
---@module 'blink-cmp'
---@type blink.cmp.Config
opts = { opts = {
fuzzy = { implementation = 'prefer_rust_with_warning' }, fuzzy = { implementation = 'prefer_rust_with_warning' },
snippets = { snippets = {
preset = 'luasnip', preset = 'luasnip',
active = function(filter)
local snippet = require('luasnip')
local blink = require('blink.cmp')
if snippet.in_snippet() and not blink.is_visible() then
return true
else
if not snippet.in_snippet() and vim.fn.mode() == 'n' then snippet.unlink_current() end
return false
end
end
}, },
cmdline = { cmdline = {
@@ -46,25 +58,25 @@ return {
ripgrep = { ripgrep = {
module = 'blink-ripgrep', module = 'blink-ripgrep',
name = 'Ripgrep', name = 'Ripgrep',
score_offset = -2, score_offset = -5,
-- the options below are optional, some default values are shown -- the options below are optional, some default values are shown
---@module 'blink-ripgrep' ---@module 'blink-ripgrep'
---@type blink-ripgrep.Options ---@type blink-ripgrep.Options
opts = { 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 = { backend = {
use = 'ripgrep', use = 'ripgrep',
}, },
ripgrep = {
ignore_paths = {},
additional_paths = {},
additional_rg_options = {},
max_filesize = '1M',
project_root_fallback = true,
search_casing = '--ignore-case',
}, },
debug = false, project_root_marker = '.git',
fallback_to_regex_highlighting = true,
toggles = { debug = nil, },
}, },
transform_items = function(_, items) transform_items = function(_, items)
for _, item in ipairs(items) do for _, item in ipairs(items) do