feat(nvim): enable winbar

This commit is contained in:
Price Hiller 2022-10-25 16:34:12 -05:00
parent 7ba4efa503
commit 77a272fc32
2 changed files with 7 additions and 3 deletions

View File

@ -5,4 +5,4 @@ require("core.globals").setup()
require("core.autocmds").setup() require("core.autocmds").setup()
require("core.filetypes").setup() require("core.filetypes").setup()
require("core.lsp").setup() require("core.lsp").setup()
-- require('core.winbar').setup() require('core.winbar').setup()

View File

@ -5,14 +5,18 @@ M.winbar = function()
local ignore_fts = { local ignore_fts = {
'neo-tree', 'neo-tree',
'dashboard', 'dashboard',
'alpha',
} }
for _, ft in ipairs(ignore_fts) do for _, ft in ipairs(ignore_fts) do
if ft == vim.bo.filetype then if ft == vim.bo.filetype then
return win_number return win_number .. ' ' .. ft
end end
end end
return win_number .. ' %f'
local relative_path = vim.fn.fnamemodify(vim.fn.expand('%:h'), ':p:~:.')
local filename = vim.fn.expand('%:t')
return win_number .. '' .. relative_path .. filename
end end
M.setup = function() M.setup = function()