nvim: picker + cmp tweaks

This commit is contained in:
Daniel Lundin 2025-01-11 23:08:35 +01:00
parent cea9b407c8
commit 2cd4b5c52a
Signed by: dln
SSH key fingerprint: SHA256:dQy1Xj3UiqJYpKR5ggQ2bxgz4jCH8IF+k3AB8o0kmdI
4 changed files with 12 additions and 9 deletions

View file

@ -28,6 +28,7 @@ require 'blink-cmp'.setup({
menu = { menu = {
auto_show = true, auto_show = true,
border = 'rounded',
direction_priority = { 'n' }, direction_priority = { 'n' },
draw = { draw = {
components = { components = {

View file

@ -34,7 +34,6 @@ local colors = {
selection = hsl(270, 75, 92), selection = hsl(270, 75, 92),
highlight_subtle = hsl(0, 0, 94), highlight_subtle = hsl(0, 0, 94),
highlight_intense = hsl(42, 100, 30), highlight_intense = hsl(42, 100, 30),
}, },
dark = { dark = {
@ -46,7 +45,7 @@ local colors = {
dimmed = hsl(212, 19, 25), dimmed = hsl(212, 19, 25),
-- dimmed_subtle = hsl(212, 19, 70), -- dimmed_subtle = hsl(212, 19, 70),
dimmed_subtle = hsl(212, 5, 65), dimmed_subtle = hsl(212, 19, 50),
highlight_subtle = hsl(212, 27, 11), highlight_subtle = hsl(212, 27, 11),
highlight_intense = hsl(58, 100, 60), highlight_intense = hsl(58, 100, 60),
@ -112,6 +111,8 @@ local setupGroups = function(c)
Special = { link = "NormalNC" }, Special = { link = "NormalNC" },
Type = { link = "NormalNC" }, Type = { link = "NormalNC" },
MsgArea = { fg = c.dimmed_subtle },
String = { fg = c.string }, String = { fg = c.string },
Visual = { bg = c.selection }, Visual = { bg = c.selection },
@ -176,8 +177,8 @@ local setupGroups = function(c)
InclineNormalNC = { bg = c.background }, InclineNormalNC = { bg = c.background },
WinSeparator = { bg = c.dialog_bg, fg = c.dialog_fg }, WinSeparator = { bg = c.dialog_bg, fg = c.dialog_fg },
NormalFloat = { bg = c.doc_bg, fg = c.doc_fg }, NormalFloat = { bg = c.background, fg = c.foreground },
FloatBorder = { fg = c.doc_fg }, FloatBorder = { fg = c.foreground },
FloatTitle = { fg = c.doc_fg, bold = true }, FloatTitle = { fg = c.doc_fg, bold = true },
Title = { fg = c.foreground, bold = true }, Title = { fg = c.foreground, bold = true },
@ -193,6 +194,7 @@ local setupGroups = function(c)
MiniClueDescGroup = { bg = c.background, fg = c.foreground, italic = true }, MiniClueDescGroup = { bg = c.background, fg = c.foreground, italic = true },
MiniClueDescSingle = { bg = c.background, fg = c.foreground }, MiniClueDescSingle = { bg = c.background, fg = c.foreground },
MiniClueSeparator = { link = "MiniClueBorder" }, MiniClueSeparator = { link = "MiniClueBorder" },
MiniClueSeparator = { link = "MiniClueBorder" },
MiniCursorWord = { underdotted = true, bold = true, sp = c.diagnostic_hint }, MiniCursorWord = { underdotted = true, bold = true, sp = c.diagnostic_hint },

View file

@ -84,9 +84,8 @@ vim.o.showcmd = false
vim.o.showmode = false vim.o.showmode = false
vim.o.smoothscroll = true vim.o.smoothscroll = true
vim.o.splitkeep = "screen" vim.o.splitkeep = "screen"
vim.o.timeoutlen = 1 vim.o.timeout = false
vim.o.timeout = true vim.o.updatetime = 250
vim.o.updatetime = 50
-- Use rg -- Use rg
vim.o.grepprg = [[rg --glob "!.jj" --glob "!.git" --no-heading --vimgrep --follow $*]] vim.o.grepprg = [[rg --glob "!.jj" --glob "!.git" --no-heading --vimgrep --follow $*]]

View file

@ -49,15 +49,16 @@ local picker_win_config = function()
height = height, height = height,
width = width, width = width,
row = 2, row = 2,
col = math.floor((vim.o.columns - width) / 2), col = 5,
} }
end end
require('mini.pick').setup({ require('mini.pick').setup({
mappings = { mappings = {
move_down = '<tab>', move_down = '<tab>',
move_up = '<S-tab>',
toggle_info = '<C-k>', toggle_info = '<C-k>',
toggle_preview = '<C-p>', toggle_preview = 'p',
}, },
options = { use_cache = true }, options = { use_cache = true },
window = { window = {