-
Hi, I'm trying to make a snippet for a Lua module. However, I'm not sure how to repeat the highlighted node with index 1 from the previous / upper level (not in the same curly brace). Is there a way I can achieve this? |
Beta Was this translation helpful? Give feedback.
Answered by
L3MON4D3
Aug 17, 2022
Replies: 1 comment 7 replies
-
Uhh nice, a usecase for |
Beta Was this translation helpful? Give feedback.
7 replies
Answer selected by
axieax
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uhh nice, a usecase for
absolute_indexer
:DPassing (with
local ai = require("luasnip.nodes.absolute_indexer")
)ai[1]
instead of1
should do the trick.Check in DOC.md or
:h luasnip-absolute_indexer
for more info