mirror of
https://github.com/tomru/vim.git
synced 2026-03-03 06:27:18 +01:00
fix(snips): choice nodes for conventional commits
This commit is contained in:
@@ -54,7 +54,7 @@ local snippets = {
|
|||||||
|
|
||||||
{}
|
{}
|
||||||
]],
|
]],
|
||||||
{ i(1, 'type'), i(2, 'scope'), i(3, 'ticket'), i(4, 'message'), i(0) }
|
{ c(1, { t 'feat', t 'fix', t 'chore', t 'test', t 'docs' }), i(2, 'scope'), i(3, 'ticket'), i(4, 'message'), i(0) }
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -172,3 +172,12 @@ local snippets = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ls.add_snippets(nil, snippets, { key = 'my-snips' })
|
ls.add_snippets(nil, snippets, { key = 'my-snips' })
|
||||||
|
|
||||||
|
vim.api.nvim_set_keymap('i', '<C-n>', '<Plug>luasnip-next-choice', {})
|
||||||
|
vim.api.nvim_set_keymap('s', '<C-n>', '<Plug>luasnip-next-choice', {})
|
||||||
|
vim.api.nvim_set_keymap('i', '<C-p>', '<Plug>luasnip-prev-choice', {})
|
||||||
|
vim.api.nvim_set_keymap('s', '<C-p>', '<Plug>luasnip-prev-choice', {})
|
||||||
|
|
||||||
|
vim.cmd [[
|
||||||
|
inoremap <c-u> <cmd>lua require("luasnip.extras.select_choice")()<cr>
|
||||||
|
]]
|
||||||
|
|||||||
Reference in New Issue
Block a user