From b1fb04475e6fa0c44895cb6fe97b75816d74c297 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 3 Aug 2023 13:41:47 +0200 Subject: docs: remove "#" comment char in @return Everything after a "#" char is a "description" comment, i.e. luals won't treat it as a type, name, etc. But "#" should not be present in the generated docs (such as :help docs). https://github.com/LuaLS/lua-language-server/wiki/Annotations#return --- runtime/doc/develop.txt | 1 + runtime/doc/lua.txt | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt index 25f570e38a..b3f7d1fadc 100644 --- a/runtime/doc/develop.txt +++ b/runtime/doc/develop.txt @@ -226,6 +226,7 @@ Lua documentation lives in the source code, as docstrings on the function definitions. The |lua-vim| :help is generated from the docstrings. Docstring format: +- Use LuaLS annotations: https://github.com/LuaLS/lua-language-server/wiki/Annotations - Lines in the main description start with `---` - Special tokens start with `---@` followed by the token name: `---@see`, `---@param`, `---@returns` diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index b087156766..94a2c0d45e 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -1569,7 +1569,7 @@ vim.deprecate({name}, {alternative}, {version}, {plugin}, {backtrace}) • {backtrace} boolean|nil Prints backtrace. Defaults to true. Return: ~ - (string|nil) # Deprecated message, or nil if no message was shown. + (string|nil) Deprecated message, or nil if no message was shown. vim.inspect *vim.inspect()* Gets a human-readable representation of the given object. @@ -1693,7 +1693,7 @@ vim.print({...}) *vim.print()* < Return: ~ - any # given arguments. + any given arguments. See also: ~ • |vim.inspect()| @@ -2080,7 +2080,7 @@ vim.spairs({t}) *vim.spairs()* • {t} (table) Dict-like table Return: ~ - _ iterator over sorted keys and their values + iterator over sorted keys and their values See also: ~ • Based on https://github.com/premake/premake-core/blob/master/src/base/table.lua @@ -2545,8 +2545,8 @@ vim.ui.open({path}) *vim.ui.open()* • {path} (string) Path or URL to open Return (multiple): ~ - SystemCompleted|nil # Command result, or nil if not found. - (string|nil) # Error message on failure + SystemCompleted|nil Command result, or nil if not found. + (string|nil) Error message on failure See also: ~ • |vim.system()| -- cgit