mirror of
https://github.com/mr0xb/dotfiles.git
synced 2026-08-28 03:44:57 -04:00
opensuse
This commit is contained in:
commit
e25cf3edec
34 changed files with 3718 additions and 0 deletions
63
.config/nvim/lua/config/whichkey.lua
Normal file
63
.config/nvim/lua/config/whichkey.lua
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
local M = {}
|
||||
|
||||
|
||||
function M.setup()
|
||||
local whichkey = require "which-key"
|
||||
|
||||
local conf = {
|
||||
window = {
|
||||
border = "single", -- none, single, double, shadow
|
||||
position = "bottom", -- bottom, top
|
||||
},
|
||||
}
|
||||
|
||||
local opts = {
|
||||
mode = "n", -- Normal mode
|
||||
prefix = "<leader>",
|
||||
buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings
|
||||
silent = true, -- use `silent` when creating keymaps
|
||||
noremap = true, -- use `noremap` when creating keymaps
|
||||
nowait = false, -- use `nowait` when creating keymaps
|
||||
}
|
||||
|
||||
local mappings = {
|
||||
["w"] = { "<cmd>update!<CR>", "Save" },
|
||||
["q"] = { "<cmd>q!<CR>", "Quit" },
|
||||
["e"] = { "<cmd>NvimTreeToggle<CR>", "Nvim Tree"},
|
||||
["a"] = { "<cmd>AerialToggle! float<CR>","Aerial Toggle"},
|
||||
|
||||
o = {
|
||||
name = "+open",
|
||||
},
|
||||
|
||||
b = {
|
||||
name = "Buffer",
|
||||
c = { "<Cmd>bd!<Cr>", "Close current buffer" },
|
||||
D = { "<Cmd>%bd|e#|bd#<Cr>", "Delete all buffers" },
|
||||
},
|
||||
|
||||
z = {
|
||||
name = "Packer",
|
||||
c = { "<cmd>PackerCompile<cr>", "Compile" },
|
||||
i = { "<cmd>PackerInstall<cr>", "Install" },
|
||||
s = { "<cmd>PackerSync<cr>", "Sync" },
|
||||
S = { "<cmd>PackerStatus<cr>", "Status" },
|
||||
u = { "<cmd>PackerUpdate<cr>", "Update" },
|
||||
},
|
||||
|
||||
g = {
|
||||
name = "Git",
|
||||
s = { "<cmd>Neogit<CR>", "Status" },
|
||||
},
|
||||
|
||||
v = {
|
||||
name = "Visual",
|
||||
r = { "<cmd>RainbowToggle<cr>", "Rainbow Brackets Toggle"},
|
||||
},
|
||||
}
|
||||
|
||||
whichkey.setup(conf)
|
||||
whichkey.register(mappings, opts)
|
||||
end
|
||||
|
||||
return M
|
||||
Loading…
Reference in a new issue