diff --git a/after/plugin/autoclose.lua b/after/plugin/autoclose.lua new file mode 100644 index 0000000..bc90ab8 --- /dev/null +++ b/after/plugin/autoclose.lua @@ -0,0 +1,5 @@ +require("autoclose").setup({ + keys = { + [">"] = { escape = false, close = false, pair = "<>", disabled_filetypes = {} }, + }, +}) diff --git a/after/plugin/cmp.lua b/after/plugin/cmp.lua new file mode 100644 index 0000000..384a707 --- /dev/null +++ b/after/plugin/cmp.lua @@ -0,0 +1,26 @@ +local cmp = require('cmp') +local cmp_select = {behavior = cmp.SelectBehavior.Select} +local luasnip= require('luasnip') +require("luasnip.loaders.from_vscode").lazy_load() +-- +cmp.setup({ + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end + }, + sources = { + {name = 'path'}, + {name = 'nvim_lsp'}, + {name = 'nvim_lua'}, + {name = 'luasnip'}, + }, + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.select_prev_item(cmp_select), + [''] = cmp.mapping.select_next_item(cmp_select), + [''] = cmp.mapping.confirm({ select = true }), + [''] = cmp.mapping.complete(), + }), +}) + + diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua index 1fffffd..f8150f7 100644 --- a/after/plugin/lsp.lua +++ b/after/plugin/lsp.lua @@ -62,28 +62,4 @@ require('mason-lspconfig').setup({ }, }) -local cmp = require('cmp') -local cmp_select = {behavior = cmp.SelectBehavior.Select} -local luasnip= require('luasnip') - -cmp.setup({ - snippet = { - expand = function(args) - luasnip.lsp_expand(args.body) - end - }, - sources = { - {name = 'path'}, - {name = 'nvim_lsp'}, - {name = 'nvim_lua'}, - {name = 'luasnip'}, - }, - mapping = cmp.mapping.preset.insert({ - [''] = cmp.mapping.select_prev_item(cmp_select), - [''] = cmp.mapping.select_next_item(cmp_select), - [''] = cmp.mapping.confirm({ select = true }), - [''] = cmp.mapping.complete(), - }), -}) - diff --git a/lua/pippy/lazy.lua b/lua/pippy/lazy.lua index 0fbef0f..154ff0a 100644 --- a/lua/pippy/lazy.lua +++ b/lua/pippy/lazy.lua @@ -35,19 +35,17 @@ require("lazy").setup({ 'nvim-lua/plenary.nvim' }, }, - { - "folke/neoconf.nvim", - cmd = "Neoconf" - }, - "folke/neodev.nvim", - {'akinsho/toggleterm.nvim', version = "*", config = true}, {"danymat/neogen", dependencies = "nvim-treesitter/nvim-treesitter", config = true}, {'williamboman/mason.nvim'}, {'williamboman/mason-lspconfig.nvim'}, {'neovim/nvim-lspconfig'}, {'hrsh7th/cmp-nvim-lsp'}, {'hrsh7th/nvim-cmp'}, - {'L3MON4D3/LuaSnip'}, + {'L3MON4D3/LuaSnip', dependencies ={ + 'rafamadriz/friendly-snippets', + 'saadparwaiz1/cmp_luasnip', + }}, + 'm4xshen/autoclose.nvim', 'lewis6991/gitsigns.nvim', {'xiyaowong/transparent.nvim'}, { 'numToStr/Comment.nvim', opts = {} },