Files
neogen/README.md
Daniel Mathiot 84920a1621 Update README.md
2021-08-23 08:50:07 +02:00

2.1 KiB


Neogen - Your Annotation Toolkit

Table Of Contents

Features

  • Create annotations with one keybind
  • Defaults for multiple languages and annotation conventions
  • Extremely customizable and extensible
  • Written in lua

Requirements

Installation

Use your favorite package manager to install Neogen, e.g:

use { 
    "danymat/neogen", 
    config = function()
        require('neogen').setup {
            enabled = true
        }
    end,
    requires = "nvim-treesitter/nvim-treesitter"
}

Configuration

use { 
    "danymat/neogen", 
    config = function()
        require('neogen').setup {
            enabled = true,             -- required for Neogen to work
            input_after_comment = true, -- automatic jump (with insert mode) on inserted annotation
        }
    end,
    requires = "nvim-treesitter/nvim-treesitter"
}

Supported Languages

There is a list of supported languages and fields, with their annotation style

Language Annotation conventions Supported fields
lua Emmylua @param, @varargs, @return

Usage

I exposed a command :Neogen to generate the annotations. You can bind it to your keybind of choice, like so:

vim.api.nvim_set_keymap("n", "<Leader>ng", ":Neogen<CR>", {})

It'll generate the annotations provided by neogen.

GIFS

Contributing

Adding support for new languages is quite easy, and a documentation will be available soon!

Credits

  • Binx, for making that gorgeous logo for free!