some new snippets
This commit is contained in:
parent
71a9cdd067
commit
5831837a9b
2 changed files with 39 additions and 23 deletions
|
@ -1,5 +1,3 @@
|
||||||
-- nvim cmp
|
|
||||||
|
|
||||||
-- setup completion menu
|
-- setup completion menu
|
||||||
vim.cmd([[
|
vim.cmd([[
|
||||||
set completeopt=menu,menuone,noselect
|
set completeopt=menu,menuone,noselect
|
||||||
|
@ -7,7 +5,8 @@ set completeopt=menu,menuone,noselect
|
||||||
|
|
||||||
-- setup cmp proper: pretty much default config
|
-- setup cmp proper: pretty much default config
|
||||||
local cmp = require'cmp'
|
local cmp = require'cmp'
|
||||||
return cmp.setup({
|
|
||||||
|
cmp.setup({
|
||||||
snippet = {
|
snippet = {
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
require'snippy'.expand_snippet(args.body)
|
require'snippy'.expand_snippet(args.body)
|
||||||
|
@ -48,4 +47,3 @@ return cmp.setup({
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ return require('packer').startup(function(use)
|
||||||
'lervag/vimtex',
|
'lervag/vimtex',
|
||||||
ft = { 'tex' },
|
ft = { 'tex' },
|
||||||
-- do not conceal stuff
|
-- do not conceal stuff
|
||||||
config = vim.cmd([[ let g:tex_conceal = '' ]]),
|
config = function() vim.cmd([[ let g:tex_conceal = '' ]]) end,
|
||||||
}
|
}
|
||||||
use 'lepture/vim-jinja'
|
use 'lepture/vim-jinja'
|
||||||
use 'neomutt/neomutt.vim'
|
use 'neomutt/neomutt.vim'
|
||||||
|
@ -102,7 +102,6 @@ return require('packer').startup(function(use)
|
||||||
'hrsh7th/cmp-buffer',
|
'hrsh7th/cmp-buffer',
|
||||||
'hrsh7th/cmp-path',
|
'hrsh7th/cmp-path',
|
||||||
'hrsh7th/cmp-nvim-lua',
|
'hrsh7th/cmp-nvim-lua',
|
||||||
-- snippets (hard requirement by cmp)
|
|
||||||
'dcampos/nvim-snippy',
|
'dcampos/nvim-snippy',
|
||||||
'dcampos/cmp-snippy'
|
'dcampos/cmp-snippy'
|
||||||
},
|
},
|
||||||
|
@ -111,6 +110,25 @@ return require('packer').startup(function(use)
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use {
|
||||||
|
'dcampos/nvim-snippy',
|
||||||
|
config = function()
|
||||||
|
require'snippy'.setup({
|
||||||
|
mappings = {
|
||||||
|
is = {
|
||||||
|
['<Tab>'] = 'expand_or_advance',
|
||||||
|
['<S-Tab>'] = 'previous',
|
||||||
|
},
|
||||||
|
nx = {
|
||||||
|
['<leader>x'] = 'cut_text',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
use 'dcampos/cmp-snippy'
|
||||||
|
use 'honza/vim-snippets'
|
||||||
|
|
||||||
-- neovim VSCode edition
|
-- neovim VSCode edition
|
||||||
use {
|
use {
|
||||||
'neovim/nvim-lspconfig',
|
'neovim/nvim-lspconfig',
|
||||||
|
|
Loading…
Add table
Reference in a new issue