No description
| lua/go-tags | ||
| plugin | ||
| README.md | ||
Simple go build tags picker for nvim
Lazy.nvim
return {
'https://git.wzray.com/wzray/go-tags.nvim'
config = function()
vim.api.nvim_create_autocmd('FileType', {
pattern = 'go',
callback = function(args)
vim.keymap.set('n', '<leader>t', require('go-tags').pick_build_tags, { buf = args.buf })
vim.keymap.set('n', '<leader>T', require('go-tags').enter_build_tags, { buf = args.buf })
end,
})
-- be sure to load lsp configs BEFORE plugins
local current_tags = require('go-tags').load_build_tags()
if current_tags then
vim.lsp.config.gopls.settings.buildFlags = { '-tags=' .. current_tags }
end
end
}