A Neovim plugin for modifying Go struct tags using gomodifytags.
Supports modified buffers.
nvim-treesitter
gomodifytags
: install withgo install github.com/fatih/gomodifytags@latest
For example, with packer.nvim:
use({
'devkvlt/go-tags.nvim',
requires = { 'nvim-treesitter/nvim-treesitter' },
})
require('go-tags').setup({
commands = {
['GoTagsAddJSON'] = { '-add-tags', 'json' },
['GoTagsRemoveJSON'] = { '-remove-tags', 'json' },
},
})
This sets up the Vim commands to call gomodifytags
with the given flags. You
can be creative and add any flags that make sense.