Skip to content

Commit

Permalink
feat: adds the ability to set a prefix to winbar (#1482)
Browse files Browse the repository at this point in the history
  • Loading branch information
adriancmiranda authored Aug 15, 2024
1 parent a751b92 commit 1e1d2dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions lua/lspsaga/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ saga.saga_augroup = api.nvim_create_augroup('Lspsaga', { clear = true })

local default_config = {
ui = {
winbar_prefix = '',
border = 'rounded',
devicon = true,
foldericon = true,
Expand Down
4 changes: 2 additions & 2 deletions lua/lspsaga/symbol/winbar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ local function path_in_bar(buf)
local items = {}
local folder
if ui.foldericon then
folder = get_kind_icon(302)[2]
folder = ui.winbar_prefix .. get_kind_icon(302)[2]
end

for item in util.path_itera(buf) do
Expand All @@ -34,7 +34,7 @@ local function path_in_bar(buf)
and '%#' .. (hl or 'SagaFileIcon') .. '#' .. (icon and icon .. ' ' or '') .. '%*' .. bar.prefix .. 'FileName#' .. item
or bar.prefix
.. 'Folder#'
.. (folder and folder or '')
.. (folder and folder or ui.winbar_prefix)
.. '%*'
.. bar.prefix
.. 'FolderName#'
Expand Down

0 comments on commit 1e1d2dd

Please sign in to comment.