From fd69b7111912ae5ccb01327b130f582be23e44dc Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 12 Feb 2026 07:15:20 -0500 Subject: refactor(lsp): drop once(), use _memoize() #37829 --- runtime/lua/vim/func.lua | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'runtime/lua/vim/func.lua') diff --git a/runtime/lua/vim/func.lua b/runtime/lua/vim/func.lua index 47067ec4b9..654f2e6299 100644 --- a/runtime/lua/vim/func.lua +++ b/runtime/lua/vim/func.lua @@ -24,13 +24,10 @@ local M = {} --- @generic F: function --- @param hash integer|string|function Hash function to create a hash to use as a key to --- store results. Possible values: ---- - When integer, refers to the index of an argument of {fn} to hash. ---- This argument can have any type. +--- - When integer, refers to the index of a {fn} argument (of any type) to hash. --- - When function, is evaluated using the same arguments passed to {fn}. ---- - When `concat`, the hash is determined by string concatenating all the ---- arguments passed to {fn}. ---- - When `concat-n`, the hash is determined by string concatenating the ---- first n arguments passed to {fn}. +--- - When "concat", hash is determined by string-concatenating all {fn} arguments. +--- - When "concat-n", hash is determined by string-concatenating the first n {fn} arguments. --- --- @param fn F Function to memoize. --- @param weak? boolean Use a weak table (default `true`) -- cgit