summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.lua3
-rw-r--r--lua/lv-which-key/init.lua43
-rw-r--r--utils/lv-vscode/init.vim (renamed from vimscript/lv-vscode/init.vim)0
-rw-r--r--vimscript/functions.vim50
4 files changed, 28 insertions, 68 deletions
diff --git a/init.lua b/init.lua
index 79e8022b..d066c27b 100644
--- a/init.lua
+++ b/init.lua
@@ -12,9 +12,6 @@ require('lv-treesitter')
require('lv-autopairs')
require('lv-which-key')
--- TODO gotta get rid of this for speed
-vim.cmd('source ' .. CONFIG_PATH .. '/vimscript/functions.vim')
-
-- LSP
require('lsp')
-- TODO should I put this in the filetype files?
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 = {"<cmd>BufferPick<cr>", "jump to buffer"},
@@ -100,13 +101,6 @@ local mappings = {
L = {"<cmd>BufferOrderByLanguage<cr>", "sort BufferLines automatically by language"},
},
- -- ["/"] = {"<cmd>CommentToggle<cr>", "Comment"},
- [";"] = {"<cmd>Dashboard<cr>", "Dashboard"},
- -- ["c"] = {"<cmd>BufferClose<cr>", "Close Buffer"},
- -- ["e"] = {"<cmd>NvimTreeToggle<cr>", "Explorer"},
- -- ["f"] = {"<cmd>Telescope find_files<cr>", "Find File"},
- -- ["h"] = {"<cmd>set hlsearch!<cr>", "No Highlight"},
- -- ["p"] = {"<cmd>lua require'telescope'.extensions.project.project{}<cr>", "Projects"},
d = {
name = "Diagnostics",
@@ -117,6 +111,24 @@ local mappings = {
l = {"<cmd>TroubleToggle loclist<cr>", "loclist"},
r = {"<cmd>TroubleToggle lsp_references<cr>", "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 = {"<cmd>DebugToggleBreakpoint<cr>", "Toggle Breakpoint"},
@@ -128,13 +140,14 @@ local mappings = {
},
g = {
name = "Git",
- j = {"<cmd>NextHunk<cr>", "Next Hunk"},
- k = {"<cmd>PrevHunk<cr>", "Prev Hunk"},
- p = {"<cmd>PreviewHunk<cr>", "Preview Hunk"},
- r = {"<cmd>ResetHunk<cr>", "Reset Hunk"},
- R = {"<cmd>ResetBuffer<cr>", "Reset Buffer"},
- s = {"<cmd>StageHunk<cr>", "Stage Hunk"},
- u = {"<cmd>UndoStageHunk<cr>", "Undo Stage Hunk"},
+ j = {"<cmd>lua require 'lv-utils'.next_hunk()<cr>", "Next Hunk"},
+ k = {"<cmd>lua require 'lv-utils'.prev_hunk()<cr>", "Prev Hunk"},
+ l = {"<cmd>lua require 'lv-utils'.blame_line()<cr>", "Blame"},
+ p = {"<cmd>lua require 'lv-utils'.preview_hunk()<cr>", "Preview Hunk"},
+ r = {"<cmd>lua require 'lv-utils'.reset_hunk()<cr>", "Reset Hunk"},
+ R = {"<cmd>lua require 'lv-utils'.reset_buffer()<cr>", "Reset Buffer"},
+ s = {"<cmd>lua require 'lv-utils'.stage_hunk()<cr>", "Stage Hunk"},
+ u = {"<cmd>lua require 'lv-utils'.undo_stage_hunk()<cr>", "Undo Stage Hunk"},
o = {"<cmd>Telescope git_status<cr>", "Open changed file"},
b = {"<cmd>Telescope git_branches<cr>", "Checkout branch"},
c = {"<cmd>Telescope git_commits<cr>", "Checkout commit"},
@@ -146,7 +159,7 @@ local mappings = {
A = {"<cmd>Lspsaga range_code_action<cr>", "Selected Action"},
d = {"<cmd>Telescope lsp_document_diagnostics<cr>", "Document Diagnostics"},
D = {"<cmd>Telescope lsp_workspace_diagnostics<cr>", "Workspace Diagnostics"},
- f = {"<cmd>LspFormatting<cr>", "Format"},
+ f = {"<cmd>lua require 'lv-utils'.formatting()<cr>", "Format"},
h = {"<cmd>Lspsaga hover_doc<cr>", "Hover Doc"},
i = {"<cmd>LspInfo<cr>", "Info"},
l = {"<cmd>Lspsaga lsp_finder<cr>", "LSP Finder"},
diff --git a/vimscript/lv-vscode/init.vim b/utils/lv-vscode/init.vim
index 1aa30934..1aa30934 100644
--- a/vimscript/lv-vscode/init.vim
+++ b/utils/lv-vscode/init.vim
diff --git a/vimscript/functions.vim b/vimscript/functions.vim
deleted file mode 100644
index c2edad21..00000000
--- a/vimscript/functions.vim
+++ /dev/null
@@ -1,50 +0,0 @@
-command! LspFormatting lua require 'lv-utils'.formatting()
-command! NextHunk lua require 'lv-utils'.next_hunk()
-command! PrevHunk lua require 'lv-utils'.prev_hunk()
-command! StageHunk lua require 'lv-utils'.stage_hunk()
-command! UndoStageHunk lua require 'lv-utils'.undo_stage_hunk()
-command! ResetHunk lua require 'lv-utils'.reset_hunk()
-command! ResetBuffer lua require 'lv-utils'.reset_buffer()
-command! PreviewHunk lua require 'lv-utils'.preview_hunk()
-command! BlameLine lua require 'lv-utils'.blame_line()
-
-" 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()
-
-" 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/
-
-" TODO Add full support later
-" nnoremap <silent> <F5> :lua require'dap'.continue()<CR>
-" nnoremap <silent> <F10> :lua require'dap'.step_over()<CR>
-" nnoremap <silent> <F11> :lua require'dap'.step_into()<CR>
-" nnoremap <silent> <F12> :lua require'dap'.step_out()<CR>
-" nnoremap <silent> <leader>b :lua require'dap'.toggle_breakpoint()<CR>
-" nnoremap <silent> <leader>B :lua require'dap'.set_breakpoint(vim.fn.input('Breakpoint condition: '))<CR>
-" nnoremap <silent> <leader>lp :lua require'dap'.set_breakpoint(nil, nil, vim.fn.input('Log point message: '))<CR>
-" nnoremap <silent> <leader>dr :lua require'dap'.repl.open()<CR>
-" nnoremap <silent> <leader>dl :lua require'dap'.run_last()<CR>
-
-" autocmd! User GoyoEnter lua require('galaxyline').disable_galaxyline()
-" autocmd! User GoyoLeave lua require('galaxyline').galaxyline_augroup()
-
-function! QuickFixToggle()
- if empty(filter(getwininfo(), 'v:val.quickfix'))
- copen
- else
- cclose
- endif
-endfunction