Adding Frienly snips, autoclose and cleaning up lazy
This commit is contained in:
parent
bdfc00159b
commit
03b5fffc72
5
after/plugin/autoclose.lua
Normal file
5
after/plugin/autoclose.lua
Normal file
@ -0,0 +1,5 @@
|
||||
require("autoclose").setup({
|
||||
keys = {
|
||||
[">"] = { escape = false, close = false, pair = "<>", disabled_filetypes = {} },
|
||||
},
|
||||
})
|
26
after/plugin/cmp.lua
Normal file
26
after/plugin/cmp.lua
Normal file
@ -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({
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
|
||||
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
|
||||
['<Tab>'] = cmp.mapping.confirm({ select = true }),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
}),
|
||||
})
|
||||
|
||||
|
@ -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({
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
|
||||
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
|
||||
['<Tab>'] = cmp.mapping.confirm({ select = true }),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
}),
|
||||
})
|
||||
|
||||
|
||||
|
@ -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 = {} },
|
||||
|
Loading…
Reference in New Issue
Block a user