(local nvim (require :lib/nvim)) (local wk (require :which-key)) (local normal-map-leader {"t" ["" "Toggle neo-tree"] "w" [":w" "Write file"] "q" [":q" "Quit"] "r" [":RainbowParenthesesToggleAll" "Toggle Rainbow Parens"] ; Telescope "f" {:Name "Files" :f ["Telescope find_files" "Find Files (in Telescope)"] :g ["Telescope live_grep" "Find Grep (in Telescope)"] :b ["Telescope buffers" "Find Buffers"] :h ["Telescope help_tags" "Find Help"] :t ["Telescope tags" "Find Tags"] :r ["Telescope oldfiles" "Recent files"]} ; Git "g" {:Name "Git" "s" [":G" "Git Status"] "f" [":G fetch --all" "Git Fetch"] "b" [":GBranches" "Git Branch"] "p" [":Git! push" "Git Push"] "d" [":GDiff" "Git Diff"] "h" ["" "Commit Hunk under Cursor"]} ; nmap gl :diffget //3 ; nmap gh :diffget //2 ; nnoremap gc :G commit -v -q %:p ; Buffers "b" {:Name "Buffer" :a ["" "Buffer Add"] :q ["" "Buffer Quit"] :n ["" "Buffer Next"] :N [":tabp" "Buffer Previous"] :p [":tabp" "Buffer Previous"]} ; Search "s" {:Name "Search" :b ["Telescope current_buffer_fuzzy_find" "Search in current buffer"] :s ["Telescope live_grep" "Search in project"] :t ["TodoTelescope" "Search TODOs in project"] :c ["let @/ = \"\":echo 'Search highlight cleared'" "Clear search"]} ; Code "c" {:Name "Code" :d [":lua vim.lsp.buf.definition()" "Go to Definition"] :i [":lua require('telescope.builtin').lsp_implementation()" "Implementation"] :s [":lua vim.lsp.buf.signature_help()" "Signature Help"] :r [":Lspsaga rename" "Rename Symbol"] :h [":Lspsaga hover_doc" "Hover doc"] :o [":LSoutlineToggle" "Outline"]} ; Kitaab "z" {:Name "Kitaab"}}) (wk.register normal-map-leader {:prefix ""})