Skip to content

A collection of extensions on top of the fatih/vim-go plugin, that I find useful

License

Notifications You must be signed in to change notification settings

kernel-panic96/vim-go-extensions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

vim-go-extensions

This plugin extends the awesome fatih/vim-go plugin, with the following features:

Features

  • Add key mappings only for when the debugger is active
  • :GoListBreakpoints to show breakpoints in the quickfix window
  • :GoClearAllBreakpoints to clear all breakpoints
  • :GoClearFileBreakpoints to clear breakpoints just in the current file

Showcase GIF

Install

vim-go-extensions requires vim-go

  • Vundle
    • Plugin 'kernel-panic96/vim-go-extensions'

Usage

Defining debug mode specific mappings
let g:go_debug_mappings = [
    \['nmap <nowait>',  'c', '<Plug>(go-debug-continue)'],
    \['nmap',           'q', ':ExtendedGoDebugStop<CR>'],
    \['nmap <nowait>',  'n', '<Plug>(go-debug-next)'],
    \['nmap',           's', '<Plug>(go-debug-step)'],
\]

Those mappings will activate upon executing :ExtendedGoDebugStart or :ExtendedGoDebugTest and will restore your previous bindings once the :ExtendedGoDebugStop command is executed, so in the example above vim's builtin c semantics will be restored once the debugger session ends

Options

  • g:go_debug_autoupdate_quickfix_breakpoints

    Controls the autoupdating of the quickfix window, 1 (on) by default

  • g:go_debug_breakpoint_symbol, example

    let g:go_debug_breakpoint_symbol='👻'
    
  • g:go_debug_current_line_symbol, example

    let g:go_debug_current_line_symbol='💩'
    

    You have to use :ExtendedGoDebugBreakpoint instead of :GoDebugBreakpoint for symbols to work, atleast on neovim.

License

The BSD 3-Clause License - see LICENSE for more details

About

A collection of extensions on top of the fatih/vim-go plugin, that I find useful

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published