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
|
||||
vim.cmd([[
|
||||
set completeopt=menu,menuone,noselect
|
||||
|
@ -7,7 +5,8 @@ set completeopt=menu,menuone,noselect
|
|||
|
||||
-- setup cmp proper: pretty much default config
|
||||
local cmp = require'cmp'
|
||||
return cmp.setup({
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require'snippy'.expand_snippet(args.body)
|
||||
|
@ -48,4 +47,3 @@ return cmp.setup({
|
|||
end,
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ return require('packer').startup(function(use)
|
|||
'lervag/vimtex',
|
||||
ft = { 'tex' },
|
||||
-- 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 'neomutt/neomutt.vim'
|
||||
|
@ -70,7 +70,7 @@ return require('packer').startup(function(use)
|
|||
use {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
requires = { 'kyazdani42/nvim-web-devicons', opt = true },
|
||||
after = { 'vim-moonfly-colors' },
|
||||
after = { 'vim-moonfly-colors' },
|
||||
config = function()
|
||||
require('lualine_setup')
|
||||
end,
|
||||
|
@ -93,23 +93,41 @@ return require('packer').startup(function(use)
|
|||
config = setup_fzf(),
|
||||
}
|
||||
|
||||
-- completion
|
||||
use {
|
||||
'hrsh7th/nvim-cmp',
|
||||
requires = {
|
||||
-- completion sources
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-buffer',
|
||||
'hrsh7th/cmp-path',
|
||||
'hrsh7th/cmp-nvim-lua',
|
||||
-- snippets (hard requirement by cmp)
|
||||
'dcampos/nvim-snippy',
|
||||
'dcampos/cmp-snippy'
|
||||
},
|
||||
config = function()
|
||||
require('completion')
|
||||
end,
|
||||
}
|
||||
-- completion
|
||||
use {
|
||||
'hrsh7th/nvim-cmp',
|
||||
requires = {
|
||||
-- completion sources
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-buffer',
|
||||
'hrsh7th/cmp-path',
|
||||
'hrsh7th/cmp-nvim-lua',
|
||||
'dcampos/nvim-snippy',
|
||||
'dcampos/cmp-snippy'
|
||||
},
|
||||
config = function()
|
||||
require('completion')
|
||||
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
|
||||
use {
|
||||
|
|
Loading…
Add table
Reference in a new issue