Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased
<!-- Add all new changes here. They will be moved under a version at release -->
* `FIX` incorrect argument skip pattern for `--check_out_path=`, which incorrectly skips the next argument
* `FIX` reimplement section `luals.config` in file doc.json
* `FIX` incorrect file names in file doc.json
* `FIX` remove extra `./` path prefix in the check report when using `--check=.`

Expand Down
18 changes: 11 additions & 7 deletions script/cli/doc/export.lua
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,6 @@ export.makeDocObject['local'] = function(source, obj, has_seen)
obj.name = source[1]
end

export.makeDocObject['luals.config'] = function(source, obj, has_seen)

end

export.makeDocObject['self'] = export.makeDocObject['local']

export.makeDocObject['setfield'] = export.makeDocObject['doc.class']
Expand Down Expand Up @@ -287,17 +283,25 @@ end
---@param callback fun(i, max)
function export.makeDocs(globals, callback)
local docs = {}

for i, global in ipairs(globals) do
table.insert(docs, export.documentObject(global))
callback(i, #globals)
end

docs[#docs+1] = export.getLualsConfig()
table.sort(docs, export.sortDoc)

return docs
end

function export.getLualsConfig()
return {
name = 'LuaLS',
type = 'luals.config',
DOC = fs.canonical(fs.path(DOC)):string(),
defines = {},
fields = {}
}
end

---takes the table from `makeDocs`, serializes it, and exports it
---@async
---@param docs table
Expand Down