add: update custom nvim tree, remove root folder

This commit is contained in:
asep komarudin 2024-03-19 04:55:20 +07:00
parent e5a9b6e638
commit fc175ae9ad
5 changed files with 177 additions and 163 deletions

View file

@ -6,6 +6,12 @@ end
local icons = require("user.icons")
local use_icons = true
-- get folder name from current directory
local _get_folder_name = function()
local str = vim.fn.fnamemodify(vim.fn.getcwd(), ":t")
return " 󱧶 " .. str:lower():gsub("^%l", string.upper) .. " "
end
local function diagnostics_indicator(num, _, diagnostics, _)
local result = {}
local symbols = {
@ -58,14 +64,14 @@ bufferline.setup({
offsets = {
{
filetype = "NvimTree",
text = "Explorer",
text = _get_folder_name(),
highlight = "Directory",
text_align = "left",
padding = 1,
},
{
filetype = "neo-tree",
text = "Explorer",
text = _get_folder_name(),
highlight = "Directory",
text_align = "left",
padding = 1,