feat(nvim): add luasnip
This commit is contained in:
parent
685f68f70a
commit
6c75b2ce66
|
@ -1,6 +1,12 @@
|
||||||
local cmp = require "cmp"
|
local cmp = require "cmp"
|
||||||
|
|
||||||
cmp.setup {
|
cmp.setup {
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
require('luasnip').lsp_expand(args.body)
|
||||||
|
end
|
||||||
|
},
|
||||||
|
|
||||||
mapping = {
|
mapping = {
|
||||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||||
|
@ -23,6 +29,7 @@ cmp.setup {
|
||||||
{ name = "nvim_lua" },
|
{ name = "nvim_lua" },
|
||||||
|
|
||||||
-- Plugins
|
-- Plugins
|
||||||
|
{ name = "luasnip" },
|
||||||
{ name = "cmp_tabnine" },
|
{ name = "cmp_tabnine" },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,10 +30,12 @@ Plug 'JoosepAlviste/nvim-ts-context-commentstring'
|
||||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||||
|
|
||||||
" Completion
|
" Completion
|
||||||
|
Plug 'L3MON4D3/LuaSnip'
|
||||||
Plug 'hrsh7th/cmp-buffer'
|
Plug 'hrsh7th/cmp-buffer'
|
||||||
Plug 'hrsh7th/cmp-nvim-lsp'
|
Plug 'hrsh7th/cmp-nvim-lsp'
|
||||||
Plug 'hrsh7th/cmp-path'
|
Plug 'hrsh7th/cmp-path'
|
||||||
Plug 'hrsh7th/nvim-cmp'
|
Plug 'hrsh7th/nvim-cmp'
|
||||||
|
Plug 'saadparwaiz1/cmp_luasnip'
|
||||||
Plug 'tzachar/cmp-tabnine', { 'do': './install.sh' }
|
Plug 'tzachar/cmp-tabnine', { 'do': './install.sh' }
|
||||||
|
|
||||||
" LSP
|
" LSP
|
||||||
|
|
Loading…
Reference in a new issue