Repository navigation
Closed
Description
How are you using the lua-language-server?
Command Line
Which OS are you using?
Linux
What is the issue affecting?
Annotations
Expected Behaviour
When exporting docs with lua-language-server --doc, function-level tags like @nodiscard should be included in the generated doc.json.
Actual Behaviour
Function-level tags like @nodiscard are missing from the generated doc.json.
Reproduction steps
-
Create a Lua file, e.g.,
Set.lua, with a function using@nodiscard:---@class Set local Set = {} ---Return true if the set has no elements ---@return boolean ---@nodiscard function Set:isempty() end
-
Run
lua-language-server --doc Set.luain the project directory. -
Open the generated
doc.json. -
Observe that the
@nodiscardtag is not included.
Additional Notes
// doc.json
[
// ...
{
// ...
"fields": [
{
"async": false,
"deprecated": false,
"desc": "Return true if the set has no elements",
"extends": {
"args": [
{
"finish": [6, 8],
"name": "self",
"start": [6, 8],
"type": "self",
"view": "Set"
}
],
"desc": "Return true if the set has no elements",
"finish": [6, 26],
"rawdesc": "Return true if the set has no elements",
"returns": [
{
"type": "function.return",
"view": "boolean"
}
],
"start": [6, 0],
"type": "function",
"view": "(method) Set:isempty()\n -> boolean"
},
"file": ".",
"finish": [6, 20],
"name": "isempty",
"rawdesc": "Return true if the set has no elements",
"start": [6, 9],
"type": "setmethod",
"view": "function",
"visible": "public"
}
],
"name": "Set",
"type": "type",
"view": "Set"
}
]Log File
No response
Metadata
Metadata
Assignees
Labels
No labels
Activity
haithium commentedon Feb 20, 2026
no longer needed