Skip to content

Commit cb84e1a

Browse files
Add support for debugging category detection with nvim-dap (#191)
* add support for debugging category detection with nvim-dap * update history file for 1.3.0 * remove accidentally pasted line * Revert version bump * Revert Update HISTORY.rst * Only check for lua support --------- Co-authored-by: Alan Hamlett <[email protected]>
1 parent f699e30 commit cb84e1a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

plugin/wakatime.vim

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,17 @@ EOF
572572
let cmd = cmd + ['--extra-heartbeats']
573573
endif
574574

575+
" Debugging category support
576+
if has('lua')
577+
" check if nvim-dap is loaded
578+
if luaeval("package.loaded['dap'] ~= nil")
579+
" check if debugging session is active
580+
if luaeval("require('dap').session() ~= nil")
581+
let cmd = cmd + ['--category', 'debugging']
582+
endif
583+
end
584+
endif
585+
575586
" overwrite shell
576587
let [sh, shellcmdflag, shrd] = [&shell, &shellcmdflag, &shellredir]
577588
if !s:IsWindows()

0 commit comments

Comments
 (0)