Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adds the ability to set a prefix to winbar #1482

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading