summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/plugs-config/whichkey.lua
diff options
context:
space:
mode:
authorJoe <rrbo@proton.me>2023-09-22 11:20:53 +0200
committerJoe <rrbo@proton.me>2023-09-22 11:20:53 +0200
commite25677cbebfa2a9e4705de3d47610cd2026d0b56 (patch)
tree924f5cda37599a221acddaa868a8f224627f6eee /.config/nvim/lua/plugs-config/whichkey.lua
parentup (diff)
downloaddotfiles-bsd-e25677cbebfa2a9e4705de3d47610cd2026d0b56.tar.gz
dotfiles-bsd-e25677cbebfa2a9e4705de3d47610cd2026d0b56.tar.bz2
dotfiles-bsd-e25677cbebfa2a9e4705de3d47610cd2026d0b56.tar.xz
dotfiles-bsd-e25677cbebfa2a9e4705de3d47610cd2026d0b56.tar.zst
dotfiles-bsd-e25677cbebfa2a9e4705de3d47610cd2026d0b56.zip
up
Diffstat (limited to '')
-rw-r--r--.config/nvim/after/plugin/whichkey.lua (renamed from .config/nvim/lua/plugs-config/whichkey.lua)19
1 files changed, 16 insertions, 3 deletions
diff --git a/.config/nvim/lua/plugs-config/whichkey.lua b/.config/nvim/after/plugin/whichkey.lua
index 9529229..71274e1 100644
--- a/.config/nvim/lua/plugs-config/whichkey.lua
+++ b/.config/nvim/after/plugin/whichkey.lua
@@ -1,10 +1,11 @@
-local wk = require("which-key")
+local ts = require('telescope.builtin')
+local wk = require('which-key')
wk.register({
b = { ':Buffers<CR>', 'buffers', noremap = true, silent = true },
c = { name = '+nerd-commenter' },
d = { ':bd<CR>', 'close buffer', noremap = true, silent = false },
- e = { ':Files<CR>', 'files', noremap = true, silent = true },
+ e = { ':Telescope find_files<CR>', 'find files', noremap = true, silent = true },
G = { ':FloatermNew lazygit<CR>', 'lazygit', noremap = true, silent = true },
h = { ':Startify<CR>', 'startify', noremap = true, silent = true },
k = { ':w<CR>:bp<CR>:bd #<CR>', 'write and close buffer', noremap = true, silent = false },
@@ -17,7 +18,12 @@ wk.register({
r = { name = '+coc-rename' },
f = {
name = 'telescope',
- f = { ':Telescope find_files<CR>', 'find files', noremap = true, silent = true },
+ -- f = { ':Telescope find_files<CR>', 'find files', noremap = true, silent = true },
+ f = { ts.find_files, 'find files', noremap = true, silent = true },
+ g = { ts.git_files, 'git files', noremap = true, silent = true },
+ s = { function()
+ ts.grep_string({ search = vim.fn.input("Grep > ") })
+ end, 'grep string', noremap = true, silent = true },
},
g = {
name = 'grep',
@@ -25,6 +31,11 @@ wk.register({
g = { ':Grep<CR>', 'grep', noremap = true, silent = true },
r = { ':Rg<CR>', 'ripgrep', noremap = true, silent = true },
},
+ v = {
+ name = 'nvim',
+ v = { vim.cmd.Ex, 'explorer', noremap = true, silent = true },
+ u = { ':PlugUpgrade<CR>:PlugUpdate<CR>', 'upgrade', noremap = true, silent = true },
+ },
}, { prefix = '<leader>', })
wk.setup({
plugins = {
@@ -41,3 +52,5 @@ wk.setup({
triggers = { "<leader>" },
triggers_nowait = { "d" },
})
+
+vim.keymap.set('n', '<C-p>', ts.git_files)