Skip to content
Open
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 @@ -2,6 +2,7 @@

## Unreleased
<!-- Add all new changes here. They will be moved under a version at release -->
* `NEW` Doc output now contains file paths for `@alias` and `@enum` types
* `FIX` Incorrect inject-field message for extra table field in exact class
* `CHG` Rename configuration option `Lua.diagnostics.disableScheme` to `Lua.diagnostics.validScheme` and improve its description. Now it enables diagnostics for Lua files that use the specified scheme.
* `FIX` adds the `|lambda|` operator to the `Lua.runtime.nonstandardSymbol` configuration template, which allows the use of that option. Previously, support for it existed in the parser, but we could not actually use the option because it is not recognised in the configuration.
Expand Down
5 changes: 5 additions & 0 deletions script/cli/doc/export.lua
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,11 @@ export.makeDocObject['INIT'] = function(source, has_seen)
end

export.makeDocObject['doc.alias'] = function(source, obj, has_seen)
obj.file = export.getLocalPath(guide.getUri(source))
end

export.makeDocObject['doc.enum'] = function(source, obj, has_seen)
obj.file = export.getLocalPath(guide.getUri(source))
end

export.makeDocObject['doc.field'] = function(source, obj, has_seen)
Expand Down Expand Up @@ -256,6 +260,7 @@ export.makeDocObject['variable'] = function(source, obj, has_seen)
or set.type == 'setmethod'
or set.type == 'setindex'
or set.type == 'doc.alias'
or set.type == 'doc.enum'
or set.type == 'doc.class'
then
table.insert(obj.defines, export.documentObject(set, has_seen))
Expand Down
2 changes: 1 addition & 1 deletion script/core/hover/description.lua
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ local function tryDocEnum(source)
end
if field.value.type == 'integer'
or field.value.type == 'string' then
md:add('lua', (' %s: %s = %s,'):format(key, field.value.type, field.value[1]))
md:add('lua', (' %s: %s = %q,'):format(key, field.value.type, field.value[1]))
end
if field.value.type == 'binary'
or field.value.type == 'unary' then
Expand Down
Loading