Skip to content

Commit

Permalink
make capture-env-vars match others provided by luasnip.
Browse files Browse the repository at this point in the history
prefixed with "LS_", all uppercase.
  • Loading branch information
L3MON4D3 committed Sep 11, 2023
1 parent efd1a17 commit 0984b18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/luasnip/extras/treesitter_postfix.lua
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ local function generate_resolve_expand_param(match_tsnode, user_resolver)
local env = {}
env.POSTFIX_MATCH = ts_parser:get_node_text(prefix_node)
for capture_name, node in pairs(best_match) do
env["TS_CAPTURE_" .. capture_name] = ts_parser:get_node_text(node)
env["LS_CAPTURE_" .. capture_name:upper()] = ts_parser:get_node_text(node)
end

local ret = {
Expand Down

0 comments on commit 0984b18

Please sign in to comment.