chore: bump stylua version to 14.1 in CI

This commit is contained in:
shadmansaleh 2022-07-22 19:39:52 +06:00
parent d7386bbab3
commit 669a7d63ca
5 changed files with 8 additions and 18 deletions

View File

@ -33,7 +33,7 @@ jobs:
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
args: --config-path=.stylua.toml lua/ examples/ args: --config-path=.stylua.toml lua/ examples/
version: 0.12.0 version: 0.14.1
- name: Push changes - name: Push changes
uses: stefanzweifel/git-auto-commit-action@v4 uses: stefanzweifel/git-auto-commit-action@v4
with: with:

View File

@ -2,3 +2,4 @@ indent_type = "Spaces"
indent_width = 2 indent_width = 2
quote_style = "AutoPreferSingle" quote_style = "AutoPreferSingle"
call_parentheses = "NoSingleTable" call_parentheses = "NoSingleTable"
collapse_simple_statement = "Never"

View File

@ -162,11 +162,8 @@ local statusline = modules.utils.retry_call_wrap(function(sections, is_focused,
for _, section_name in ipairs(section_sequence) do for _, section_name in ipairs(section_sequence) do
if sections['lualine_' .. section_name] then if sections['lualine_' .. section_name] then
-- insert highlight+components of this section to status_builder -- insert highlight+components of this section to status_builder
local section_data = modules.utils_section.draw_section( local section_data =
sections['lualine_' .. section_name], modules.utils_section.draw_section(sections['lualine_' .. section_name], section_name, is_focused)
section_name,
is_focused
)
if #section_data > 0 then if #section_data > 0 then
if not applied_midsection_divider and section_name > 'c' then if not applied_midsection_divider and section_name > 'c' then
applied_midsection_divider = true applied_midsection_divider = true

View File

@ -396,13 +396,8 @@ function M.component_format_highlight(highlight, is_focused)
elseif type(color) == 'table' then elseif type(color) == 'table' then
if not highlight.no_default and not (color.fg and color.bg) then if not highlight.no_default and not (color.fg and color.bg) then
hl_name = append_mode(highlight.name, is_focused) hl_name = append_mode(highlight.name, is_focused)
color = get_default_component_color( color =
hl_name, get_default_component_color(hl_name, append_mode(''):sub(2), highlight.section, color, highlight.options)
append_mode(''):sub(2),
highlight.section,
color,
highlight.options
)
end end
M.highlight(hl_name, color.fg, color.bg, color.gui, color.link) M.highlight(hl_name, color.fg, color.bg, color.gui, color.link)
return '%#' .. hl_name .. '#', color return '%#' .. hl_name .. '#', color

View File

@ -47,11 +47,8 @@ function M.draw_section(section, section_name, is_focused)
type(section[first_component_no].options.separator) ~= 'table' type(section[first_component_no].options.separator) ~= 'table'
and (section[1].options.section_separators.left ~= nil and section[1].options.section_separators.left ~= '') and (section[1].options.section_separators.left ~= nil and section[1].options.section_separators.left ~= '')
then then
status[component_no] = string.format( status[component_no] =
'%s%%S{%s}', string.format('%s%%S{%s}', status[component_no], section[1].options.section_separators.left)
status[component_no],
section[1].options.section_separators.left
)
end end
end end
end end