devkvlt / go-tags.nvim

A Neovim plugin for modifying Go struct tags using gomodifytags.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Go Tags

A Neovim plugin for modifying Go struct tags using gomodifytags.

Supports modified buffers.

Screenshot

Requirements

  • nvim-treesitter
  • gomodifytags: install with go install github.com/fatih/gomodifytags@latest

Install

For example, with packer.nvim:

use({
  'devkvlt/go-tags.nvim',
  requires = { 'nvim-treesitter/nvim-treesitter' },
})

Setup

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.

About

A Neovim plugin for modifying Go struct tags using gomodifytags.


Languages

Language:Lua 100.0%