chore(honme-manager): rework neovim cmp plugin configuration
This commit is contained in:
parent
f2569180aa
commit
ca3b35afc0
3 changed files with 44 additions and 23 deletions
|
@ -1,8 +1,14 @@
|
|||
require("blink.cmp").setup({
|
||||
keymap = {
|
||||
preset = "cmdline",
|
||||
preset = "none",
|
||||
['<C-b>'] = { 'scroll_documentation_up', 'fallback' },
|
||||
['<C-f>'] = { 'scroll_documentation_down', 'fallback' },
|
||||
['<Tab>'] = { 'select_next', 'fallback' },
|
||||
['<S-Tab>'] = { 'select_prev', 'fallback' },
|
||||
['<C-space>'] = { 'show', 'fallback' },
|
||||
['<C-y>'] = { 'select_and_accept' },
|
||||
['<C-e>'] = { 'cancel' },
|
||||
|
||||
},
|
||||
completion = {
|
||||
menu = {
|
||||
|
@ -38,6 +44,16 @@ require("blink.cmp").setup({
|
|||
"dictionary",
|
||||
},
|
||||
providers = {
|
||||
path = {
|
||||
module = 'blink.cmp.sources.path',
|
||||
score_offset = 3,
|
||||
opts = {
|
||||
trailing_slash = false,
|
||||
label_trailing_slash = false,
|
||||
get_cwd = function(context) return vim.fn.expand(('#%d:p:h'):format(context.bufnr)) end,
|
||||
show_hidden_files_by_default = true,
|
||||
}
|
||||
},
|
||||
emoji = {
|
||||
module = "blink-emoji",
|
||||
name = "Emoji",
|
||||
|
@ -61,8 +77,26 @@ require("blink.cmp").setup({
|
|||
end,
|
||||
},
|
||||
},
|
||||
buffer = {
|
||||
module = 'blink.cmp.sources.buffer',
|
||||
score_offset = -3,
|
||||
min_keyword_length = 4,
|
||||
opts = {
|
||||
-- default to all visible buffers
|
||||
get_bufnrs = function()
|
||||
return vim
|
||||
.iter(vim.api.nvim_list_wins())
|
||||
:map(function(win) return vim.api.nvim_win_get_buf(win) end)
|
||||
:filter(function(buf) return vim.bo[buf].buftype ~= 'nofile' end)
|
||||
:totable()
|
||||
end,
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
fuzzy = {
|
||||
max_typos = function() return 0 end,
|
||||
},
|
||||
cmdline = {
|
||||
enabled = false,
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue