
# Neogen - Your Annotation Toolkit
[](https://neovim.io)
[](http://www.lua.org)
# Table Of Contents
- [Features](#features)
- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
- [Configuration](#configuration)
- [Supported Languages](#supported-languages)
- [Adding Languages](#adding-languages)
- [GIFS](#gifs)
- [Credits](#credits)
- [Support](#support)
## Features
- Create annotations with one keybind, and jump your cursor in the inserted annotation
- Defaults for multiple languages and annotation conventions
- Extremely customizable and extensible
- Written in lua (and uses Tree-sitter)

## Requirements
- Install [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter)
## Installation
Use your favorite package manager to install Neogen, e.g:
```lua
use {
"danymat/neogen",
config = function()
require('neogen').setup {}
end,
requires = "nvim-treesitter/nvim-treesitter",
-- Uncomment next line if you want to follow only stable versions
-- tag = "*"
}
```
## Usage
- If you want to keep it simple, you can use the `:Neogen` command:
```vim
" will generate annotation for the function you're inside
:Neogen
" or you can force a certain type of annotation.
" It'll find the next upper node that matches the type
" E.g if you're on a method of a class and do `:Neogen class`, it'll find the class declaration and generate the annotation.
:Neogen func|class|type|...
```
- If you like to use the lua API, I exposed a function to generate the annotations.
```lua
require('neogen').generate()
```
You can bind it to your keybind of choice, like so:
```lua
local opts = { noremap = true, silent = true }
vim.api.nvim_set_keymap("n", "