mirror of
https://github.com/iofq/nvim.nix.git
synced 2026-01-23 08:55:16 -06:00
refactor(flake): tidy up inputs attrset
This commit is contained in:
parent
7e87ede672
commit
4dfe6c4c33
9 changed files with 263 additions and 295 deletions
|
|
@ -1,28 +1,42 @@
|
|||
return {
|
||||
{
|
||||
'saghen/blink.cmp',
|
||||
event = "VeryLazy",
|
||||
event = 'VeryLazy',
|
||||
dependencies = {
|
||||
'rafamadriz/friendly-snippets',
|
||||
'mikavilpas/blink-ripgrep.nvim'
|
||||
'mikavilpas/blink-ripgrep.nvim',
|
||||
'fang2hou/blink-copilot',
|
||||
},
|
||||
opts = {
|
||||
sources = {
|
||||
default = {
|
||||
"lsp",
|
||||
"path",
|
||||
"snippets",
|
||||
"buffer",
|
||||
"ripgrep",
|
||||
'lsp',
|
||||
'path',
|
||||
'omni',
|
||||
'ripgrep',
|
||||
'copilot',
|
||||
},
|
||||
providers = {
|
||||
ripgrep = {
|
||||
module = "blink-ripgrep",
|
||||
name = "rg",
|
||||
score_offset = -10,
|
||||
module = 'blink-ripgrep',
|
||||
name = 'rg',
|
||||
score_offset = -30,
|
||||
async = true,
|
||||
},
|
||||
}
|
||||
copilot = {
|
||||
module = 'blink-copilot',
|
||||
name = 'Copilot',
|
||||
score_offset = 100,
|
||||
async = true,
|
||||
opts = {
|
||||
max_completions = 3,
|
||||
debounce = 500,
|
||||
auto_refresh = {
|
||||
backward = false,
|
||||
forward = true,
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
cmdline = {
|
||||
completion = {
|
||||
|
|
@ -34,62 +48,22 @@ return {
|
|||
completion = {
|
||||
documentation = {
|
||||
auto_show = true,
|
||||
auto_show_delay_ms = 100
|
||||
},
|
||||
list = {
|
||||
selection = {
|
||||
preselect = false,
|
||||
auto_insert = true,
|
||||
}
|
||||
},
|
||||
ghost_text = {
|
||||
enabled = true,
|
||||
auto_show_delay_ms = 500,
|
||||
},
|
||||
menu = {
|
||||
draw = {
|
||||
treesitter = { "lsp" },
|
||||
treesitter = { 'lsp' },
|
||||
columns = {
|
||||
{ "label", "label_description", gap = 1 },
|
||||
{ "source_name", "kind", gap = 1 }
|
||||
{ 'label', 'label_description', gap = 1 },
|
||||
{ 'source_name', 'kind', gap = 1 },
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
trigger = {
|
||||
show_on_keyword = true,
|
||||
}
|
||||
},
|
||||
},
|
||||
signature = { enabled = true }
|
||||
}
|
||||
},
|
||||
{
|
||||
'L3MON4D3/luasnip',
|
||||
event = 'VeryLazy',
|
||||
dependencies = { 'rafamadriz/friendly-snippets' },
|
||||
config = function()
|
||||
local ls = require('luasnip')
|
||||
ls.config.set_config {
|
||||
history = true,
|
||||
updateevents = 'TextChanged, TextChangedI',
|
||||
}
|
||||
require('luasnip.loaders.from_vscode').lazy_load()
|
||||
|
||||
vim.keymap.set({ 'i', 's' }, '<C-J>', function()
|
||||
if ls.expand_or_jumpable() then
|
||||
ls.expand_or_jump()
|
||||
end
|
||||
end, { silent = true })
|
||||
|
||||
vim.keymap.set({ 'i', 's' }, '<C-K>', function()
|
||||
if ls.jumpable(-1) then
|
||||
ls.jump(-1)
|
||||
end
|
||||
end, { silent = true })
|
||||
|
||||
vim.keymap.set({ 'i', 's' }, '<C-L>', function()
|
||||
if ls.choice_active() then
|
||||
ls.change_choice(1)
|
||||
end
|
||||
end, { silent = true })
|
||||
end,
|
||||
signature = { enabled = true },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue