Skip to content

Commit

Permalink
Auto generate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
L3MON4D3 authored and github-actions[bot] committed Dec 31, 2023
1 parent e31c33d commit 8ae1ded
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion doc/luasnip.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*luasnip.txt* For NVIM v0.8.0 Last change: 2023 December 27
*luasnip.txt* For NVIM v0.8.0 Last change: 2023 December 31

==============================================================================
Table of Contents *luasnip-table-of-contents*
Expand Down Expand Up @@ -2805,6 +2805,23 @@ Load via
<


RELOADING WHEN EDITING REQUIRE’D FILES ~

While the lua-snippet-files will be reloaded on edit, this does not
automatically happen if a file the snippet-file depends on (eg. via `require`)
is changed. Since this still may still be desirable, there are two functions
exposed when a file is loaded by the lua-loader: `ls_tracked_dofile` and
`ls_tracked_dopackage`. They perform like `dofile` and (almost like) `require`,
but both register the loaded file internally as a dependency of the
snippet-file, so it can be reloaded when the loaded file is edited. As stated,
`ls_tracked_dofile` behaves exactly like `dofile`, but does the dependency-work
as well. `ls_tracked_dopackage` mimics `require` in that it does not take a
path, but a module-name like `"luasnip.loaders.from_lua"`, and then searches
the `runtimepath/lua`-directories, and path and cpath for the module. Unlike
`require`, the file will not be cached, since that would complicate the
reload-on-edit-behaviour.


EDIT_SNIPPETS *luasnip-loaders-edit_snippets*

To easily edit snippets for the current session, the files loaded by any loader
Expand Down

0 comments on commit 8ae1ded

Please sign in to comment.