Skip to content

Commit

Permalink
chore: bump stylua version to 14.1 in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
shadmansaleh committed Jul 22, 2022
1 parent d7386bb commit 669a7d6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/autogen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --config-path=.stylua.toml lua/ examples/
version: 0.12.0
version: 0.14.1
- name: Push changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .stylua.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ indent_type = "Spaces"
indent_width = 2
quote_style = "AutoPreferSingle"
call_parentheses = "NoSingleTable"
collapse_simple_statement = "Never"
7 changes: 2 additions & 5 deletions lua/lualine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,8 @@ local statusline = modules.utils.retry_call_wrap(function(sections, is_focused,
for _, section_name in ipairs(section_sequence) do
if sections['lualine_' .. section_name] then
-- insert highlight+components of this section to status_builder
local section_data = modules.utils_section.draw_section(
sections['lualine_' .. section_name],
section_name,
is_focused
)
local section_data =
modules.utils_section.draw_section(sections['lualine_' .. section_name], section_name, is_focused)
if #section_data > 0 then
if not applied_midsection_divider and section_name > 'c' then
applied_midsection_divider = true
Expand Down
9 changes: 2 additions & 7 deletions lua/lualine/highlight.lua
Original file line number Diff line number Diff line change
Expand Up @@ -396,13 +396,8 @@ function M.component_format_highlight(highlight, is_focused)
elseif type(color) == 'table' then
if not highlight.no_default and not (color.fg and color.bg) then
hl_name = append_mode(highlight.name, is_focused)
color = get_default_component_color(
hl_name,
append_mode(''):sub(2),
highlight.section,
color,
highlight.options
)
color =
get_default_component_color(hl_name, append_mode(''):sub(2), highlight.section, color, highlight.options)
end
M.highlight(hl_name, color.fg, color.bg, color.gui, color.link)
return '%#' .. hl_name .. '#', color
Expand Down
7 changes: 2 additions & 5 deletions lua/lualine/utils/section.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,8 @@ function M.draw_section(section, section_name, is_focused)
type(section[first_component_no].options.separator) ~= 'table'
and (section[1].options.section_separators.left ~= nil and section[1].options.section_separators.left ~= '')
then
status[component_no] = string.format(
'%s%%S{%s}',
status[component_no],
section[1].options.section_separators.left
)
status[component_no] =
string.format('%s%%S{%s}', status[component_no], section[1].options.section_separators.left)
end
end
end
Expand Down

0 comments on commit 669a7d6

Please sign in to comment.