mirror of
https://github.com/nvimdev/lspsaga.nvim.git
synced 2024-09-16 14:24:08 +02:00
feat: adds the ability to set a prefix to winbar (#1482)
This commit is contained in:
parent
a751b92b5d
commit
1e1d2dd66f
2 changed files with 3 additions and 2 deletions
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
@ -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#'
|
||||
|
|
Loading…
Reference in a new issue