aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/loader.lua
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2023-07-18 15:42:30 +0100
committerGitHub <noreply@github.com>2023-07-18 15:42:30 +0100
commitbe74807eef13ff8c90d55cf8b22b01d6d33b1641 (patch)
tree9f7e1cebdb2677057b066df9fea91bce86b4ab6a /runtime/lua/vim/loader.lua
parentd0ae529861594b2e89a436ed2cfb3d2243f8bfcc (diff)
downloadrneovim-be74807eef13ff8c90d55cf8b22b01d6d33b1641.tar.gz
rneovim-be74807eef13ff8c90d55cf8b22b01d6d33b1641.tar.bz2
rneovim-be74807eef13ff8c90d55cf8b22b01d6d33b1641.zip
docs(lua): more improvements (#24387)
* docs(lua): teach lua2dox how to table * docs(lua): teach gen_vimdoc.py about local functions No more need to mark local functions with @private * docs(lua): mention @nodoc and @meta in dev-lua-doc * fixup! Co-authored-by: Justin M. Keyes <justinkz@gmail.com> --------- Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
Diffstat (limited to 'runtime/lua/vim/loader.lua')
-rw-r--r--runtime/lua/vim/loader.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/runtime/lua/vim/loader.lua b/runtime/lua/vim/loader.lua
index f340dc85b5..4f4722b0c3 100644
--- a/runtime/lua/vim/loader.lua
+++ b/runtime/lua/vim/loader.lua
@@ -21,7 +21,10 @@ local M = {}
---@alias LoaderStats table<string, {total:number, time:number, [string]:number?}?>
+---@nodoc
M.path = vim.fn.stdpath('cache') .. '/luac'
+
+---@nodoc
M.enabled = false
---@class Loader
@@ -58,7 +61,6 @@ function Loader.get_hash(path)
return Loader._hashes[path]
end
----@private
local function normalize(path)
return vim.fs.normalize(path, { expand_env = false })
end
@@ -122,7 +124,6 @@ end
--- @param path string
--- @param mode integer
--- @return string? data
---- @private
local function readfile(path, mode)
local f = uv.fs_open(path, 'r', mode)
if f then
@@ -310,7 +311,6 @@ function M.find(modname, opts)
local results = {}
-- Only continue if we haven't found anything yet or we want to find all
- ---@private
local function continue()
return #results == 0 or opts.all
end
@@ -318,7 +318,6 @@ function M.find(modname, opts)
-- Checks if the given paths contain the top-level module.
-- If so, it tries to find the module path for the given module name.
---@param paths string[]
- ---@private
local function _find(paths)
for _, path in ipairs(paths) do
if topmod == '*' then
@@ -504,7 +503,6 @@ end
---@private
function M._inspect(opts)
if opts and opts.print then
- ---@private
local function ms(nsec)
return math.floor(nsec / 1e6 * 1000 + 0.5) / 1000 .. 'ms'
end