@@ -8,6 +8,8 @@ local getLabel = require 'core.hover.label'
88local jsonb = require ' json-beautify'
99local util = require ' utility'
1010local markdown = require ' provider.markdown'
11+ local fs = require ' bee.filesystem'
12+ local furi = require ' file-uri'
1113
1214--- @alias doctype
1315--- | ' doc.alias'
@@ -214,10 +216,6 @@ export.makeDocObject['local'] = function(source, obj, has_seen)
214216 obj .name = source [1 ]
215217end
216218
217- export .makeDocObject [' luals.config' ] = function (source , obj , has_seen )
218-
219- end
220-
221219export .makeDocObject [' self' ] = export .makeDocObject [' local' ]
222220
223221export .makeDocObject [' setfield' ] = export .makeDocObject [' doc.class' ]
@@ -284,17 +282,25 @@ end
284282--- @param callback fun ( i , max )
285283function export .makeDocs (globals , callback )
286284 local docs = {}
287-
288285 for i , global in ipairs (globals ) do
289286 table.insert (docs , export .documentObject (global ))
290287 callback (i , # globals )
291288 end
292-
289+ docs [ # docs + 1 ] = export . getLualsConfig ()
293290 table.sort (docs , export .sortDoc )
294-
295291 return docs
296292end
297293
294+ function export .getLualsConfig ()
295+ return {
296+ name = ' LuaLS' ,
297+ type = ' luals.config' ,
298+ DOC = fs .absolute (fs .path (DOC )):string (),
299+ defines = {},
300+ fields = {}
301+ }
302+ end
303+
298304--- takes the table from `makeDocs`, serializes it, and exports it
299305--- @async
300306--- @param docs table
0 commit comments