fix StyLua command (#190)
* style: fix StyLua glob pattern * style: fix style with StyLua run './utils/stylua --config-path stylua.toml --glob 'lua/**/*.lua' -- lua'
This commit is contained in:
@@ -21,8 +21,8 @@ end
|
||||
---@param v2 T
|
||||
---@return T
|
||||
misc.merge = function(v1, v2)
|
||||
local merge1 = type(v1) == "table" and (not vim.tbl_islist(v1) or vim.tbl_isempty(v1))
|
||||
local merge2 = type(v2) == "table" and (not vim.tbl_islist(v1) or vim.tbl_isempty(v1))
|
||||
local merge1 = type(v1) == 'table' and (not vim.tbl_islist(v1) or vim.tbl_isempty(v1))
|
||||
local merge2 = type(v2) == 'table' and (not vim.tbl_islist(v1) or vim.tbl_isempty(v1))
|
||||
if merge1 and merge2 then
|
||||
local new_tbl = {}
|
||||
for k, v in pairs(v2) do
|
||||
@@ -48,16 +48,15 @@ misc.merge = function(v1, v2)
|
||||
return v1
|
||||
end
|
||||
|
||||
|
||||
---Generate id for group name
|
||||
misc.id = setmetatable({
|
||||
group = {}
|
||||
group = {},
|
||||
}, {
|
||||
__call = function(_, group)
|
||||
misc.id.group[group] = misc.id.group[group] or 0
|
||||
misc.id.group[group] = misc.id.group[group] + 1
|
||||
return misc.id.group[group]
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
---Check the value is nil or not.
|
||||
|
||||
Reference in New Issue
Block a user