dotfiles/nvim/.config/nvim/lua/plugins/nvimgoc.lua

15 lines
596 B
Lua

-- 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
]]