24 lines
731 B
VimL
24 lines
731 B
VimL
let g:ycm_java_jdtls_extension_path = [
|
|
\ expand( '<sfile>:p:h:h:h:h:h' ) . '/gadgets/macos'
|
|
\ ]
|
|
|
|
let s:jdt_ls_debugger_port = 0
|
|
function! s:StartDebugging()
|
|
if s:jdt_ls_debugger_port <= 0
|
|
" Get the DAP port
|
|
let s:jdt_ls_debugger_port = youcompleteme#GetCommandResponse(
|
|
\ 'ExecuteCommand',
|
|
\ 'vscode.java.startDebugSession' )
|
|
|
|
if s:jdt_ls_debugger_port == ''
|
|
echom "Unable to get DAP port - is YCM initialized?"
|
|
let s:jdt_ls_debugger_port = 0
|
|
return
|
|
endif
|
|
endif
|
|
|
|
" Start debugging with the DAP port
|
|
call vimspector#LaunchWithSettings( { 'DAPPort': s:jdt_ls_debugger_port } )
|
|
endfunction
|
|
|
|
nnoremap <silent> <buffer> <Leader><F5> :call <SID>StartDebugging()<CR>
|