diff --git a/flake.lock b/flake.lock index 9200900..9897dc5 100644 --- a/flake.lock +++ b/flake.lock @@ -521,6 +521,22 @@ "type": "github" } }, + "leap-spooky-nvim": { + "flake": false, + "locked": { + "lastModified": 1687792124, + "narHash": "sha256-EPqbsG7KFHdnbW430+BSrPeOoVy99KtIC8OpFbV1ycw=", + "owner": "ggandor", + "repo": "leap-spooky.nvim", + "rev": "e003f2aa376190148f2e7731a60c89239335013c", + "type": "github" + }, + "original": { + "owner": "ggandor", + "repo": "leap-spooky.nvim", + "type": "github" + } + }, "lowdown-src": { "flake": false, "locked": { @@ -956,6 +972,7 @@ "hypr-contrib": "hypr-contrib", "hyprland": "hyprland", "hyprpaper": "hyprpaper", + "leap-spooky-nvim": "leap-spooky-nvim", "lspsaga-nvim": "lspsaga-nvim", "master": "master", "neovim-nightly-overlay": "neovim-nightly-overlay", diff --git a/flake.nix b/flake.nix index 826a858..42191c8 100644 --- a/flake.nix +++ b/flake.nix @@ -50,6 +50,9 @@ smartcolumn-nvim.flake = false; smartcolumn-nvim.url = "github:m4xshen/smartcolumn.nvim"; + leap-spooky-nvim.flake = false; + leap-spooky-nvim.url = "github:ggandor/leap-spooky.nvim"; + telekasten-nvim.flake = false; telekasten-nvim.url = "github:renerocksai/telekasten.nvim"; diff --git a/modules/programs/nvim/plugins/default.nix b/modules/programs/nvim/plugins/default.nix index 54947e2..fa83949 100644 --- a/modules/programs/nvim/plugins/default.nix +++ b/modules/programs/nvim/plugins/default.nix @@ -243,6 +243,25 @@ with builtins; event = [ "BufReadPost" "BufNewFile" ]; conf = "require('Comment').setup()"; } + { + plugin = leap-nvim; + lazy = false; + conf = '' + require("leap").add_default_mappings() + ''; + } + { + plugin = leap-spooky-nvim; + lazy = false; + conf = '' + require("leap-spooky").setup() + ''; + dependencies = [ + { + plugin = leap-nvim; + } + ]; + } { plugin = telekasten-nvim; dependencies = [ diff --git a/modules/programs/nvim/plugins/mini-nvim.lua b/modules/programs/nvim/plugins/mini-nvim.lua index 6ce1ecc..28cabcd 100644 --- a/modules/programs/nvim/plugins/mini-nvim.lua +++ b/modules/programs/nvim/plugins/mini-nvim.lua @@ -1,9 +1,48 @@ require("mini.align").setup() -require("mini.surround").setup() require("mini.move").setup() require("mini.pairs").setup() require("mini.starter").setup() +require("mini.surround").setup({ + -- Add custom surroundings to be used on top of builtin ones. For more + -- information with examples, see `:h MiniSurround.config`. + custom_surroundings = nil, + + -- Duration (in ms) of highlight when calling `MiniSurround.highlight()` + highlight_duration = 500, + + -- Module mappings. Use `''` (empty string) to disable one. + mappings = { + add = "gSa", -- Add surrounding in Normal and Visual modes + delete = "gSd", -- Delete surrounding + find = "gSf", -- Find surrounding (to the right) + find_left = "gSF", -- Find surrounding (to the left) + highlight = "gSh", -- Highlight surrounding + replace = "gSr", -- Replace surrounding + update_n_lines = "gSn", -- Update `n_lines` + + suffix_last = "l", -- Suffix to search with "prev" method + suffix_next = "n", -- Suffix to search with "next" method + }, + + -- Number of lines within which surrounding is searched + n_lines = 20, + + -- Whether to respect selection type: + -- - Place surroundings on separate lines in linewise mode. + -- - Place surroundings on each line in blockwise mode. + respect_selection_type = false, + + -- How to search for surrounding (first inside current line, then inside + -- neighborhood). One of 'cover', 'cover_or_next', 'cover_or_prev', + -- 'cover_or_nearest', 'next', 'prev', 'nearest'. For more details, + -- see `:h MiniSurround.config`. + search_method = "cover", + + -- Whether to disable showing non-error feedback + silent = false, +}) + require("mini.tabline").setup() local tabline_current = vim.api.nvim_get_hl(0, { name = "MiniTablineCurrent" }) vim.api.nvim_set_hl(0, "MiniTablineCurrent", { diff --git a/overlays/vimPlugins.nix b/overlays/vimPlugins.nix index 60d06b2..0b8727b 100644 --- a/overlays/vimPlugins.nix +++ b/overlays/vimPlugins.nix @@ -32,6 +32,12 @@ with lib.my; src = inputs.cmp-async-path; }); + leap-spooky-nvim = prev.vimUtils.buildVimPluginFrom2Nix { + pname = "leap-spooky-nvim"; + version = mkVersionInput inputs.leap-spooky-nvim; + src = inputs.leap-spooky-nvim; + }; + telekasten-nvim = prev.vimUtils.buildVimPluginFrom2Nix { pname = "telekasten-nvim"; version = mkVersionInput inputs.telekasten-nvim;