From f1588ec8389599459588b6c1bc83d0fe322ea029 Mon Sep 17 00:00:00 2001 From: Olivier Wittek <57495944+owittek@users.noreply.github.com> Date: Mon, 1 May 2023 18:25:42 +0200 Subject: [PATCH 1/3] feat(editing-support): add cutlass-nvim --- .../editing-support/cutlass-nvim/README.md | 7 +++++++ .../editing-support/cutlass-nvim/cutlass-nvim.lua | 12 ++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 lua/astrocommunity/editing-support/cutlass-nvim/README.md create mode 100644 lua/astrocommunity/editing-support/cutlass-nvim/cutlass-nvim.lua diff --git a/lua/astrocommunity/editing-support/cutlass-nvim/README.md b/lua/astrocommunity/editing-support/cutlass-nvim/README.md new file mode 100644 index 000000000..0a0aff00b --- /dev/null +++ b/lua/astrocommunity/editing-support/cutlass-nvim/README.md @@ -0,0 +1,7 @@ +# cutlass.nvim + +**Repository:** + +Cutlass overrides the delete operations to actually just delete and not affect the current yank. + +This plugin also adds the `leap.nvim` integration if the plugin is present. diff --git a/lua/astrocommunity/editing-support/cutlass-nvim/cutlass-nvim.lua b/lua/astrocommunity/editing-support/cutlass-nvim/cutlass-nvim.lua new file mode 100644 index 000000000..51a5ba353 --- /dev/null +++ b/lua/astrocommunity/editing-support/cutlass-nvim/cutlass-nvim.lua @@ -0,0 +1,12 @@ +local utils = require "astronvim.utils" + +return { + "gbprod/cutlass.nvim", + event = { "User AstroFile" }, + opts = function(_, opts) + if utils.is_available "leap.nvim" then + if not opts.exclude then opts.exclude = {} end + utils.list_insert_unique(opts.exclude, { "ns", "nS" }) + end + end, +} From 9de078d734f9189ed050cdd440a229522a7110b4 Mon Sep 17 00:00:00 2001 From: Oli <57495944+owittek@users.noreply.github.com> Date: Mon, 1 May 2023 19:55:47 +0200 Subject: [PATCH 2/3] refactor(editing-support): simplify list_insert_unique usages Co-authored-by: Micah Halter --- .../editing-support/cutlass-nvim/cutlass-nvim.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/astrocommunity/editing-support/cutlass-nvim/cutlass-nvim.lua b/lua/astrocommunity/editing-support/cutlass-nvim/cutlass-nvim.lua index 51a5ba353..9109a4521 100644 --- a/lua/astrocommunity/editing-support/cutlass-nvim/cutlass-nvim.lua +++ b/lua/astrocommunity/editing-support/cutlass-nvim/cutlass-nvim.lua @@ -5,8 +5,7 @@ return { event = { "User AstroFile" }, opts = function(_, opts) if utils.is_available "leap.nvim" then - if not opts.exclude then opts.exclude = {} end - utils.list_insert_unique(opts.exclude, { "ns", "nS" }) + opts.exclude = utils.list_insert_unique(opts.exclude, { "ns", "nS" }) end end, } From ba3282f70f39028b8a8771055b6a269c14b04de3 Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Mon, 1 May 2023 13:58:55 -0400 Subject: [PATCH 3/3] fix style --- .../editing-support/cutlass-nvim/cutlass-nvim.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/astrocommunity/editing-support/cutlass-nvim/cutlass-nvim.lua b/lua/astrocommunity/editing-support/cutlass-nvim/cutlass-nvim.lua index 9109a4521..6357a4ffb 100644 --- a/lua/astrocommunity/editing-support/cutlass-nvim/cutlass-nvim.lua +++ b/lua/astrocommunity/editing-support/cutlass-nvim/cutlass-nvim.lua @@ -4,8 +4,6 @@ return { "gbprod/cutlass.nvim", event = { "User AstroFile" }, opts = function(_, opts) - if utils.is_available "leap.nvim" then - opts.exclude = utils.list_insert_unique(opts.exclude, { "ns", "nS" }) - end + if utils.is_available "leap.nvim" then opts.exclude = utils.list_insert_unique(opts.exclude, { "ns", "nS" }) end end, }