From b6e826eb53209953a3dd501ff041d6bedc96ef70 Mon Sep 17 00:00:00 2001 From: Albin Chaboissier Date: Sat, 24 Jan 2026 12:03:52 +0100 Subject: [PATCH] surround --- lua/plugins/cmp.lua | 4 ++-- lua/plugins/surround.lua | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 lua/plugins/surround.lua diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 25b0dec..2a6ac57 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -21,8 +21,8 @@ return { end, }, window = { - completion = cmp.config.window.bordered(), - documentation = cmp.config.window.bordered(), + -- completion = cmp.config.window.bordered(), + -- documentation = cmp.config.window.bordered(), }, mapping = cmp.mapping.preset.insert({ [""] = cmp.mapping.scroll_docs(-4), diff --git a/lua/plugins/surround.lua b/lua/plugins/surround.lua new file mode 100644 index 0000000..b0b8686 --- /dev/null +++ b/lua/plugins/surround.lua @@ -0,0 +1,24 @@ +return { + "kylechui/nvim-surround", + version = "^3.0.0", -- Use for stability; omit to use `main` branch for the latest features + event = "VeryLazy", + config = function() + require("nvim-surround").setup({ + keymaps = { + visual = "Y", + }, + surrounds = { + ["("] = { + add = function() + return { { "(" }, { ")" } } + end, + }, + ["<"] = { + add = function() + return { { "<" }, { ">" } } + end, + }, + }, + }) + end, +}