diff options
| author | Robert Günzler <r@gnzler.io> | 2026-02-10 12:32:48 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2026-02-10 12:41:25 +0100 |
| commit | 63feeb9f369fc6176e85c1c2d8fcc863caad1946 (patch) | |
| tree | 41cd5d2d1ec36e74e464caab722cc9b460153f04 /.vim/lua/internal/plugins/blink.lua | |
| parent | 5bd0a4aca65ecb9818ef1285982d160b6b6ff665 (diff) | |
start new
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to '')
| -rw-r--r-- | .config/nvim/lua/plugins/blink.lua (renamed from .vim/lua/internal/plugins/blink.lua) | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/.vim/lua/internal/plugins/blink.lua b/.config/nvim/lua/plugins/blink.lua index 1d0e0ae..1122bcc 100644 --- a/.vim/lua/internal/plugins/blink.lua +++ b/.config/nvim/lua/plugins/blink.lua @@ -6,14 +6,7 @@ return { lazy = false, dependencies = { - { - 'L3MON4D3/LuaSnip', - version = 'v2.*', - build = 'make install_jsregexp', - config = function() - require('internal.snippets') - end, - }, + { 'L3MON4D3/LuaSnip' }, }, init = function() @@ -26,11 +19,29 @@ return { hl(0, 'BlinkCmpLabelDescription', { link = 'Comment', force = true }) end, + opts_extend = { 'sources.default' }, + opts = { -- TODO: -- 'prefer_rust_with_warning', requires nightly rust, due to: -- https://github.com/rust-lang/rust/issues/86656 - fuzzy = { implementation = 'lua' }, + fuzzy = { + implementation = 'lua', + sorts = { + function(a, b) + local prio = { + snippets = 99, + -- everyting else 0 + } + local a_priority = prio[a.source_id] or 0 + local b_priority = prio[b.source_id] or 0 + if a_priority ~= b_priority then return a_priority > b_priority end + end, + -- defaults + 'score', + 'sort_text' + }, + }, appearance = { -- fallback to cmp highlight names @@ -42,7 +53,6 @@ return { sources = { providers = { buffer = { min_keyword_length = 3 }, - snippets = { min_keyword_length = 3 }, }, }, @@ -80,6 +90,5 @@ return { snippets = { preset = 'luasnip' }, }, - opts_extend = { 'sources.default' }, }, } |