mirror of
https://github.com/folke/snacks.nvim
synced 2025-07-24 13:34:09 +00:00
fix(lazygit): enable boolean values in config (#377)
## Description Using boolean value inside `config` resulted in error `attempt to concatenate a boolean value` inside `to_yaml` function. This PR fixes it by converting boolean values to string Example config: ``` lazygit = { config = { gui = { showFileTree = false, }, }, }, ``` ## Related Issue(s) ## Screenshots 
This commit is contained in:
parent
7861e62ad0
commit
ec346843e0
1 changed files with 3 additions and 0 deletions
|
@ -156,6 +156,9 @@ local function update_config(opts)
|
|||
local config = vim.tbl_deep_extend("force", { gui = { theme = theme } }, opts.config or {})
|
||||
|
||||
local function yaml_val(val)
|
||||
if type(val) == "boolean" then
|
||||
return tostring(val)
|
||||
end
|
||||
return type(val) == "string" and not val:find("^\"'`") and ("%q"):format(val) or val
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue