aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/nvim_terminal_emulator.txt14
-rw-r--r--runtime/pack/dist/opt/termdebug/plugin/termdebug.vim12
2 files changed, 25 insertions, 1 deletions
diff --git a/runtime/doc/nvim_terminal_emulator.txt b/runtime/doc/nvim_terminal_emulator.txt
index aa37161d34..bbcc686207 100644
--- a/runtime/doc/nvim_terminal_emulator.txt
+++ b/runtime/doc/nvim_terminal_emulator.txt
@@ -493,6 +493,20 @@ If there is no g:termdebug_config you can use: >vim
let g:termdebug_popup = 0
+Change default signs ~
+ *termdebug_signs*
+Termdebug uses the last two characters of the breakpoint ID in the
+signcolumn to represent breakpoints. For example, breakpoint ID 133
+will be displayed as `33`.
+
+If you want to customize the breakpoint signs: >vim
+ let g:termdebug_config['sign'] = '>>'
+If there is no g:terminal_config yet you can use: >vim
+ let g:termdebug_config = {'sign': '>>'}
+
+After this, breakpoints will be displayed as `>>` in the signcolumn.
+
+
Vim window width ~
*termdebug_wide*
To change the width of the Vim window when debugging starts and use a vertical
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
index d4b49e85c8..e8b78b3f5f 100644
--- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
+++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
@@ -1543,8 +1543,18 @@ func s:CreateBreakpoint(id, subid, enabled)
else
let hiName = "debugBreakpoint"
endif
+ let label = ''
+ if exists('g:termdebug_config')
+ let label = get(g:termdebug_config, 'sign', '')
+ endif
+ if label == ''
+ let label = substitute(nr, '\..*', '', '')
+ if strlen(label) > 2
+ let label = strpart(label, strlen(label) - 2)
+ endif
+ endif
call sign_define('debugBreakpoint' .. nr,
- \ #{text: substitute(nr, '\..*', '', ''),
+ \ #{text: strpart(label, 0, 2),
\ texthl: hiName})
endif
endfunc