diff options
| author | Robert Günzler <r@gnzler.io> | 2021-11-02 17:30:24 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2021-11-02 19:06:47 +0100 |
| commit | 15a7ac4890dea48be140350c295d4d9ea05292ee (patch) | |
| tree | e0405ddaa98fa30ec336d2504a244e52b4910524 /.vim/lua/plugins.lua | |
| parent | 3768a6c1488c148cc07481687a47cb7cce02ad35 (diff) | |
vim: switch from ultisnips+snippets.nvim to snippy
Diffstat (limited to '.vim/lua/plugins.lua')
| -rw-r--r-- | .vim/lua/plugins.lua | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/.vim/lua/plugins.lua b/.vim/lua/plugins.lua index 7b15a7a..7d19781 100644 --- a/.vim/lua/plugins.lua +++ b/.vim/lua/plugins.lua @@ -1,4 +1,6 @@ --- vim: foldenable +-- vim: fen fdm=marker fdl=0 +---@diagnostic disable: undefined-global + -- load by calling `lua require('plugins')` from your init.vim local g = vim.g @@ -332,25 +334,19 @@ return require('packer').startup({function() use {'tjdevries/astronauta.nvim'} -- snippets - use {'SirVer/ultisnips', -- {{{ - disable = true, - requires = {'honza/vim-snippets'}, + use {'dcampos/nvim-snippy', -- {{{} + requires = { + 'honza/vim-snippets' + }, config = function() - vim.g.UltiSnipsJumpForwardTrigger = "<tab>" - vim.g.UltiSnipsJumpBackwardTrigger = "<s-tab>" + local S = require('snippy') + local K = require('astronauta.keymap') + K.inoremap { '<C-j>', function() if S.can_jump(1) then S.next() else return '<C-j>' end end } + K.inoremap { '<C-k>', function() if S.can_jump(-1) then S.previous() else return '<C-k>' end end } + K.snoremap { '<C-j>', function() if S.can_jump(1) then S.next() else return '<C-j>' end end } + K.snoremap { '<C-k>', function() if S.can_jump(-1) then S.previous() else return '<C-k>' end end } end} -- }}} - use {'norcalli/snippets.nvim', - config = function() - require('snippets').use_suggested_mappings() - -- NOTE(robert): write your own inserter using the plenary helpers - require('snips') - end} - - -- use {'L3MON4D3/LuaSnip', - -- config = "require('plugins._ultisnips')", - -- } - use {'junegunn/vim-easy-align'} use {'editorconfig/editorconfig-vim', -- {{{ |