aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2025-03-18 06:18:37 -0700
committerGitHub <noreply@github.com>2025-03-18 06:18:37 -0700
commit7333c39e6cc78786289d88c65fbe10e4ce78992b (patch)
treeaf0deb9a02b82c19e6bf89e2b5bc8fb9123dd5d5 /runtime/lua/vim
parent29a47b39ccd0317e815632439966f0f1343d96cf (diff)
downloadrneovim-7333c39e6cc78786289d88c65fbe10e4ce78992b.tar.gz
rneovim-7333c39e6cc78786289d88c65fbe10e4ce78992b.tar.bz2
rneovim-7333c39e6cc78786289d88c65fbe10e4ce78992b.zip
docs: misc #32959
Diffstat (limited to 'runtime/lua/vim')
-rw-r--r--runtime/lua/vim/_editor.lua2
-rw-r--r--runtime/lua/vim/_meta/api.lua20
-rw-r--r--runtime/lua/vim/_meta/vvars.lua5
3 files changed, 14 insertions, 13 deletions
diff --git a/runtime/lua/vim/_editor.lua b/runtime/lua/vim/_editor.lua
index e29d8f1c30..c9b8e68c10 100644
--- a/runtime/lua/vim/_editor.lua
+++ b/runtime/lua/vim/_editor.lua
@@ -8,7 +8,7 @@
-- - "opt-in": runtime/pack/dist/opt/
-- 2. runtime/lua/vim/ (the runtime): Lazy-loaded modules. Examples: `inspect`, `lpeg`.
-- 3. runtime/lua/vim/shared.lua: pure Lua functions which always are available. Used in the test
--- runner, as well as worker threads and processes launched from Nvim.
+-- runner, and worker threads/processes launched from Nvim.
-- 4. runtime/lua/vim/_editor.lua: Eager-loaded code which directly interacts with the Nvim
-- editor state. Only available in the main thread.
--
diff --git a/runtime/lua/vim/_meta/api.lua b/runtime/lua/vim/_meta/api.lua
index ece3c1854b..2c1fb260b2 100644
--- a/runtime/lua/vim/_meta/api.lua
+++ b/runtime/lua/vim/_meta/api.lua
@@ -885,7 +885,7 @@ function vim.api.nvim_command_output(command) end
--- To get an existing group id, do:
---
--- ```lua
---- local id = vim.api.nvim_create_augroup("MyGroup", {
+--- local id = vim.api.nvim_create_augroup('my.lsp.config', {
--- clear = false
--- })
--- ```
@@ -904,8 +904,8 @@ function vim.api.nvim_create_augroup(name, opts) end
--- Example using Lua callback:
---
--- ```lua
---- vim.api.nvim_create_autocmd({"BufEnter", "BufWinEnter"}, {
---- pattern = {"*.c", "*.h"},
+--- vim.api.nvim_create_autocmd({'BufEnter', 'BufWinEnter'}, {
+--- pattern = {'*.c', '*.h'},
--- callback = function(ev)
--- print(string.format('event fired: %s', vim.inspect(ev)))
--- end
@@ -915,8 +915,8 @@ function vim.api.nvim_create_augroup(name, opts) end
--- Example using an Ex command as the handler:
---
--- ```lua
---- vim.api.nvim_create_autocmd({"BufEnter", "BufWinEnter"}, {
---- pattern = {"*.c", "*.h"},
+--- vim.api.nvim_create_autocmd({'BufEnter', 'BufWinEnter'}, {
+--- pattern = {'*.c', '*.h'},
--- command = "echo 'Entering a C or C++ file'",
--- })
--- ```
@@ -925,7 +925,7 @@ function vim.api.nvim_create_augroup(name, opts) end
--- and "~" must be expanded explicitly:
---
--- ```lua
---- pattern = vim.fn.expand("~") .. "/some/path/*.py"
+--- pattern = vim.fn.expand('~') .. '/some/path/*.py'
--- ```
---
--- @see `:help autocommand`
@@ -1222,14 +1222,14 @@ function vim.api.nvim_get_all_options_info() end
--- ```lua
--- -- Matches all criteria
--- autocommands = vim.api.nvim_get_autocmds({
---- group = "MyGroup",
---- event = {"BufEnter", "BufWinEnter"},
---- pattern = {"*.c", "*.h"}
+--- group = 'MyGroup',
+--- event = {'BufEnter', 'BufWinEnter'},
+--- pattern = {'*.c', '*.h'}
--- })
---
--- -- All commands from one group
--- autocommands = vim.api.nvim_get_autocmds({
---- group = "MyGroup",
+--- group = 'MyGroup',
--- })
--- ```
---
diff --git a/runtime/lua/vim/_meta/vvars.lua b/runtime/lua/vim/_meta/vvars.lua
index 9df5a0b5f2..25e504a612 100644
--- a/runtime/lua/vim/_meta/vvars.lua
+++ b/runtime/lua/vim/_meta/vvars.lua
@@ -586,8 +586,9 @@ vim.v.searchforward = ...
--- Read-only.
---
--- *$NVIM*
---- $NVIM is set by `terminal` and `jobstart()`, and is thus
---- a hint that the current environment is a subprocess of Nvim.
+--- $NVIM is set to v:servername by `terminal` and `jobstart()`,
+--- and is thus a hint that the current environment is a child
+--- (direct subprocess) of Nvim.
---
--- Example: a child Nvim process can detect and make requests to
--- its parent Nvim: