feat(nvim): snippet config
This commit is contained in:
parent
d123d084d7
commit
36763ac5f6
2
nvimrc
2
nvimrc
|
@ -300,6 +300,7 @@ lua require "copilot_config"
|
|||
packadd! nvim-cmp " https://github.com/hrsh7th/nvim-cmp.git
|
||||
packadd! copilot-cmp " https://github.com/zbirenbaum/copilot-cmp.git
|
||||
packadd! vim-vsnip " https://github.com/hrsh7th/vim-vsnip.git
|
||||
packadd! vim-vsnip-integ " https://github.com/hrsh7th/vim-vsnip-integ.git
|
||||
packadd! cmp-vsnip " https://github.com/hrsh7th/cmp-vsnip.git
|
||||
packadd! cmp-nvim-lsp " https://github.com/hrsh7th/cmp-nvim-lsp.git
|
||||
packadd! cmp-buffer " https://github.com/hrsh7th/cmp-buffer.git
|
||||
|
@ -307,6 +308,7 @@ packadd! cmp-path " https://github.com/hrsh7th/cmp-path.git
|
|||
packadd! cmp-calc " https://github.com/hrsh7th/cmp-calc
|
||||
|
||||
lua require "nvim_cmp_config"
|
||||
lua require "snippet_config"
|
||||
|
||||
" LSP:
|
||||
packadd! nvim-lspconfig " https://github.com/neovim/nvim-lspconfig.git
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
local cmp = require("cmp")
|
||||
-- local cmp_buffer = require("cmp_buffer")
|
||||
|
||||
-- https://github.com/zbirenbaum/copilot-cmp#tab-completion-configuration-highly-recommended
|
||||
local has_words_before = function()
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
vim.api.nvim_set_keymap("i", "<TAB>", [[vsnip#jumpable(1) ? '<Plug>(vsnip-jump-next)' : '<Tab>']], { expr = true })
|
||||
vim.api.nvim_set_keymap("s", "<TAB>", [[vsnip#jumpable(1) ? '<Plug>(vsnip-jump-next)' : '<Tab>']], { expr = true })
|
||||
vim.api.nvim_set_keymap("i", "<S-TAB>", [[vsnip#jumpable(1) ? '<Plug>(vsnip-jump-prev)' : '<S-Tab>']], { expr = true })
|
||||
vim.api.nvim_set_keymap("s", "<S-TAB>", [[vsnip#jumpable(1) ? '<Plug>(vsnip-jump-prev)' : '<S-Tab>']], { expr = true })
|
Loading…
Reference in New Issue