aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/shared.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2023-08-03 06:14:15 -0700
committerGitHub <noreply@github.com>2023-08-03 06:14:15 -0700
commit4d859d00d13893815b6072a7bf2022dd89d5e3f8 (patch)
treee536f6b205d59ffac0444990c4e60b0cb3398a27 /runtime/lua/vim/shared.lua
parentf1772272b4fda43c093fc495f54b5e7c11968d62 (diff)
parentb1fb04475e6fa0c44895cb6fe97b75816d74c297 (diff)
downloadrneovim-4d859d00d13893815b6072a7bf2022dd89d5e3f8.tar.gz
rneovim-4d859d00d13893815b6072a7bf2022dd89d5e3f8.tar.bz2
rneovim-4d859d00d13893815b6072a7bf2022dd89d5e3f8.zip
Merge #24351 docs
Diffstat (limited to 'runtime/lua/vim/shared.lua')
-rw-r--r--runtime/lua/vim/shared.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/runtime/lua/vim/shared.lua b/runtime/lua/vim/shared.lua
index 291b003d87..5ce5b200d3 100644
--- a/runtime/lua/vim/shared.lua
+++ b/runtime/lua/vim/shared.lua
@@ -60,7 +60,8 @@ function vim.deepcopy(orig)
return deepcopy(orig)
end
---- Splits a string at each instance of a separator.
+--- Gets an |iterator| that splits a string at each instance of a separator, in "lazy" fashion
+--- (as opposed to |vim.split()| which is "eager").
---
--- Example:
--- <pre>lua
@@ -159,7 +160,8 @@ function vim.gsplit(s, sep, opts)
end
end
---- Splits a string at each instance of a separator.
+--- Splits a string at each instance of a separator and returns the result as a table (unlike
+--- |vim.gsplit()|).
---
--- Examples:
--- <pre>lua
@@ -530,8 +532,8 @@ end
---
---@see Based on https://github.com/premake/premake-core/blob/master/src/base/table.lua
---
----@param t table List-like table
----@return iterator over sorted keys and their values
+---@param t table Dict-like table
+---@return # iterator over sorted keys and their values
function vim.spairs(t)
assert(type(t) == 'table', string.format('Expected table, got %s', type(t)))