Skip to content

Commit

Permalink
fix(aerial): use new sep_icon option for aerial lualine component
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Oct 13, 2023
1 parent 1e79248 commit bd1928b
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions lua/lazyvim/plugins/extras/editor/aerial.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,11 @@ local Config = require("lazyvim.config")
local Util = require("lazyvim.util")

return {
desc = "Aerial Symbol Browser",
{
"stevearc/aerial.nvim",
event = "LazyFile",
opts = function()
---@diagnostic disable-next-line: no-unknown
local lualine = require("lualine.components.aerial")

-- Strip trailing spaces from symbols in statusline
---@param _ any
---@param symbols {icon?:string}[]
lualine.format_status = Util.inject.args(lualine.format_status, function(_, symbols)
for _, s in ipairs(symbols) do
s.icon = s.icon and s.icon:gsub("%s*$", "") or nil
end
end)

local icons = vim.deepcopy(Config.icons.kinds)

-- HACK: fix lua's weird choice for `Package` for control
Expand Down Expand Up @@ -110,8 +99,8 @@ return {
opts = function(_, opts)
table.insert(opts.sections.lualine_c, {
"aerial",
-- The separator to be used to separate symbols in status line.
sep = " ",
sep = " ", -- separator between symbols
sep_icon = "", -- separator between icon and symbol

-- The number of symbols to render top-down. In order to render only 'N' last
-- symbols, negative numbers may be supplied. For instance, 'depth = -1' can
Expand Down

0 comments on commit bd1928b

Please sign in to comment.