mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
docs: make Lua docstrings consistent #15255
The official developer documentation in in :h dev-lua-doc specifies to use "--@" for special/magic tokens. However, this format is not consistent with EmmyLua notation (used by some Lua language servers) nor with the C version of the magic docstring tokens which use three comment characters. Further, the code base is currently split between usage of "--@", "---@", and "--- @". In an effort to remain consistent, change all Lua magic tokens to use "---@" and update the developer documentation accordingly.
This commit is contained in:
@@ -422,7 +422,7 @@ end
|
||||
|
||||
-- Builds an argument list for use in clear().
|
||||
--
|
||||
--@see clear() for parameters.
|
||||
---@see clear() for parameters.
|
||||
function module.new_argv(...)
|
||||
local args = {unpack(module.nvim_argv)}
|
||||
table.insert(args, '--headless')
|
||||
@@ -573,7 +573,7 @@ function module.buf_lines(bufnr)
|
||||
return module.exec_lua("return vim.api.nvim_buf_get_lines((...), 0, -1, false)", bufnr)
|
||||
end
|
||||
|
||||
--@see buf_lines()
|
||||
---@see buf_lines()
|
||||
function module.curbuf_contents()
|
||||
module.poke_eventloop() -- Before inspecting the buffer, do whatever.
|
||||
return table.concat(module.curbuf('get_lines', 0, -1, true), '\n')
|
||||
|
Reference in New Issue
Block a user