update blink-cmp to 1.6, fix snippets jumps
This commit is contained in:
@@ -7,13 +7,25 @@ return {
|
||||
{ 'L3MON4D3/LuaSnip', version = 'v2.*' }
|
||||
},
|
||||
-- use a release tag to download pre-built binaries
|
||||
version = 'v1.4.*',
|
||||
version = 'v1.6.*',
|
||||
|
||||
---@module 'blink-cmp'
|
||||
---@type blink.cmp.Config
|
||||
opts = {
|
||||
fuzzy = { implementation = 'prefer_rust_with_warning' },
|
||||
|
||||
snippets = {
|
||||
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 = {
|
||||
@@ -46,25 +58,25 @@ return {
|
||||
ripgrep = {
|
||||
module = 'blink-ripgrep',
|
||||
name = 'Ripgrep',
|
||||
score_offset = -2,
|
||||
score_offset = -5,
|
||||
-- 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',
|
||||
},
|
||||
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)
|
||||
for _, item in ipairs(items) do
|
||||
|
||||
Reference in New Issue
Block a user