add autopairs and create bindings for jumping through params in snippets

This commit is contained in:
2024-10-01 21:30:57 +02:00
parent b8e245dede
commit 0875a815c5
3 changed files with 27 additions and 6 deletions

View File

@@ -5,6 +5,26 @@ require("lazy").setup({
{
"hrsh7th/nvim-cmp",
dependencies = {
-- Code snippet engine
{
"L3MON4D3/LuaSnip",
version = "v2.*",
},
{
"windwp/nvim-autopairs",
opts = {
fast_wrap = {},
disable_filetype = { "TelescopePrompt", "vim" },
},
config = function(_, opts)
require("nvim-autopairs").setup(opts)
-- setup cmp for autopairs
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done())
end,
},
"hrsh7th/cmp-nvim-lsp", -- lsp auto-completion
"hrsh7th/cmp-buffer", -- buffer auto-completion
"hrsh7th/cmp-path", -- path auto-completion
@@ -14,12 +34,6 @@ require("lazy").setup({
require("config.nvim-cmp")
end,
},
-- Code snippet engine
{
"L3MON4D3/LuaSnip",
version = "v2.*",
},
-- LSP manager
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",