2024-06-08 04:17:10 +00:00
|
|
|
return {
|
2024-06-19 16:46:34 +00:00
|
|
|
{
|
|
|
|
"hrsh7th/nvim-cmp",
|
|
|
|
dependencies = {
|
|
|
|
"hrsh7th/cmp-buffer",
|
|
|
|
"hrsh7th/cmp-path",
|
|
|
|
"hrsh7th/cmp-nvim-lsp",
|
|
|
|
"L3MON4D3/LuaSnip",
|
|
|
|
"saadparwaiz1/cmp_luasnip",
|
2024-06-22 14:38:42 +00:00
|
|
|
"neovim/nvim-lspconfig",
|
|
|
|
"hrsh7th/cmp-cmdline"
|
2024-06-19 16:46:34 +00:00
|
|
|
},
|
|
|
|
config = function()
|
|
|
|
local cmp = require("cmp")
|
|
|
|
cmp.setup({
|
|
|
|
snippet = {
|
|
|
|
expand = function(args)
|
|
|
|
require("luasnip").lsp_expand(args.body)
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
mapping = cmp.mapping.preset.insert({
|
|
|
|
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
|
|
|
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
|
|
|
["<C-Space>"] = cmp.mapping.complete(),
|
|
|
|
["<C-e>"] = cmp.mapping.abort(),
|
|
|
|
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
|
|
|
}),
|
|
|
|
sources = cmp.config.sources({
|
|
|
|
{ name = "nvim_lsp" },
|
|
|
|
{ name = "luasnip" },
|
|
|
|
}, {
|
|
|
|
{ name = "buffer" },
|
|
|
|
{ name = "path" },
|
|
|
|
}),
|
|
|
|
})
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"nvim-treesitter/nvim-treesitter",
|
|
|
|
config = function()
|
|
|
|
require("nvim-treesitter.configs").setup({
|
|
|
|
ensure_installed = {
|
|
|
|
"c",
|
|
|
|
"cpp",
|
|
|
|
"cmake",
|
|
|
|
"bash",
|
|
|
|
"go",
|
|
|
|
"lua",
|
|
|
|
"python",
|
|
|
|
"java",
|
|
|
|
"git_config",
|
|
|
|
"git_rebase",
|
|
|
|
"gitattributes",
|
|
|
|
"gitcommit",
|
|
|
|
"gitignore",
|
|
|
|
"groovy",
|
|
|
|
"json",
|
|
|
|
"sql",
|
|
|
|
"vim",
|
|
|
|
"xml",
|
|
|
|
"tcl",
|
2024-06-22 14:38:42 +00:00
|
|
|
"yaml",
|
|
|
|
"ini",
|
|
|
|
"comment",
|
2024-06-19 16:46:34 +00:00
|
|
|
},
|
|
|
|
})
|
|
|
|
end,
|
|
|
|
},
|
2024-06-08 04:17:10 +00:00
|
|
|
}
|