fix(luasnip) Do not remove snippet indent (#110)

* Breaking change fix in luasnip `parse_snippet`
Co-authored-by: Agustin Romero <agustin.romero@mercadolibre.com>
This commit is contained in:
Elkiders99
2022-09-22 05:26:06 -03:00
committed by GitHub
parent c5a0c39753
commit c53bc48033
2 changed files with 4 additions and 3 deletions

View File

@@ -239,7 +239,7 @@ end
---@eval return MiniDoc.afterlines_to_code(MiniDoc.current.eval_section) ---@eval return MiniDoc.afterlines_to_code(MiniDoc.current.eval_section)
---@text # Changelog~ ---@text # Changelog~
--- ---
--- Note: We will only document `major` and `minor` versions, not `patch` ones. --- Note: We will only document `major` and `minor` versions, not `patch` ones. (only X and Y in X.Y.z)
--- ---
--- ## 2.8.0~ --- ## 2.8.0~
--- - Specify annotation convention on `generate()` method (see |neogen.generate()|) --- - Specify annotation convention on `generate()` method (see |neogen.generate()|)
@@ -280,7 +280,7 @@ end
--- with multiple annotation conventions. --- with multiple annotation conventions.
---@tag neogen-changelog ---@tag neogen-changelog
---@toc_entry Changes in neogen plugin ---@toc_entry Changes in neogen plugin
neogen.version = "2.8.0" neogen.version = "2.8.1"
--minidoc_afterlines_end --minidoc_afterlines_end
return neogen return neogen

View File

@@ -79,7 +79,8 @@ snippet.engines.luasnip = function(snip, pos)
local _snip = table.concat(snip, "\n") local _snip = table.concat(snip, "\n")
ls.snip_expand( ls.snip_expand(
ls.s("", ls.parser.parse_snippet(nil, _snip), {
ls.s("", ls.parser.parse_snippet(nil, _snip,{trim_empty = false, dedent = false}), {
child_ext_opts = { child_ext_opts = {
-- for highlighting the placeholders -- for highlighting the placeholders