wooo! an update!!! finallyy!!!!
This commit is contained in:
parent
43c9688558
commit
b2d18d1116
2 changed files with 16 additions and 5 deletions
|
@ -4,12 +4,15 @@ return {
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'hrsh7th/cmp-nvim-lsp',
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
'hrsh7th/cmp-buffer',
|
'hrsh7th/cmp-buffer',
|
||||||
'onsails/lspkind.nvim'
|
'onsails/lspkind.nvim',
|
||||||
|
'L3MON4D3/LuaSnip'
|
||||||
},
|
},
|
||||||
|
|
||||||
config = function()
|
config = function()
|
||||||
local cmp = require('cmp')
|
local cmp = require('cmp')
|
||||||
local lspkind = require('lspkind')
|
local lspkind = require('lspkind')
|
||||||
|
local luasnip = require("luasnip")
|
||||||
|
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
completion = {
|
completion = {
|
||||||
completeopt = 'menu,menuone,noinsert'
|
completeopt = 'menu,menuone,noinsert'
|
||||||
|
@ -25,6 +28,8 @@ return {
|
||||||
['<Tab>'] = cmp.mapping(function(fallback)
|
['<Tab>'] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_next_item()
|
cmp.select_next_item()
|
||||||
|
elseif luasnip.locally_jumpable(1) then
|
||||||
|
luasnip.jump(1)
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
|
@ -32,15 +37,24 @@ return {
|
||||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_prev_item()
|
cmp.select_prev_item()
|
||||||
|
elseif luasnip.locally_jumpable(-1) then
|
||||||
|
luasnip.jump(-1)
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
end, { 'i', 's' }),
|
end, { 'i', 's' }),
|
||||||
},
|
},
|
||||||
|
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
luasnip.lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
sources = {
|
sources = {
|
||||||
{ name = 'nvim_lsp' },
|
{ name = 'nvim_lsp' },
|
||||||
{ name = 'buffer' },
|
{ name = 'buffer' },
|
||||||
|
{ name = 'luasnip' },
|
||||||
},
|
},
|
||||||
|
|
||||||
--- @diagnostic disable-next-line: missing-fields
|
--- @diagnostic disable-next-line: missing-fields
|
||||||
|
@ -49,7 +63,7 @@ return {
|
||||||
mode = 'symbol_text',
|
mode = 'symbol_text',
|
||||||
show_labelDetails = true,
|
show_labelDetails = true,
|
||||||
menu = ({
|
menu = ({
|
||||||
buffer = "[Buffer]",
|
buffer = "[BUF]",
|
||||||
nvim_lsp = "[LSP]",
|
nvim_lsp = "[LSP]",
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
vim.g.polyglot_disabled = {'sensible'}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'rcarriga/nvim-notify',
|
'rcarriga/nvim-notify',
|
||||||
'stefandtw/quickfix-reflector.vim',
|
'stefandtw/quickfix-reflector.vim',
|
||||||
{ 'sheerun/vim-polyglot' },
|
|
||||||
{ 'akinsho/bufferline.nvim', opts = {}, dependencies = { 'navarasu/onedark.nvim' } },
|
{ 'akinsho/bufferline.nvim', opts = {}, dependencies = { 'navarasu/onedark.nvim' } },
|
||||||
{ 'ethanholz/nvim-lastplace', opts = {} },
|
{ 'ethanholz/nvim-lastplace', opts = {} },
|
||||||
{ 'kylechui/nvim-surround', version = '*', event = 'VeryLazy', opts = {} },
|
{ 'kylechui/nvim-surround', version = '*', event = 'VeryLazy', opts = {} },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue