completion and snacks tweaks

This commit is contained in:
iofq 2025-07-08 20:31:34 -05:00
parent d998429cb8
commit 0c18f504e8
No known key found for this signature in database
GPG key ID: ECF3B2DA38BF7183
4 changed files with 13 additions and 7 deletions

View file

@ -21,17 +21,21 @@ return {
'lsp', 'lsp',
'path', 'path',
'snippets', 'snippets',
'omni',
'ripgrep', 'ripgrep',
'buffer',
}, },
providers = { providers = {
lsp = {
fallbacks = {}, -- include buffer even when LSP is active
score_offset = 10,
},
snippets = { snippets = {
score_offset = -20, score_offset = -10,
}, },
ripgrep = { ripgrep = {
module = 'blink-ripgrep', module = 'blink-ripgrep',
name = 'rg', name = 'rg',
score_offset = -30, score_offset = -10,
async = true, async = true,
}, },
}, },

View file

@ -1,5 +1,5 @@
local M = {} local M = {}
sessions = require('mini.sessions') local sessions = require('mini.sessions')
M.get_id = function() M.get_id = function()
local jj_root = vim.system({ 'jj', 'workspace', 'root' }):wait() local jj_root = vim.system({ 'jj', 'workspace', 'root' }):wait()

View file

@ -123,7 +123,7 @@ return {
} }
require('plugins.lib.minipairs') { require('plugins.lib.minipairs') {
modes = { insert = true, command = true, terminal = false }, modes = { insert = true, command = false, terminal = false },
skip_next = [=[[%w%%%'%[%"%.%`%$]]=], skip_next = [=[[%w%%%'%[%"%.%`%$]]=],
skip_ts = { 'string' }, skip_ts = { 'string' },
skip_unbalanced = true, skip_unbalanced = true,
@ -196,6 +196,7 @@ return {
Snacks.rename.on_rename_file(event.data.from, event.data.to) Snacks.rename.on_rename_file(event.data.from, event.data.to)
end, end,
}) })
local multi = require('mini.keymap').map_multistep local multi = require('mini.keymap').map_multistep
multi({ 'i' }, '<BS>', { 'minipairs_bs' }) multi({ 'i' }, '<BS>', { 'minipairs_bs' })
multi({ 'i', 's' }, '<Tab>', { 'blink_accept', 'vimsnippet_next', 'increase_indent' }) multi({ 'i', 's' }, '<Tab>', { 'blink_accept', 'vimsnippet_next', 'increase_indent' })

View file

@ -38,9 +38,10 @@ return {
smart = { smart = {
multi = { multi = {
require('plugins.lib.snacks').marks(), require('plugins.lib.snacks').marks(),
{ source = 'buffers', current = false }, { source = 'buffers', current = false },
'recent', 'recent',
{ source = 'files', hidden = true }, { source = 'files', hidden = true },
{ source = 'git_files', untracked = true },
}, },
}, },
}, },