feat(nvim): enable winbar
This commit is contained in:
parent
7ba4efa503
commit
77a272fc32
@ -5,4 +5,4 @@ require("core.globals").setup()
|
||||
require("core.autocmds").setup()
|
||||
require("core.filetypes").setup()
|
||||
require("core.lsp").setup()
|
||||
-- require('core.winbar').setup()
|
||||
require('core.winbar').setup()
|
||||
|
@ -5,14 +5,18 @@ M.winbar = function()
|
||||
local ignore_fts = {
|
||||
'neo-tree',
|
||||
'dashboard',
|
||||
'alpha',
|
||||
}
|
||||
|
||||
for _, ft in ipairs(ignore_fts) do
|
||||
if ft == vim.bo.filetype then
|
||||
return win_number
|
||||
return win_number .. ' ' .. ft
|
||||
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
|
||||
|
||||
M.setup = function()
|
||||
|
Loading…
Reference in New Issue
Block a user