aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorSteven Sojka <steelsojka@users.noreply.github.com>2021-03-30 08:18:24 -0500
committerGitHub <noreply@github.com>2021-03-30 08:18:24 -0500
commit6863f79118d3cb331fd4e726cdb2384bbd8bf8f2 (patch)
treec703b490f9c3e7e601e673704984b42f9edfe6ab /doc
parentFix jsdoc: play nice with the comment parser (#1108) (diff)
downloadnvim-treesitter-6863f79118d3cb331fd4e726cdb2384bbd8bf8f2.tar
nvim-treesitter-6863f79118d3cb331fd4e726cdb2384bbd8bf8f2.tar.gz
nvim-treesitter-6863f79118d3cb331fd4e726cdb2384bbd8bf8f2.tar.bz2
nvim-treesitter-6863f79118d3cb331fd4e726cdb2384bbd8bf8f2.tar.lz
nvim-treesitter-6863f79118d3cb331fd4e726cdb2384bbd8bf8f2.tar.xz
nvim-treesitter-6863f79118d3cb331fd4e726cdb2384bbd8bf8f2.tar.zst
nvim-treesitter-6863f79118d3cb331fd4e726cdb2384bbd8bf8f2.zip
refactor(all): language tree adaption (#1105)
Diffstat (limited to 'doc')
-rw-r--r--doc/nvim-treesitter.txt10
1 files changed, 7 insertions, 3 deletions
diff --git a/doc/nvim-treesitter.txt b/doc/nvim-treesitter.txt
index 3d084e5e6..4bc47bff7 100644
--- a/doc/nvim-treesitter.txt
+++ b/doc/nvim-treesitter.txt
@@ -333,12 +333,16 @@ Swaps the nodes or ranges.
set `cursor_to_second` to true to move the cursor to the second node
*ts_utils.memoize_by_buf_tick*
-memoize_by_buf_tick(fn)~
+memoize_by_buf_tick(fn, options)~
-Cache values by bufnr tick change
+Caches the return value for a function and returns the cache value if the tick
+of the buffer has not changed from the previous.
- `fn`: a function that takes a bufnr as argument
+ `fn`: a function that takes any arguments
and returns a value to store.
+ `options?`: <table>
+ - `bufnr`: a function/value that extracts the bufnr from the given arguments.
+ - `key`: a function/value that extracts the cache key from the given arguments.
`returns`: a function to call with bufnr as argument to
retrieve the value from the cache