[docgen] Update doc/neogen.txt
skip-checks: true
This commit is contained in:
@@ -8,7 +8,7 @@ Table of contents:
|
|||||||
Generate annotations.....................................|neogen.generate()|
|
Generate annotations.....................................|neogen.generate()|
|
||||||
Contributing................................................|neogen-develop|
|
Contributing................................................|neogen-develop|
|
||||||
Changes in neogen plugin..................................|neogen-changelog|
|
Changes in neogen plugin..................................|neogen-changelog|
|
||||||
Use popular snippet engines............................|snippet-integration|
|
Use popular snippet engines.....................|neogen-snippet-integration|
|
||||||
Configurations for the template table........|neogen-template-configuration|
|
Configurations for the template table........|neogen-template-configuration|
|
||||||
How to create/customize an annotation....................|neogen-annotation|
|
How to create/customize an annotation....................|neogen-annotation|
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@ Neogen provides those defaults, and you can change them to suit your needs
|
|||||||
<
|
<
|
||||||
Default configurations for a languages can be found in `lua/neogen/configurations/<your_language>.lua`
|
Default configurations for a languages can be found in `lua/neogen/configurations/<your_language>.lua`
|
||||||
|
|
||||||
- To know which snippet engines are supported, take a look at |snippet-integration|.
|
- To know which snippet engines are supported, take a look at |neogen-snippet-integration|.
|
||||||
Example: `snippet_engine = "luasnip"`
|
Example: `snippet_engine = "luasnip"`
|
||||||
|
|
||||||
|
|
||||||
@@ -171,7 +171,7 @@ Note: We will only document `major` and `minor` versions, not `patch` ones.
|
|||||||
- Improve godoc template (#75)
|
- Improve godoc template (#75)
|
||||||
## 2.3.0~
|
## 2.3.0~
|
||||||
- Added bundled support with snippet engines !
|
- Added bundled support with snippet engines !
|
||||||
Check out |snippet-integration| for basic setup
|
Check out |neogen-snippet-integration| for basic setup
|
||||||
## 2.2.0~
|
## 2.2.0~
|
||||||
### Python~
|
### Python~
|
||||||
- Add support for `*args` and `**kwargs`
|
- Add support for `*args` and `**kwargs`
|
||||||
@@ -189,7 +189,7 @@ Note: We will only document `major` and `minor` versions, not `patch` ones.
|
|||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*snippet-integration*
|
*neogen-snippet-integration*
|
||||||
`snippet`
|
`snippet`
|
||||||
|
|
||||||
To use a snippet engine, pass the option into neogen setup:
|
To use a snippet engine, pass the option into neogen setup:
|
||||||
@@ -202,6 +202,17 @@ To use a snippet engine, pass the option into neogen setup:
|
|||||||
Some snippet engines come out of the box bundled with neogen:
|
Some snippet engines come out of the box bundled with neogen:
|
||||||
- `"luasnip"` (https://github.com/L3MON4D3/LuaSnip)
|
- `"luasnip"` (https://github.com/L3MON4D3/LuaSnip)
|
||||||
|
|
||||||
|
# Add support for snippet engines~
|
||||||
|
|
||||||
|
To add support to a snippet engine, go to `lua/neogen/snippet.lua`.
|
||||||
|
There's a table called `snippet.engines` that holds functions that will be called
|
||||||
|
depending of the snippet engine
|
||||||
|
|
||||||
|
Those functions have this signature:
|
||||||
|
`snippet_engine_name = function (snip, pos)` where
|
||||||
|
- `snip` is a lsp styled snippet (in table format)
|
||||||
|
- `pos` is a { row , col } table for placing the snippet
|
||||||
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user