From be74807eef13ff8c90d55cf8b22b01d6d33b1641 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Tue, 18 Jul 2023 15:42:30 +0100 Subject: 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 --------- Co-authored-by: Justin M. Keyes --- runtime/lua/vim/loader.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'runtime/lua/vim/loader.lua') 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 +---@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 -- cgit