Skip to content
This repository has been archived by the owner on Jul 6, 2024. It is now read-only.

Commit

Permalink
fix: options now have proper types
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Oct 12, 2022
1 parent a62b224 commit d9bd9b4
Show file tree
Hide file tree
Showing 4 changed files with 244 additions and 240 deletions.
6 changes: 5 additions & 1 deletion lua/lua-dev/build/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ function M.build()
writer:write(var .. " = {}\n\n")
Util.for_each(info, function(name, option)
if option.scope == scope then
local str = ("%s.%s = %q\n"):format(var, name, option.default)
local default = option.default
if option.type == "string" then
default = ("%q"):format(default)
end
local str = ("%s.%s = %s\n"):format(var, name, default)
if docs[name] then
str = Annotations.comment(docs[name]) .. "\n" .. str
end
Expand Down
Loading

0 comments on commit d9bd9b4

Please sign in to comment.