comparison dot_config/nvim/config.lua @ 388:80a9a2b73eac

Use vsnip for snippets
author zegervdv <zegervdv@me.com>
date Sun, 30 May 2021 10:32:37 +0200
parents 82155064643e
children ce9bc6e2e5c1
comparison
equal deleted inserted replaced
387:095b39bdfdf4 388:80a9a2b73eac
142 path = true, 142 path = true,
143 buffer = true, 143 buffer = true,
144 nvim_lsp = true, 144 nvim_lsp = true,
145 nvim_lua = true, 145 nvim_lua = true,
146 spell = true, 146 spell = true,
147 ultisnips = true, 147 vsnip = true,
148 -- TODO add vsnip for LSP snippets
149 }, 148 },
150 } 149 }
151 150
152 vim.cmd [[ inoremap <silent><expr> <C-y> compe#complete() ]] 151 vim.cmd [[ inoremap <silent><expr> <C-y> compe#complete() ]]
153 vim.cmd [[ inoremap <silent><expr> <CR> compe#confirm({ 'keys': "\<Plug>delimitMateCR", 'mode': '' }) ]] 152 vim.cmd [[ inoremap <silent><expr> <CR> compe#confirm({ 'keys': "\<Plug>delimitMateCR", 'mode': '' }) ]]
194 }, 193 },
195 'nvim-treesitter/nvim-treesitter-refactor', 194 'nvim-treesitter/nvim-treesitter-refactor',
196 'nvim-treesitter/nvim-treesitter-textobjects', 195 'nvim-treesitter/nvim-treesitter-textobjects',
197 { 'nvim-treesitter/playground', opt = true }, 196 { 'nvim-treesitter/playground', opt = true },
198 } 197 }
199 use { 'SirVer/ultisnips' } 198 use { 'hrsh7th/vim-vsnip', requires = 'hrsh7th/vim-vsnip-integ' }
200 use { 'glepnir/lspsaga.nvim', config = function() require'lspsaga'.init_lsp_saga {} end } 199 use { 'glepnir/lspsaga.nvim', config = function() require'lspsaga'.init_lsp_saga {} end }
201 200
202 -- Vanity 201 -- Vanity
203 use { 202 use {
204 'yamatsum/nvim-web-nonicons', 203 'yamatsum/nvim-web-nonicons',
355 nnoremap { 'K', require'lspsaga.hover'.render_hover_doc, silent = true } 354 nnoremap { 'K', require'lspsaga.hover'.render_hover_doc, silent = true }
356 nnoremap { 'gD', vim.lsp.buf.implementation, silent = true } 355 nnoremap { 'gD', vim.lsp.buf.implementation, silent = true }
357 nnoremap { '1gD', vim.lsp.buf.type_definition, silent = true } 356 nnoremap { '1gD', vim.lsp.buf.type_definition, silent = true }
358 nnoremap { 'gr', vim.lsp.buf.references, silent = true } 357 nnoremap { 'gr', vim.lsp.buf.references, silent = true }
359 nnoremap { 'g0', vim.lsp.buf.document_symbol, silent = true } 358 nnoremap { 'g0', vim.lsp.buf.document_symbol, silent = true }
360 nnoremap { '<c-p>', function () vim.lsp.buf.formatting_sync({}, 5000) end, silent = true } 359 nnoremap { '<c-p>', function() vim.lsp.buf.formatting_sync({}, 5000) end, silent = true }
361 nnoremap { 'gp', require'lspsaga.provider'.preview_definition, silent = true } 360 nnoremap { 'gp', require'lspsaga.provider'.preview_definition, silent = true }
362 361
363 inoremap { '<c-l>', vim.lsp.buf.signature_help, silent = true } 362 inoremap { '<c-l>', vim.lsp.buf.signature_help, silent = true }
364 363
365 vim.cmd [[ sign define LspDiagnosticsSignError text=▊ texthl=LspDiagnosticsSignError linehl= numhl= ]] 364 vim.cmd [[ sign define LspDiagnosticsSignError text=▊ texthl=LspDiagnosticsSignError linehl= numhl= ]]