diff options
feat: add `leap`
-rw-r--r-- | flake.lock | 19 | ||||
-rw-r--r-- | flake.nix | 11 | ||||
-rw-r--r-- | lua/config/plugins/extra.lua | 20 | ||||
-rw-r--r-- | lua/config/plugins/init.lua | 7 | ||||
-rw-r--r-- | lua/config/plugins/leap.lua | 15 | ||||
-rw-r--r-- | lua/config/plugins/telescope.lua | 48 |
6 files changed, 80 insertions, 40 deletions
@@ -31,10 +31,27 @@ "type": "github" } }, + "plugins-leap-spooky-nvim": { + "flake": false, + "locked": { + "lastModified": 1707412269, + "narHash": "sha256-XpWDFpiMZ6Up6gLzC6L0XWSiysgh5+6g0vxqi2vzdqE=", + "owner": "ggandor", + "repo": "leap-spooky.nvim", + "rev": "5f44a1f63dc1c4ce50244e92da5bc0d8d1f6eb47", + "type": "github" + }, + "original": { + "owner": "ggandor", + "repo": "leap-spooky.nvim", + "type": "github" + } + }, "root": { "inputs": { "nixCats": "nixCats", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "plugins-leap-spooky-nvim": "plugins-leap-spooky-nvim" } } }, @@ -38,6 +38,10 @@ # for specific tags, branches and commits, see: # https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake.html#examples + plugins-leap-spooky-nvim = { + url = "github:ggandor/leap-spooky.nvim"; + flake = false; + }; }; # see :help nixCats.flake.outputs @@ -103,7 +107,7 @@ # This is for plugins that will load at startup without using packadd: startupPlugins = { - gitPlugins = with pkgs.neovimPlugins; [ ]; + gitPlugins = with pkgs.neovimPlugins; { }; general = with pkgs.vimPlugins; { always = [ lze lzextras ]; @@ -117,9 +121,12 @@ # not loaded automatically at startup. # use with packadd and an autocommand in config to achieve lazy loading optionalPlugins = { - gitPlugins = with pkgs.neovimPlugins; [ ]; + gitPlugins = with pkgs.neovimPlugins; { + leap = [ leap-spooky-nvim ]; + }; general = with pkgs.vimPlugins; { + leap = [ leap-nvim flit-nvim ]; telescope = [ telescope-nvim ]; extra = [ which-key-nvim ]; }; diff --git a/lua/config/plugins/extra.lua b/lua/config/plugins/extra.lua index 8cf9e70..8e2b35c 100644 --- a/lua/config/plugins/extra.lua +++ b/lua/config/plugins/extra.lua @@ -1,13 +1,13 @@ return { - { - "which-key.nvim", - event = "DeferredUIEnter", - after = function(_) - require("which-key").setup() + { + "which-key.nvim", + event = "DeferredUIEnter", + after = function(_) + require("which-key").setup() - require("which-key").add({ - { "<leader>s", group = "search" }, - }) - end, - }, + require("which-key").add({ + { "<leader>s", group = "search" }, + }) + end, + }, } diff --git a/lua/config/plugins/init.lua b/lua/config/plugins/init.lua index 7f254ae..f5cf4f5 100644 --- a/lua/config/plugins/init.lua +++ b/lua/config/plugins/init.lua @@ -2,7 +2,8 @@ vim.cmd.colorscheme(nixCats("colorscheme")) require("lze").load({ - { import = "config.plugins.telescope" }, - { import = "config.plugins.treesitter" }, - { import = "config.plugins.extra" }, + { import = "config.plugins.leap" }, + { import = "config.plugins.telescope" }, + { import = "config.plugins.treesitter" }, + { import = "config.plugins.extra" }, }) diff --git a/lua/config/plugins/leap.lua b/lua/config/plugins/leap.lua new file mode 100644 index 0000000..8048d61 --- /dev/null +++ b/lua/config/plugins/leap.lua @@ -0,0 +1,15 @@ +return { + { + "leap.nvim", + load = function(name) + vim.cmd.packadd(name) + vim.cmd.packadd("flit.nvim") + vim.cmd.packadd("leap-spooky-nvim") + end, + after = function(_) + require("leap").create_default_mappings() + require("flit").setup() + require("leap-spooky").setup() + end, + }, +} diff --git a/lua/config/plugins/telescope.lua b/lua/config/plugins/telescope.lua index 3f1ee9d..da99303 100644 --- a/lua/config/plugins/telescope.lua +++ b/lua/config/plugins/telescope.lua @@ -1,26 +1,26 @@ return { - { - "telescope.nvim", - keys = { - { - "<leader><leader>", - function() - require("telescope.builtin").find_files() - end, - mode = { "n" }, - desc = "Search Files", - }, - { - "<leader>sf", - function() - require("telescope.builtin").find_files() - end, - mode = { "n" }, - desc = "[S]earch [F]iles", - }, - }, - after = function(_) - require("telescope").setup({}) - end, - }, + { + "telescope.nvim", + keys = { + { + "<leader><leader>", + function() + require("telescope.builtin").find_files() + end, + mode = { "n" }, + desc = "Search Files", + }, + { + "<leader>sf", + function() + require("telescope.builtin").find_files() + end, + mode = { "n" }, + desc = "[S]earch [F]iles", + }, + }, + after = function(_) + require("telescope").setup({}) + end, + }, } |