From b69548fa38f0616c43281eea01556dcecba02c06 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 6 Jun 2024 20:45:53 +0200 Subject: [PATCH] nvim: Load nvim-surround as VeryLazy This fixes the somewhat confusing issue of trying to use any of the surround operations before entering insert mode at least once in a file (so, probably as the first operation). Before, the plugin would just silently fail. Now it simply loads very lazily, which does not affect load times strongly. --- nvim/.config/nvim/lua/plugins/editing.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvim/.config/nvim/lua/plugins/editing.lua b/nvim/.config/nvim/lua/plugins/editing.lua index 6c41211..3d9fbda 100644 --- a/nvim/.config/nvim/lua/plugins/editing.lua +++ b/nvim/.config/nvim/lua/plugins/editing.lua @@ -9,7 +9,7 @@ return { }, }, -- surround things with other things using ys/cs/ds - { "kylechui/nvim-surround", config = true, event = "InsertEnter" }, + { "kylechui/nvim-surround", config = true, event = "VeryLazy" }, -- extend the ^a / ^x possibilities to dates, hex, alphabets, markdown headers {