nvim: Use remedybg

This commit is contained in:
doyle 2023-04-14 12:24:13 +10:00
parent c24784b070
commit 3977146d6d

View File

@ -295,6 +295,38 @@ augroup persistent_settings
au bufenter * :set formatoptions=q1j
augroup end
function! RemedyBGOpenFile()
execute("!start remedybg open-file " . expand("%:p") . " " . line("."))
execute("!powershell -Command Add-Type -AssemblyName Microsoft.VisualBasic; [Microsoft.VisualBasic.Interaction]::AppActivate(' - RemedyBG')")
endfunction
command RemedyBGOpenFile call RemedyBGOpenFile()
function! RemedyBGStartDebugging()
execute("!start remedybg start-debugging " . expand("%:p") . " " . line("."))
execute("!powershell -Command Add-Type -AssemblyName Microsoft.VisualBasic; [Microsoft.VisualBasic.Interaction]::AppActivate(' - RemedyBG')")
endfunction
command RemedyBGStartDebugging call RemedyBGStartDebugging()
function! RemedyBGStopDebugging()
execute("!start remedybg stop-debugging " . expand("%:p") . " " . line("."))
execute("!powershell -Command Add-Type -AssemblyName Microsoft.VisualBasic; [Microsoft.VisualBasic.Interaction]::AppActivate(' - RemedyBG')")
endfunction
command RemedyBGStopDebugging call RemedyBGStopDebugging()
function! RemedyBGRunToCursor()
execute("!start remedybg open-file " . expand("%:p") . " " . line("."))
execute("!start remedybg run-to-cursor " . expand("%:p") . " " . line("."))
execute("!powershell -Command Add-Type -AssemblyName Microsoft.VisualBasic; [Microsoft.VisualBasic.Interaction]::AppActivate(' - RemedyBG')")
endfunction
command RemedyBGRunToCursor call RemedyBGRunToCursor()
function! RemedyBGAddBreakpointAtFile()
execute("!start remedybg open-file " . expand("%:p") . " " . line("."))
execute("!start remedybg add-breakpoint-at-file " . expand("%:p") . " " . line("."))
execute("!powershell -Command Add-Type -AssemblyName Microsoft.VisualBasic; [Microsoft.VisualBasic.Interaction]::AppActivate(' - RemedyBG')")
endfunction
command RemedyBGAddBreakpointAtFile call RemedyBGAddBreakpointAtFile()
" FZF
" ==============================================================================
" Empty value to disable preview window altogether
@ -314,7 +346,7 @@ command! -bang -nargs=? -complete=dir FzfCustomFiles
" General Key Bindings
" ==============================================================================
" Telescope Bindings
" FZF Bindings
nnoremap <leader>h <cmd>FzfHistory<cr>
nnoremap <leader>f <cmd>FzfCustomFiles<cr>
nnoremap <leader>g <cmd>FzfRg<cr>
@ -323,6 +355,12 @@ nnoremap <leader>cc <cmd>FzfCommits<cr>
nnoremap <leader>cb <cmd>FzfBCommits<cr>
nnoremap <leader>b <cmd>FzfBuffers<cr>
nnoremap <silent> <F6> <cmd>RemedyBGOpenFile<cr><cr>
nnoremap <silent> <F5> <cmd>RemedyBGStartDebugging<cr><cr>
nnoremap <silent> <S-F5> <cmd>RemedyBGStopDebugging<cr><cr>
nnoremap <silent> <F9> <cmd>RemedyBGAddBreakpointAtFile<cr><cr>
nnoremap <silent> <C-F10> <cmd>RemedyBGRunToCursor<cr><cr>
" Map Ctrl+HJKL to navigate buffer window
nmap <silent> <C-h> :wincmd h<CR>
nmap <silent> <C-j> :wincmd j<CR>