update blink-cmp to 1.6, fix snippets jumps
This commit is contained in:
@@ -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',
|
backend = {
|
||||||
project_root_marker = '.git',
|
use = 'ripgrep',
|
||||||
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,
|
ripgrep = {
|
||||||
|
ignore_paths = {},
|
||||||
|
additional_paths = {},
|
||||||
|
additional_rg_options = {},
|
||||||
|
max_filesize = '1M',
|
||||||
|
project_root_fallback = true,
|
||||||
|
search_casing = '--ignore-case',
|
||||||
|
},
|
||||||
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user