From ddf0cd669b67fce642bd34ff58fcd5d19dc77ebb Mon Sep 17 00:00:00 2001 From: luxus Date: Mon, 27 Feb 2023 05:26:27 +0100 Subject: [PATCH 1/5] feat(editing-support): Add Neogen --- .../editing-support/neogen/neogen.lua | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 lua/astrocommunity/editing-support/neogen/neogen.lua diff --git a/lua/astrocommunity/editing-support/neogen/neogen.lua b/lua/astrocommunity/editing-support/neogen/neogen.lua new file mode 100644 index 000000000..7c168d2c4 --- /dev/null +++ b/lua/astrocommunity/editing-support/neogen/neogen.lua @@ -0,0 +1,21 @@ +local prefix = "a" +return { + "danymat/neogen", + cmd = "Neogen", + opts = { + snippet_engine = "luasnip", + languages = { + lua = { template = { annotation_convention = "ldoc" } }, + typescript = { template = { annotation_convention = "tsdoc" } }, + typescriptreact = { template = { annotation_convention = "tsdoc" } }, + }, + }, + keys = { + { prefix, desc = "Annotation" }, + { prefix .. "", function() require("neogen").generate { type = "current" } end, desc = "Current" }, + { prefix .. "c", function() require("neogen").generate { type = "class" } end, desc = "Class" }, + { prefix .. "f", function() require("neogen").generate { type = "func" } end, desc = "Function" }, + { prefix .. "t", function() require("neogen").generate { type = "type" } end, desc = "Type" }, + { prefix .. "F", function() require("neogen").generate { type = "file" } end, desc = "File" }, + }, +} From 1a7bf6875567609e79169928ff9e96a145c00e7d Mon Sep 17 00:00:00 2001 From: luxus Date: Mon, 27 Feb 2023 05:35:21 +0100 Subject: [PATCH 2/5] feat(editing-support): Add Spectre --- .../project/nvim-spectre/nvim-spectre.lua | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 lua/astrocommunity/project/nvim-spectre/nvim-spectre.lua diff --git a/lua/astrocommunity/project/nvim-spectre/nvim-spectre.lua b/lua/astrocommunity/project/nvim-spectre/nvim-spectre.lua new file mode 100644 index 000000000..1966933fd --- /dev/null +++ b/lua/astrocommunity/project/nvim-spectre/nvim-spectre.lua @@ -0,0 +1,30 @@ +local prefix = "s" +return { + "nvim-pack/nvim-spectre", + cmd = "Spectre", + keys = { + { prefix, desc = "Search / Replace", mode = { "n", "x" } }, + { prefix .. "s", function() require("spectre").open() end, desc = "Spectre" }, + { + prefix .. "w", + mode = "x", + function() require("spectre").open_visual { select_word = true } end, + desc = "Spectre (current word)", + }, + { prefix .. "f", function() require("spectre").open_file_search() end, desc = "Spectre (current file)" }, + }, + + opts = function() + return { + mapping = { + send_to_qf = { map = "q" }, + replace_cmd = { map = "c" }, + show_option_menu = { map = "o" }, + run_current_replace = { map = "C" }, + run_replace = { map = "R" }, + change_view_mode = { map = "v" }, + resume_last_search = { map = "l" }, + }, + } + end, +} From e5599f59ffcca075914d06bc1962f3dfad7df48a Mon Sep 17 00:00:00 2001 From: luxus Date: Mon, 27 Feb 2023 06:26:15 +0100 Subject: [PATCH 3/5] feat(editing-support): Add Dial.nvim --- .../editing-support/dial-nvim/dial-nvim.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lua/astrocommunity/editing-support/dial-nvim/dial-nvim.lua diff --git a/lua/astrocommunity/editing-support/dial-nvim/dial-nvim.lua b/lua/astrocommunity/editing-support/dial-nvim/dial-nvim.lua new file mode 100644 index 000000000..7c18dc3fc --- /dev/null +++ b/lua/astrocommunity/editing-support/dial-nvim/dial-nvim.lua @@ -0,0 +1,19 @@ +return { + "monaqa/dial.nvim", + keys = { + { "", function() return require("dial.map").inc_normal() end, expr = true, desc = "Increment" }, + { "", function() return require("dial.map").dec_normal() end, expr = true, desc = "Decrement" }, + }, + config = function() + local augend = require "dial.augend" + require("dial.config").augends:register_group { + default = { + augend.integer.alias.decimal, + augend.integer.alias.hex, + augend.date.alias["%Y/%m/%d"], + augend.constant.alias.bool, + augend.semver.alias.semver, + }, + } + end, +} From 2ffc5c435fb90dbc412986207c1ca04cf771e4e9 Mon Sep 17 00:00:00 2001 From: luxus Date: Mon, 27 Feb 2023 07:05:21 +0100 Subject: [PATCH 4/5] feat(utility): Add Neodim --- lua/astrocommunity/utility/neodim/neodim.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 lua/astrocommunity/utility/neodim/neodim.lua diff --git a/lua/astrocommunity/utility/neodim/neodim.lua b/lua/astrocommunity/utility/neodim/neodim.lua new file mode 100644 index 000000000..f7be38a59 --- /dev/null +++ b/lua/astrocommunity/utility/neodim/neodim.lua @@ -0,0 +1,17 @@ +return { + "zbirenbaum/neodim", + event = "LspAttach", + opts = { + alpha = 0.75, + blend_color = "#000000", + update_in_insert = { + enable = true, + delay = 100, + }, + hide = { + virtual_text = true, + signs = true, + underline = true, + }, + }, +} From a5a8137522f216e3e2a19c7320730689f70302ff Mon Sep 17 00:00:00 2001 From: luxus Date: Mon, 27 Feb 2023 07:33:49 +0100 Subject: [PATCH 5/5] feat(editing-support): Add Treej --- lua/astrocommunity/editing-support/treej/treej.lua | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 lua/astrocommunity/editing-support/treej/treej.lua diff --git a/lua/astrocommunity/editing-support/treej/treej.lua b/lua/astrocommunity/editing-support/treej/treej.lua new file mode 100644 index 000000000..4c47d2373 --- /dev/null +++ b/lua/astrocommunity/editing-support/treej/treej.lua @@ -0,0 +1,6 @@ +return { + "Wansmer/treesj", + keys = { { "m", "TSJToggle", desc = "Toggle Treesitter Join" } }, + cmd = { "TSJToggle", "TSJSplit", "TSJJoin" }, + opts = { use_default_keymaps = false }, +}