Compare commits

..

1 Commits

Author SHA1 Message Date
github-actions[bot]
ca23b325b8
chore(master): release nvim-tree 1.15.0 2025-10-20 00:50:33 +00:00
4 changed files with 41 additions and 47 deletions

View File

@ -1,3 +1,3 @@
{ {
".": "1.14.0" ".": "1.15.0"
} }

View File

@ -1,5 +1,19 @@
# Changelog # Changelog
## [1.15.0](https://github.com/nvim-tree/nvim-tree.lua/compare/nvim-tree-v1.14.0...nvim-tree-v1.15.0) (2025-10-20)
### Features
* **#1826:** add diagnostics.diagnostic_opts: vim.diagnostic.Opts will override diagnostics.severity and diagnostics.icons ([#3190](https://github.com/nvim-tree/nvim-tree.lua/issues/3190)) ([fefa335](https://github.com/nvim-tree/nvim-tree.lua/commit/fefa335f1c8f690eb668a1efd18ee4fc6d64cd3e))
* add NvimTreeFilter filetype ([64e2192](https://github.com/nvim-tree/nvim-tree.lua/commit/64e2192f5250796aa4a7f33c6ad888515af50640))
* set filter input filetype to NvimTreeFilter ([#3207](https://github.com/nvim-tree/nvim-tree.lua/issues/3207)) ([64e2192](https://github.com/nvim-tree/nvim-tree.lua/commit/64e2192f5250796aa4a7f33c6ad888515af50640))
### Bug Fixes
* prevent NvimTree to be alternate buffer when tab open ([#3205](https://github.com/nvim-tree/nvim-tree.lua/issues/3205)) ([e397756](https://github.com/nvim-tree/nvim-tree.lua/commit/e397756d2a79d74314ea4cd3efc41300e91c0ff0))
## [1.14.0](https://github.com/nvim-tree/nvim-tree.lua/compare/nvim-tree-v1.13.0...nvim-tree-v1.14.0) (2025-08-12) ## [1.14.0](https://github.com/nvim-tree/nvim-tree.lua/compare/nvim-tree-v1.13.0...nvim-tree-v1.14.0) (2025-08-12)

View File

@ -101,7 +101,7 @@ end
---@param end_ number|nil ---@param end_ number|nil
function Builder:insert_highlight(groups, start, end_) function Builder:insert_highlight(groups, start, end_)
for _, higroup in ipairs(groups) do for _, higroup in ipairs(groups) do
table.insert(self.hl_range_args, { higroup = higroup, start = { self.index, start }, finish = { self.index, end_ or -1 } }) table.insert(self.hl_range_args, { higroup = higroup, start = { self.index, start, }, finish = { self.index, end_ or -1, } })
end end
end end
@ -381,28 +381,8 @@ end
function Builder:build_header() function Builder:build_header()
if view.is_root_folder_visible(self.explorer.absolute_path) then if view.is_root_folder_visible(self.explorer.absolute_path) then
local root_name = self:format_root_name(self.explorer.opts.renderer.root_folder_label) local root_name = self:format_root_name(self.explorer.opts.renderer.root_folder_label)
table.insert(self.lines, root_name)
-- Pad to window width so the highlight spans the whole row. self:insert_highlight({ "NvimTreeRootFolder" }, 0, string.len(root_name))
local win = view.get_winnr()
local width = 0
if win and vim.api.nvim_win_is_valid(win) then
width = vim.api.nvim_win_get_width(win)
end
-- Use display width for proper padding with Nerd Font / wide glyphs.
local name_display_w = vim.fn.strdisplaywidth(root_name)
local pad = 0
if width and width > name_display_w then
pad = width - name_display_w
end
local padded_root = pad > 0 and (root_name .. string.rep(" ", pad)) or root_name
table.insert(self.lines, padded_root)
-- Highlight the entire padded string (covers the full visible row)
self:insert_highlight({ "NvimTreeRootFolder" }, 0, string.len(padded_root))
-- Keep original indexing behavior
self.index = 1 self.index = 1
end end
@ -415,6 +395,7 @@ function Builder:build_header()
self.index = self.index + 1 self.index = self.index + 1
end end
end end
---Sanitize lines for rendering. ---Sanitize lines for rendering.
---Replace newlines with literal \n ---Replace newlines with literal \n
---@private ---@private
@ -468,8 +449,7 @@ function Builder:setup_hidden_display_function(opts)
local ok, result = pcall(hidden_display, hidden_stats) local ok, result = pcall(hidden_display, hidden_stats)
if not ok then if not ok then
notify.warn( notify.warn(
"Problem occurred in the function ``opts.renderer.hidden_display`` see nvim-tree.renderer.hidden_display on :h nvim-tree" "Problem occurred in the function ``opts.renderer.hidden_display`` see nvim-tree.renderer.hidden_display on :h nvim-tree")
)
return nil return nil
end end
return result return result