Go (golang) code coverage overlays support for Vim.
For Vundle add these lines to your vimrc:
Plugin 'fatih/vim-go' "prerequisites
Plugin 't-yuki/vim-go-coverlay'
Then run :PluginInstall
For example, add these lines to your vimrc:
au FileType go nmap <leader>c <Plug>(go-coverlay) "test coverage then overlay covered lines
au FileType go nmap <leader>C <Plug>(go-clearlay) "clear overlay
au BufWritePost *.go call go#coverlay#Coverlay() "run test and cover on file save
- Thanks for basic structure and some of codes: https://github.com/fatih/vim-go and related projects.
- Thanks for inspiration: https://github.com/twada/coverlay.el
- Thanks for documentation: http://vim-jp.org/vimdoc-ja/eval.html
- http://vim-jp.org/vimdoc-ja/eval.html#matchadd%28%29
- http://vim-jp.org/vimdoc-ja/pattern.html
- http://vim-jp.org/vimdoc-ja/options.html#%27highlight%27
- http://www.vim.org/scripts/script.php?script_id=1238
- Thanks for parser: https://godoc.org/golang.org/x/tools/cover#ParseProfiles
- Thanks for contributors
- https://github.com/t-yuki/vim-go-coverlay
- https://github.com/anupcshan/vim-go-coverlay