Skip to content

Commit

Permalink
Add debug breakpoint symbol config, And add documentation for the new…
Browse files Browse the repository at this point in the history
… config value
  • Loading branch information
louzp committed Jan 23, 2020
1 parent 025af24 commit 155a93d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions autoload/go/config.vim
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,10 @@ function! go#config#HighlightDebug() abort
return get(g:, 'go_highlight_debug', 1)
endfunction

function! go#config#DebugBreakpointSymbol() abort
return get( g:, 'go_debug_breakpoint_symbol', '>' )
endfunction

function! go#config#FoldEnable(...) abort
if a:0 > 0
return index(go#config#FoldEnable(), a:1) > -1
Expand Down
2 changes: 1 addition & 1 deletion autoload/go/debug.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ function! s:list_breakpoints()
return l:signs
endfunction

sign define godebugbreakpoint text=> texthl=GoDebugBreakpoint
exe 'sign define godebugbreakpoint text='.go#config#DebugBreakpointSymbol().' texthl=GoDebugBreakpoint'
sign define godebugcurline text== texthl=GoDebugCurrent linehl=GoDebugCurrent

" restore Vi compatibility settings
Expand Down
8 changes: 8 additions & 0 deletions doc/vim-go.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2333,6 +2333,14 @@ Highlight the current line and breakpoints in the debugger.
let g:go_highlight_debug = 1
<

*'go:go_debug_breakpoint_symbol'*

change default symbol for breakpoints in the debugger.

>
let g:go_debug_breakpoint_symbol = '>'
<

==============================================================================
FAQ TROUBLESHOOTING *go-troubleshooting*

Expand Down

0 comments on commit 155a93d

Please sign in to comment.