doc: Add doc to support new snippet engines
This commit is contained in:
@@ -98,7 +98,7 @@ end
|
|||||||
--- <
|
--- <
|
||||||
--- 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"`
|
||||||
---
|
---
|
||||||
---@toc_entry Configure the setup
|
---@toc_entry Configure the setup
|
||||||
@@ -222,7 +222,7 @@ end
|
|||||||
--- - 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`
|
||||||
|
|||||||
@@ -10,7 +10,18 @@ local notify = require("neogen.utilities.helpers").notify
|
|||||||
--- <
|
--- <
|
||||||
--- 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)
|
||||||
---@tag snippet-integration
|
---
|
||||||
|
--- # 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
|
||||||
|
---@tag neogen-snippet-integration
|
||||||
---@toc_entry Use popular snippet engines
|
---@toc_entry Use popular snippet engines
|
||||||
local snippet = {}
|
local snippet = {}
|
||||||
snippet.engines = {}
|
snippet.engines = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user