Skip to content

lordvidex/go-heat.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

go-heat.nvim πŸ”₯

A neovim plugin to show the heatmap of your Go project, for a bird eye view of the test coverage.

Installation

-- Packer
use {  'lordvidex/go-heat.nvim',
  requires = { 'akinsho/toggleterm.nvim' },
  config = function() 
    require('go-heat').setup() 
  end
}

Screenshots

Heat in-Browser

Browser Shot

Heat in-Neovim

Terminal Shot

Default configurations

Below are the default configurations. You can override them by passing a table to the setup function.

local configs = {
  coverprofile = nil,                        -- default coverage profile (go-heat tries to look in cwd)
  svg_output = '/tmp/go-heat/temp.svg',      -- if not nil, will output the svg to this file
  open_in = 'browser',                      -- 'terminal' | 'browser' (terminal has lower quality than browser)
  browser_type = 'safari'                    -- only peculiar to Darwin; tested options: 'safari' | 'chrome' | 'arc' 
  debug = false,                            -- if true, will print debug messages
  -- any option passed to browser_type must be executable with `open` -a <name> in macos
}

Keymaps

This plugin does not set any keymap and you can set your own keymap to call the show function.
Below is an example of setting a keymap.

-- show the heatmap
vim.api.nvim_set_keymap('n', '<localleader>gth', '<cmd>lua require("go-heat").show()<cr>', { noremap = true, silent = true })

Requirements

References

  • go cover treemap: A tool to generate treemap visualizations of Go cover profiles

Checklist

  • Add convenient plugs and probably keymaps
  • Improve terminal render quality
  • Add more options for go-cover-treemap e.g. package_only, colors, etc
  • Reduce plugin dependencies / add scripts to install dependencies for all platforms

Please star🌟 this repository if you found go-heat useful.
Feel free to open an issue πŸ”­ or PR βž• if you have any suggestions or contributions.

About

Dropping that heat and showing the green vibes! Test coverage at its best! πŸ’šπŸ”₯πŸ˜„

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages