aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/loader.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2023-06-22 03:44:51 -0700
committerGitHub <noreply@github.com>2023-06-22 03:44:51 -0700
commit4e6356559c8cd44dbcaa765d1f39e176064526ec (patch)
tree84354e7d3c5a49b7edbc314da2e2b834d275d42c /runtime/lua/vim/loader.lua
parentf4f1ce1d167c557e54153f74cf0f55245b8fd414 (diff)
downloadrneovim-4e6356559c8cd44dbcaa765d1f39e176064526ec.tar.gz
rneovim-4e6356559c8cd44dbcaa765d1f39e176064526ec.tar.bz2
rneovim-4e6356559c8cd44dbcaa765d1f39e176064526ec.zip
test: spellcheck :help (vimdoc) files #24109
Enforce consistent terminology (defined in `gen_help_html.lua:spell_dict`) for common misspellings. This does not spellcheck English in general (perhaps a future TODO, though it may be noisy).
Diffstat (limited to 'runtime/lua/vim/loader.lua')
-rw-r--r--runtime/lua/vim/loader.lua22
1 files changed, 11 insertions, 11 deletions
diff --git a/runtime/lua/vim/loader.lua b/runtime/lua/vim/loader.lua
index 9024bdb231..f340dc85b5 100644
--- a/runtime/lua/vim/loader.lua
+++ b/runtime/lua/vim/loader.lua
@@ -161,7 +161,7 @@ function Loader.read(name)
end
end
---- The `package.loaders` loader for lua files using the cache.
+--- The `package.loaders` loader for Lua files using the cache.
---@param modname string module name
---@return string|function
---@private
@@ -211,7 +211,7 @@ end
---@private
-- luacheck: ignore 312
function Loader.loadfile(filename, mode, env)
- -- ignore mode, since we byte-compile the lua source files
+ -- ignore mode, since we byte-compile the Lua source files
mode = nil
return Loader.load(normalize(filename), { mode = mode, env = env })
end
@@ -268,7 +268,7 @@ function Loader.load(modpath, opts)
return chunk, err
end
---- Finds lua modules for the given module name.
+--- Finds Lua modules for the given module name.
---@param modname string Module name, or `"*"` to find the top-level modules instead
---@param opts? ModuleFindOpts (table|nil) Options for finding a module:
--- - rtp: (boolean) Search for modname in the runtime path (defaults to `true`)
@@ -289,7 +289,7 @@ function M.find(modname, opts)
local idx = modname:find('.', 1, true)
-- HACK: fix incorrect require statements. Really not a fan of keeping this,
- -- but apparently the regular lua loader also allows this
+ -- but apparently the regular Lua loader also allows this
if idx == 1 then
modname = modname:gsub('^%.+', '')
basename = modname:gsub('%.', '/')
@@ -386,9 +386,9 @@ end
--- Enables the experimental Lua module loader:
--- * overrides loadfile
---- * adds the lua loader using the byte-compilation cache
+--- * adds the Lua loader using the byte-compilation cache
--- * adds the libs loader
---- * removes the default Neovim loader
+--- * removes the default Nvim loader
function M.enable()
if M.enabled then
return
@@ -396,11 +396,11 @@ function M.enable()
M.enabled = true
vim.fn.mkdir(vim.fn.fnamemodify(M.path, ':p'), 'p')
_G.loadfile = Loader.loadfile
- -- add lua loader
+ -- add Lua loader
table.insert(loaders, 2, Loader.loader)
-- add libs loader
table.insert(loaders, 3, Loader.loader_lib)
- -- remove Neovim loader
+ -- remove Nvim loader
for l, loader in ipairs(loaders) do
if loader == vim._load_package then
table.remove(loaders, l)
@@ -411,7 +411,7 @@ end
--- Disables the experimental Lua module loader:
--- * removes the loaders
---- * adds the default Neovim loader
+--- * adds the default Nvim loader
function M.disable()
if not M.enabled then
return
@@ -426,8 +426,8 @@ function M.disable()
table.insert(loaders, 2, vim._load_package)
end
---- Return the top-level `/lua/*` modules for this path
----@param path string path to check for top-level lua modules
+--- Return the top-level \`/lua/*` modules for this path
+---@param path string path to check for top-level Lua modules
---@private
function Loader.lsmod(path)
if not Loader._indexed[path] then