mirror of
https://github.com/Manoj-HV30/i3wm-ubuntu-dotfiles.git
synced 2026-05-16 19:35:23 +00:00
Initial Ubuntu i3wm dotfiles
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"L3MON4D3/LuaSnip",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
},
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
}),
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
},
|
||||
})
|
||||
|
||||
-- Optional: make autopairs + completion cooperate
|
||||
pcall(function()
|
||||
require("nvim-autopairs.completion.cmp").setup({
|
||||
map_cr = true,
|
||||
})
|
||||
end)
|
||||
end,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user