Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow customizing the gutter sign #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion plugin/godebug.vim
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ call mkdir(g:godebug_cache_path, "p")
" create a reasonably unique breakpoints file path per vim instance
let g:godebug_breakpoints_file = g:godebug_cache_path . "/". getpid() . localtime()

" allow customizing the gutter sign
if !exists("g:godebug_breakpoints_sign")
let g:godebug_breakpoints_sign="◉"
endif
highlight default link GoDebugBreakpointsSign Search

autocmd VimLeave * call godebug#deleteBreakpointsFile()<cr>

" Private functions {{{1
Expand All @@ -38,7 +44,7 @@ function! godebug#toggleBreakpoint(file, line, ...) abort
let breakpoint = "break " . a:file. ':' . a:line

" Define the sign for the gutter
exe "sign define gobreakpoint text=texthl=Search"
exe "sign define gobreakpoint text=" . g:godebug_breakpoints_sign . " texthl=GoDebugBreakpointsSign"

" If the line isn't already in the list, add it.
" Otherwise remove it from the list.
Expand Down