switched nvim to luasnip
This commit is contained in:
parent
db491adb58
commit
defbc1320f
|
@ -157,6 +157,7 @@ hc rule class='nvim-zen' fullscreen=on
|
|||
hc rule class='mpv' floating=on
|
||||
hc rule class='sim_arduboy' floating=on
|
||||
hc rule class='XNots' floating=on
|
||||
hc rule class='Pithos' floating=on
|
||||
|
||||
hc set tree_style '╾│ ├└╼─┐'
|
||||
|
||||
|
|
|
@ -12,6 +12,11 @@ vim.g.catppuccin_flavour = 'mocha'
|
|||
require('catppuccin').setup()
|
||||
vim.cmd [[colorscheme catppuccin]]
|
||||
|
||||
-- load snippets
|
||||
require('luasnip.loaders.from_snipmate').lazy_load({
|
||||
paths = "~/.config/nvim/snippets"
|
||||
})
|
||||
|
||||
-- replace built in selector with telescope
|
||||
require('telescope').setup {
|
||||
extensions = {
|
||||
|
@ -29,7 +34,7 @@ local cmp = require 'cmp'
|
|||
cmp.setup {
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body)
|
||||
require'luasnip'.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
|
@ -43,7 +48,8 @@ cmp.setup {
|
|||
preselect = cmp.PreselectMode.None,
|
||||
confirmation = { get_commit_characters = function(_) return {} end },
|
||||
sources = {
|
||||
{ name = 'nvim_lsp', },
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'buffer' },
|
||||
{ name = 'path' },
|
||||
},
|
||||
|
|
|
@ -15,12 +15,16 @@ return require('packer').startup(function()
|
|||
use 'nvim-telescope/telescope-ui-select.nvim' -- selector
|
||||
use 'gpanders/editorconfig.nvim'
|
||||
use 'neovim/nvim-lspconfig'
|
||||
use 'hrsh7th/nvim-cmp' -- autocomplete
|
||||
use 'hrsh7th/cmp-vsnip' -- autocomplete
|
||||
use 'hrsh7th/vim-vsnip' -- autocomplete
|
||||
use 'hrsh7th/cmp-nvim-lsp' -- lsp autocomplete
|
||||
use 'hrsh7th/cmp-buffer' -- buffer autocomplete
|
||||
use 'hrsh7th/cmp-path' -- path autocompletes
|
||||
use 'L3MON4D3/LuaSnip' -- snipets
|
||||
use {
|
||||
'hrsh7th/nvim-cmp', -- autocomplete
|
||||
requires = {
|
||||
{'saadparwaiz1/cmp_luasnip'}, -- autocomplete snips
|
||||
{'hrsh7th/cmp-nvim-lsp'}, -- lsp autocomplete
|
||||
{'hrsh7th/cmp-buffer'}, -- buffer autocomplete
|
||||
{'hrsh7th/cmp-path'}, -- path autocompletes
|
||||
}
|
||||
}
|
||||
use { -- gitgutter replacement
|
||||
'lewis6991/gitsigns.nvim',
|
||||
requires = {
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
# inline xml documentation
|
||||
snippet ///
|
||||
/// <summary>
|
||||
/// ${0}
|
||||
/// </summary>
|
||||
snippet <p
|
||||
<param name="${1}">${2:$1}</param>
|
||||
snippet <r
|
||||
<returns>${1}</returns>
|
||||
snippet <rem
|
||||
<remarks>${1}</remarks>
|
Loading…
Reference in New Issue