-- if set, when we switch between buffers, it will not split more than once. It will switch to the existing buffer instead
vim.opt.switchbuf = 'useopen'

local goc = require('nvim-goc')
goc.setup({ verticalSplit = false })


vim.cmd [[
    augroup nvimgoc_keymaps
        autocmd!
        autocmd FileType go nnoremap <buffer><leader>c :lua require('nvim-goc').Coverage()<cr>
        autocmd FileType go nnoremap <buffer><leader>cc :lua require('nvim-goc').ClearCoverage()<cr>
        autocmd FileType go nnoremap <buffer><leader>cf :lua require('nvim-goc').CoverageFunc()<cr>
    augroup end
]]

-- default colors
-- vim.highlight.link('GocNormal', 'Comment')
-- vim.highlight.link('GocCovered', 'String')
-- vim.highlight.link('GocUncovered', 'Error')
