completion tweaks

This commit is contained in:
iofq 2025-05-03 20:50:37 -05:00
parent 96a162e9e8
commit fb7e0a930a
8 changed files with 93 additions and 37 deletions

View file

@ -56,7 +56,6 @@ vim.diagnostic.config {
}
-- random keymaps
vim.keymap.set({ 'v', 'i' }, 'wq', '<esc>l', { noremap = true, silent = true })
vim.keymap.set('n', '<S-l>', vim.cmd.bnext, { noremap = true, silent = true })
vim.keymap.set('n', '<S-h>', vim.cmd.bprev, { noremap = true, silent = true })
vim.keymap.set('v', '<', '<gv')

View file

@ -18,6 +18,7 @@ return {
'nvim-lua/plenary.nvim',
'nvim-treesitter/nvim-treesitter',
'zbirenbaum/copilot.lua',
'MeanderingProgrammer/render-markdown.nvim',
},
opts = {
strategies = {

View file

@ -7,15 +7,26 @@ return {
'fang2hou/blink-copilot',
},
opts = {
fuzzy = {
sorts = {
'exact',
'score',
'sort_text',
},
},
sources = {
default = {
'lsp',
'path',
'snippets',
'omni',
'ripgrep',
'copilot',
},
providers = {
snippets = {
score_offset = -20,
},
ripgrep = {
module = 'blink-ripgrep',
name = 'rg',
@ -25,10 +36,10 @@ return {
copilot = {
module = 'blink-copilot',
name = 'Copilot',
score_offset = 100,
score_offset = 10,
async = true,
opts = {
max_completions = 3,
max_completions = 2,
debounce = 500,
auto_refresh = {
backward = false,
@ -63,7 +74,12 @@ return {
show_on_keyword = true,
},
},
signature = { enabled = true },
signature = {
enabled = true,
trigger = {
show_on_insert = true,
},
},
},
},
}

View file

@ -85,6 +85,13 @@ return {
prefix = 'gR',
},
}
require('mini.pairs').setup {
modes = { insert = true, command = true, terminal = false },
skip_next = [=[[%w%%%'%[%"%.%`%$]]=],
skip_ts = { 'string' },
skip_unbalanced = true,
markdown = true,
}
require('mini.git').setup()
local align_blame = function(au_data)
if au_data.data.git_subcommand ~= 'blame' then
@ -153,7 +160,15 @@ return {
show_integration_count = false,
},
}
vim.keymap.set('n', '<leader>nm', map.toggle, { noremap = true, desc = 'minimap open' })
local multi = require('mini.keymap').map_multistep
local combo = require('mini.keymap').map_combo
combo({ 'i', 'c', 'x', 's' }, 'wq', '<BS><BS><Esc>l')
multi({ 'i', 's' }, '<Tab>', { 'blink_accept', 'vimsnippet_next', 'jump_after_close', 'jump_after_tsnode' })
multi({ 'i', 's' }, '<S-Tab>', { 'vimsnippet_prev', 'jump_before_open', 'jump_before_tsnode' })
end)
end,
},

View file

@ -1,9 +1,4 @@
return {
{
'windwp/nvim-autopairs',
event = 'InsertEnter',
config = true,
},
{
'stevearc/oil.nvim',
opts = {
@ -37,8 +32,14 @@ return {
vim.api.nvim_set_hl(0, 'EyelinerSecondary', { underline = true, bold = true })
end,
},
{ 'tiagovla/scope.nvim', event = 'VeryLazy', config = true },
{ 'MeanderingProgrammer/render-markdown.nvim', event = 'VeryLazy', config = true },
{ 'tiagovla/scope.nvim', event = 'VeryLazy', config = true },
{
'MeanderingProgrammer/render-markdown.nvim',
event = 'VeryLazy',
opts = {
ft = { 'markdown', 'codecompanion ' },
},
},
{
'sindrets/diffview.nvim',
event = 'VeryLazy',
@ -110,6 +111,7 @@ return {
vim.api.nvim_set_hl(0, 'MiniDiffSignAdd', { fg = 'green', bold = true })
vim.api.nvim_set_hl(0, 'MiniDiffSignDelete', { fg = 'red', bold = true })
vim.api.nvim_set_hl(0, 'MiniDiffSignChange', { fg = 'green', bold = true })
vim.api.nvim_set_hl(0, 'BlinkCmpGhostText', { link = 'String' })
end,
},
{