feat: add some keymaps

- hoogle integration
- codelens key
- close window and buffer
This commit is contained in:
Youwen Wu 2024-09-05 01:57:44 -07:00
parent 52fc566b71
commit df490feffb
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
2 changed files with 29 additions and 0 deletions

View file

@ -80,6 +80,15 @@
desc = "Close current window"; desc = "Close current window";
}; };
} }
{
action = "<cmd>Bdelete!<CR><cmd>close<CR>";
key = "<Leader>wk";
options = {
silent = true;
noremap = true;
desc = "Close current window, along with the buffer open inside.";
};
}
{ {
action = "<cmd>Telescope find_files<CR>"; action = "<cmd>Telescope find_files<CR>";
key = "<Leader>ff"; key = "<Leader>ff";
@ -311,6 +320,7 @@
action = ":Telescope yank_history<CR>"; action = ":Telescope yank_history<CR>";
key = "<Leader>p"; key = "<Leader>p";
mode = "n"; mode = "n";
options.desc = "Look through yank history with telescope.";
} }
{ {
action = '':lua require("yazi").yazi()<CR>''; action = '':lua require("yazi").yazi()<CR>'';
@ -348,6 +358,24 @@
silent = true; silent = true;
}; };
} }
{
action = '':lua vim.lsp.codelens.run()'';
key = "<Leader>cl";
options = {
desc = "Run codelens";
noremap = true;
silent = true;
};
}
{
action = '':Telescope ht hoogle_signature<CR>'';
key = "<Leader>fg";
options = {
desc = "Search hoogle for under cursor";
noremap = true;
silent = true;
};
}
# { # {
# action = ":Yazi<CR>"; # action = ":Yazi<CR>";
# key = "<Leader>mf"; # key = "<Leader>mf";

View file

@ -2,6 +2,7 @@
{ {
extraConfigLua = '' extraConfigLua = ''
require("telescope").load_extension("yank_history") require("telescope").load_extension("yank_history")
require("telescope").load_extension("ht")
vim.diagnostic.config({ virtual_lines = false }); vim.diagnostic.config({ virtual_lines = false });
''; '';
} }