Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
176420f
implement optional argnodes.
L3MON4D3 Dec 28, 2023
bd09791
implement subtree_do, invokes callbacks on tree of nodes (in a snippet).
L3MON4D3 Mar 4, 2024
5fdf9d8
make resolve_position work for static snippets.
L3MON4D3 Mar 4, 2024
aa1b233
fix: make root_path work for snippets.
L3MON4D3 Mar 4, 2024
b5d2a34
implement subtree_leave_entered, for leaving only entered nodes.
L3MON4D3 May 5, 2025
b1f3492
overhaul snippet-updates.
L3MON4D3 Nov 3, 2025
b419d9a
make sure visible is set on -1-node.
L3MON4D3 Mar 10, 2024
83c7649
propery remove child-snippets when `:exit`ing.
L3MON4D3 Apr 23, 2024
61bf611
exitNode: use same update_dependents as all other nodes.
L3MON4D3 Apr 23, 2024
c295b3f
update after snip_expand.
L3MON4D3 Oct 14, 2025
719d55c
Format with stylua
L3MON4D3 Oct 14, 2025
09217d6
Make insertNode correctly handle static_text if it's a snippetString.
L3MON4D3 Oct 28, 2024
3be6031
allow using snippet_string as dynamicNode-args.
L3MON4D3 Oct 28, 2024
a35adb8
restoreNode,insertNode: propagate store.
L3MON4D3 Oct 29, 2024
d4abde8
dynamicNode.update: store snippet before evaluating fn.
L3MON4D3 Oct 29, 2024
4ca232e
dynamicNode.update: copy extmarks after focusing.
L3MON4D3 Oct 29, 2024
3225dd1
dynamicNode.update: do update_restore instead of update.
L3MON4D3 Oct 29, 2024
45df41e
restoreNode: don't store on exit, store should have been called before.
L3MON4D3 Oct 29, 2024
888ac5e
add some tests for new restoreNode-behaviour.
L3MON4D3 Oct 29, 2024
722251d
choiceNode: correctly refocus when current_node is in another snippet.
L3MON4D3 Oct 29, 2024
7d8140c
we don't want to go into adjacent snippetNodes, but land between them.
L3MON4D3 Oct 29, 2024
5441143
snippet: correctly propagate exit to child_snippets (and clear them).
L3MON4D3 Oct 29, 2024
b63fb1f
add another test for the new restoreNode.
L3MON4D3 Oct 29, 2024
d4b8110
store content of nested snippets before capturing argnode.
L3MON4D3 Oct 29, 2024
508cc3f
make sure marks are invalidated even for nested snippets.
L3MON4D3 Oct 29, 2024
d40fc8a
get_args: `store` only when calling in static mode.
L3MON4D3 Oct 29, 2024
5192bf9
snippetstring: store strings as \n-separated string.
L3MON4D3 Oct 14, 2025
87ad057
small refactor.
L3MON4D3 Oct 30, 2024
fc7e586
implement a few simple string-operations on snippetString.
L3MON4D3 Oct 30, 2024
c5cfc00
fix flakiness in test.
L3MON4D3 Oct 30, 2024
3f7ce76
update: try to find new active node in child-snippet.
L3MON4D3 Oct 30, 2024
befdc53
allow replacing parts of a snippetString with other text.
L3MON4D3 Nov 2, 2024
6ee05ef
implement gsub on snippetString.
L3MON4D3 Nov 2, 2024
de371f5
snippetstring.replace: fix substitution in textNode.
L3MON4D3 Nov 2, 2024
7c34402
fix switchup.
L3MON4D3 Nov 2, 2024
b9313e2
make in-place modifying functions private.
L3MON4D3 Nov 2, 2024
80be0c4
add :sub to snippetString.
L3MON4D3 Nov 2, 2024
bea1bb7
add `opt` for the optional argument.
L3MON4D3 Nov 3, 2024
5f476e4
correctly store+restore visual selection during update.
L3MON4D3 Nov 3, 2024
24edd78
fNode: always store result in static_text.
L3MON4D3 Nov 4, 2024
4d25da0
update_dependents: get cursor-position after queried movements.
L3MON4D3 Nov 4, 2024
25ef218
move the jump_active-check into the autocommand.
L3MON4D3 Oct 14, 2025
79b336c
optionally update a node differnt from the current node.
L3MON4D3 Oct 14, 2025
e0ee698
update_dependents: use update_restore by default.
L3MON4D3 Nov 4, 2024
79722c5
choiceNode: call update_dependents after routine is done completely.
L3MON4D3 Nov 4, 2024
67b99dc
move no_region_wrap back into main-module.
L3MON4D3 Oct 14, 2025
fcfb058
dynamicNode/restoreNode: don't destroy snip on exit.
L3MON4D3 Nov 4, 2024
5123fde
handle selection on first line and column of buffer with `before`.
L3MON4D3 Nov 4, 2024
ad85601
document imperfect behaviour asserted by test.
L3MON4D3 Nov 4, 2024
482f0bf
export optional_arg as opt for tests.
L3MON4D3 Nov 4, 2024
d96028f
set jump_active=false ASAP.
L3MON4D3 Nov 4, 2024
28c1300
choiceNode: explicitly set parent and pos for choices.
L3MON4D3 Nov 6, 2024
a8e340c
fix(dynamicNode): don't access .snip in update_static.
L3MON4D3 Nov 6, 2024
98ed158
dynamicNode: optionally use .snip to generate docstring.
L3MON4D3 Nov 6, 2024
acec69f
enqueue cursor-movement due to update in typeahead.
L3MON4D3 Nov 6, 2024
2c5300f
get_args: do (static_)visible-check in get_args, not get_static_text.
L3MON4D3 Nov 6, 2024
d69df12
test docstring-generation with self-dependent dynamicNode.
L3MON4D3 Nov 6, 2024
24b925e
properly restore cursor-position in set_choice.
L3MON4D3 Nov 7, 2024
d3a7709
change_choice: use cursor-restore system from update_dependents.
L3MON4D3 Oct 14, 2025
37b963a
snippet_string: add metadata and marks.
L3MON4D3 Nov 13, 2024
eed721c
store cursor-position in snippetString to more accurately restore it.
L3MON4D3 Oct 14, 2025
6bef3b3
api_enter: only log an error when called recursively.
L3MON4D3 Nov 14, 2024
77c5de4
feedkeys: ignore errors on asynchronous nvim_win_set_cursor.
L3MON4D3 Nov 14, 2024
4be52be
correctly restore self-dependent dynamicNode.
L3MON4D3 Nov 14, 2024
26d21ae
change/set/select_choice: update current node before modifying choice.
L3MON4D3 Oct 14, 2025
29c1ee2
add a few tests for previous changes.
L3MON4D3 Nov 14, 2024
a4dd915
Format with stylua
L3MON4D3 Oct 14, 2025
dcdf2ae
fix: pass correct arguments to str_byteindex.
L3MON4D3 May 5, 2025
02fd641
fix: handle unicode->snippetstring->unicode conversion correctly.
L3MON4D3 May 5, 2025
38c55fe
add a few annotations.
L3MON4D3 Oct 14, 2025
9e1d258
feedkeys: only clear action after its confirm is called.
L3MON4D3 May 16, 2025
b525bd3
store: check that child-snip has valid extmarks before storing.
L3MON4D3 Jun 3, 2025
ab81681
improve logging of dynamicNode.
L3MON4D3 Oct 19, 2025
5c2225e
dynamicNode: limit number of nested updates.
L3MON4D3 Oct 19, 2025
42fdd36
rip out update_depth again.
L3MON4D3 Oct 19, 2025
f5bd74d
add brief documentation for new features.
L3MON4D3 Nov 2, 2025
31c9e2b
Format with stylua
L3MON4D3 Nov 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
api_enter: only log an error when called recursively.
  • Loading branch information
L3MON4D3 committed Nov 3, 2025
commit 6bef3b39997b575e6c1f024e2823f61538d5b9fe
9 changes: 8 additions & 1 deletion lua/luasnip/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,14 @@ end
local luasnip_changedtick = 0
local function api_enter()
session.jump_active = true
assert(session.luasnip_changedtick == nil)
if session.luasnip_changedtick ~= nil then
log.error([[
api_enter called while luasnip_changedtick was non-nil. This
may be to a previous error, or due to unexpected control-flow. Check the
traceback and consider reporting this. Traceback: %s
]], debug.traceback())

end
session.luasnip_changedtick = luasnip_changedtick
luasnip_changedtick = luasnip_changedtick + 1
end
Expand Down