From 832b55fa23ae1e49bd805b6e0e9f5d20b08f46a0 Mon Sep 17 00:00:00 2001 From: christianchiarulli Date: Mon, 28 Jun 2021 11:39:37 -0400 Subject: less vimscript --- lua/lv-which-key/init.lua | 43 ++++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 15 deletions(-) (limited to 'lua') diff --git a/lua/lv-which-key/init.lua b/lua/lv-which-key/init.lua index 50bc66ae..ab3a8dca 100644 --- a/lua/lv-which-key/init.lua +++ b/lua/lv-which-key/init.lua @@ -89,6 +89,7 @@ local mappings = { ["h"] = "No Highlight", ["p"] = "Projects", ["z"] = "Zen", + [";"] = "Dashboard", b = { name = "+Buffers", j = {"BufferPick", "jump to buffer"}, @@ -100,13 +101,6 @@ local mappings = { L = {"BufferOrderByLanguage", "sort BufferLines automatically by language"}, }, - -- ["/"] = {"CommentToggle", "Comment"}, - [";"] = {"Dashboard", "Dashboard"}, - -- ["c"] = {"BufferClose", "Close Buffer"}, - -- ["e"] = {"NvimTreeToggle", "Explorer"}, - -- ["f"] = {"Telescope find_files", "Find File"}, - -- ["h"] = {"set hlsearch!", "No Highlight"}, - -- ["p"] = {"lua require'telescope'.extensions.project.project{}", "Projects"}, d = { name = "Diagnostics", @@ -117,6 +111,24 @@ local mappings = { l = {"TroubleToggle loclist", "loclist"}, r = {"TroubleToggle lsp_references", "references"} }, + +-- " Available Debug Adapters: +-- " https://microsoft.github.io/debug-adapter-protocol/implementors/adapters/ +-- " +-- " Adapter configuration and installation instructions: +-- " https://github.com/mfussenegger/nvim-dap/wiki/Debug-Adapter-installation +-- " +-- " Debug Adapter protocol: +-- " https://microsoft.github.io/debug-adapter-protocol/ +-- " Debugging +-- command! DebugToggleBreakpoint lua require'dap'.toggle_breakpoint() +-- command! DebugStart lua require'dap'.continue() +-- command! DebugContinue lua require'dap'.continue() +-- command! DebugStepOver lua require'dap'.step_over() +-- command! DebugStepOut lua require'dap'.step_out() +-- command! DebugStepInto lua require'dap'.step_into() +-- command! DebugToggleRepl lua require'dap'.repl.toggle() +-- command! DebugGetSession lua require'dap'.session() D = { name = "Debug", b = {"DebugToggleBreakpoint", "Toggle Breakpoint"}, @@ -128,13 +140,14 @@ local mappings = { }, g = { name = "Git", - j = {"NextHunk", "Next Hunk"}, - k = {"PrevHunk", "Prev Hunk"}, - p = {"PreviewHunk", "Preview Hunk"}, - r = {"ResetHunk", "Reset Hunk"}, - R = {"ResetBuffer", "Reset Buffer"}, - s = {"StageHunk", "Stage Hunk"}, - u = {"UndoStageHunk", "Undo Stage Hunk"}, + j = {"lua require 'lv-utils'.next_hunk()", "Next Hunk"}, + k = {"lua require 'lv-utils'.prev_hunk()", "Prev Hunk"}, + l = {"lua require 'lv-utils'.blame_line()", "Blame"}, + p = {"lua require 'lv-utils'.preview_hunk()", "Preview Hunk"}, + r = {"lua require 'lv-utils'.reset_hunk()", "Reset Hunk"}, + R = {"lua require 'lv-utils'.reset_buffer()", "Reset Buffer"}, + s = {"lua require 'lv-utils'.stage_hunk()", "Stage Hunk"}, + u = {"lua require 'lv-utils'.undo_stage_hunk()", "Undo Stage Hunk"}, o = {"Telescope git_status", "Open changed file"}, b = {"Telescope git_branches", "Checkout branch"}, c = {"Telescope git_commits", "Checkout commit"}, @@ -146,7 +159,7 @@ local mappings = { A = {"Lspsaga range_code_action", "Selected Action"}, d = {"Telescope lsp_document_diagnostics", "Document Diagnostics"}, D = {"Telescope lsp_workspace_diagnostics", "Workspace Diagnostics"}, - f = {"LspFormatting", "Format"}, + f = {"lua require 'lv-utils'.formatting()", "Format"}, h = {"Lspsaga hover_doc", "Hover Doc"}, i = {"LspInfo", "Info"}, l = {"Lspsaga lsp_finder", "LSP Finder"}, -- cgit v1.2.3