mirror of
https://github.com/cap153/nvim.git
synced 2025-12-26 11:14:56 +08:00
优化键位设置
This commit is contained in:
parent
ab65980ad2
commit
ae1bfdf6c3
1 changed files with 8 additions and 8 deletions
|
|
@ -10,15 +10,15 @@ return {
|
|||
['<C-space>'] = { 'show', 'show_documentation', 'hide_documentation' },
|
||||
-- ['<C-e>'] = { 'hide' },
|
||||
-- fallback命令将运行下一个非闪烁键盘映射(回车键的默认换行等操作需要)
|
||||
['<CR>'] = { 'accept', 'fallback' }, -- 'select_and_accept'会选择第一项插入
|
||||
['<CR>'] = { 'accept', 'fallback' }, -- 更改成'select_and_accept'会选择第一项插入
|
||||
['<S-Tab>'] = { 'select_prev', 'snippet_backward', 'fallback' },
|
||||
['<Tab>'] = { 'select_next', 'snippet_forward', 'fallback' },
|
||||
['<Tab>'] = { 'select_next', 'snippet_forward', 'fallback' }, -- 同时存在补全列表和snippet时,补全列表选择优先级更高
|
||||
|
||||
['<C-b>'] = { 'scroll_documentation_up', 'fallback' },
|
||||
['<C-f>'] = { 'scroll_documentation_down', 'fallback' },
|
||||
|
||||
['<C-e>'] = { 'snippet_forward', 'fallback' },
|
||||
['<C-u>'] = { 'snippet_backward', 'fallback' },
|
||||
['<C-e>'] = { 'snippet_forward', 'select_next', 'fallback' }, -- 同时存在补全列表和snippet时,snippet跳转优先级更高
|
||||
['<C-u>'] = { 'snippet_backward', 'select_prev', 'fallback' },
|
||||
|
||||
},
|
||||
completion = {
|
||||
|
|
@ -54,10 +54,10 @@ return {
|
|||
default = { 'buffer', 'lsp', 'path', 'snippets', },
|
||||
providers = {
|
||||
-- score_offset设置优先级数字越大优先级越高
|
||||
buffer = { score_offset = 3 },
|
||||
lsp = { score_offset = 2 },
|
||||
path = { score_offset = 1 },
|
||||
snippets = { score_offset = 4 },
|
||||
buffer = { score_offset = 2 },
|
||||
lsp = { score_offset = 1 },
|
||||
path = { score_offset = 4 },
|
||||
snippets = { score_offset = 3 },
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue