From df490feffb8f0e1484103af27f55561244f45b20 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Thu, 5 Sep 2024 01:57:44 -0700 Subject: [PATCH] feat: add some keymaps - hoogle integration - codelens key - close window and buffer --- config/keymaps.nix | 28 ++++++++++++++++++++++++++++ config/plugins/setup.nix | 1 + 2 files changed, 29 insertions(+) diff --git a/config/keymaps.nix b/config/keymaps.nix index 3e43b35..4c7c016 100644 --- a/config/keymaps.nix +++ b/config/keymaps.nix @@ -80,6 +80,15 @@ desc = "Close current window"; }; } + { + action = "Bdelete!close"; + key = "wk"; + options = { + silent = true; + noremap = true; + desc = "Close current window, along with the buffer open inside."; + }; + } { action = "Telescope find_files"; key = "ff"; @@ -311,6 +320,7 @@ action = ":Telescope yank_history"; key = "p"; mode = "n"; + options.desc = "Look through yank history with telescope."; } { action = '':lua require("yazi").yazi()''; @@ -348,6 +358,24 @@ silent = true; }; } + { + action = '':lua vim.lsp.codelens.run()''; + key = "cl"; + options = { + desc = "Run codelens"; + noremap = true; + silent = true; + }; + } + { + action = '':Telescope ht hoogle_signature''; + key = "fg"; + options = { + desc = "Search hoogle for under cursor"; + noremap = true; + silent = true; + }; + } # { # action = ":Yazi"; # key = "mf"; diff --git a/config/plugins/setup.nix b/config/plugins/setup.nix index 45ac422..8c3da18 100644 --- a/config/plugins/setup.nix +++ b/config/plugins/setup.nix @@ -2,6 +2,7 @@ { extraConfigLua = '' require("telescope").load_extension("yank_history") + require("telescope").load_extension("ht") vim.diagnostic.config({ virtual_lines = false }); ''; }