Skip to content

Commit 1e1d2dd

Browse files
feat: adds the ability to set a prefix to winbar (#1482)
1 parent a751b92 commit 1e1d2dd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lua/lspsaga/init.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ saga.saga_augroup = api.nvim_create_augroup('Lspsaga', { clear = true })
44

55
local default_config = {
66
ui = {
7+
winbar_prefix = '',
78
border = 'rounded',
89
devicon = true,
910
foldericon = true,

lua/lspsaga/symbol/winbar.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ local function path_in_bar(buf)
2323
local items = {}
2424
local folder
2525
if ui.foldericon then
26-
folder = get_kind_icon(302)[2]
26+
folder = ui.winbar_prefix .. get_kind_icon(302)[2]
2727
end
2828

2929
for item in util.path_itera(buf) do
@@ -34,7 +34,7 @@ local function path_in_bar(buf)
3434
and '%#' .. (hl or 'SagaFileIcon') .. '#' .. (icon and icon .. ' ' or '') .. '%*' .. bar.prefix .. 'FileName#' .. item
3535
or bar.prefix
3636
.. 'Folder#'
37-
.. (folder and folder or '')
37+
.. (folder and folder or ui.winbar_prefix)
3838
.. '%*'
3939
.. bar.prefix
4040
.. 'FolderName#'

0 commit comments

Comments
 (0)