more vim stuff!
This commit is contained in:
parent
53e92c72b7
commit
cfad39f336
5 changed files with 75 additions and 36 deletions
44
dot_config/nvim/lua/keybinds.lua
Normal file
44
dot_config/nvim/lua/keybinds.lua
Normal file
|
@ -0,0 +1,44 @@
|
|||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
vim.g.which_key_use_floating_win = 1
|
||||
vim.g.which_key_timeout = 300
|
||||
|
||||
local wk = require("whichkey_setup")
|
||||
|
||||
local leader_keymap = {
|
||||
["<space>"] = {"<cmd>Telescope find_files<CR>", "Find file"},
|
||||
b = {
|
||||
name = "+buffers",
|
||||
b = {"<cmd>Telescope buffers<CR>", "List buffers"},
|
||||
["<tab>"] = {"<cmd>b#<CR>", "Goto other buffer"},
|
||||
},
|
||||
w = {
|
||||
name = "+window",
|
||||
v = {"<cmd>vsplit<CR>", "Split vertically"},
|
||||
s = {"<cmd>split<CR>", "Split horizontally"},
|
||||
q = {"<cmd>x<CR>", "Close window"}, -- No unsaved windows!!
|
||||
h = {"<cmd>wincmd h<CR>", "Left"},
|
||||
j = {"<cmd>wincmd j<CR>", "Down"},
|
||||
k = {"<cmd>wincmd k<CR>", "Up"},
|
||||
l = {"<cmd>wincmd l<CR>", "Right"},
|
||||
H = {"<C-w>H", "Move Left"},
|
||||
J = {"<C-w>J", "Move Down"},
|
||||
K = {"<C-w>K", "Move Up"},
|
||||
L = {"<C-w>L", "Move Right"},
|
||||
},
|
||||
l = {
|
||||
name = "+lsp",
|
||||
e = {"<cmd>lua vim.diagnostic.open_float()<CR>", "Show diagnostic at point"},
|
||||
h = {"<cmd>lua vim.diagnostic.goto_prev()<CR>", "Goto prev diagnostic"},
|
||||
l = {"<cmd>lua vim.diagnostic.goto_next()<CR>", "Goto next diagnostic"},
|
||||
q = {"<cmd>Telescope diagnostics<CR>", "Show all diagnostics"},
|
||||
a = {"<cmd>lua vim.lsp.add_workspace_folder()<CR>", "Add folder to workspace"},
|
||||
r = {"<cmd>lua vim.lsp.remove_workspace_folder()<CR>", "Remove folder from workspace"},
|
||||
R = {"<cmd>Telescope lsp_references<CR>", "List references"},
|
||||
s = {"<cmd>Telescope lsp_document_symbols<CR>", "List document symbols"},
|
||||
S = {"<cmd>Telescope lsp_workspace_symbols<CR>", "List workspace symbols"},
|
||||
d = {"<cmd>Telescope lsp_definitions<CR>", "Goto definition"},
|
||||
},
|
||||
}
|
||||
|
||||
wk.register_keymap("leader", leader_keymap)
|
Loading…
Add table
Add a link
Reference in a new issue