feat(#2411): add renderer.highlight_bookmarks, renderer.icons.bookmarks_placement (#2412)

* feat(#1079): add highlight NvimTreeCopiedText and NvimTreeCutText

* feat(#1079): add highlight NvimTreeCopiedText and NvimTreeCutText

* feat(#1079): node may not be present in copy and cut

* feat(#2411): bookmark highlight and icon placement

* feat(#1079): add renderer.highlight_clipboard

* feat(#1079): add renderer.highlight_clipboard

* feat(#2411): bookmark highlight and icon placement

* feat(#2411): bookmark highlight and icon placement

* style

* feat(#2411): bookmark highlight and icon placement

* feat(#2411): bookmark highlight and icon placement

* feat(#2411): bookmark highlight and icon placement

* feat(#2411): bookmark highlight and icon placement
This commit is contained in:
Alexander Courtis
2023-09-24 15:07:02 +10:00
committed by GitHub
parent ea147418e0
commit d49a284236
8 changed files with 156 additions and 60 deletions

View File

@@ -5,6 +5,7 @@ local core = require "nvim-tree.core"
local events = require "nvim-tree.events"
local notify = require "nvim-tree.notify"
local renderer = require "nvim-tree.renderer"
local reloaders = require "nvim-tree.actions.reloaders.reloaders"
local HL_POSITION = require("nvim-tree.enum").HL_POSITION
@@ -195,7 +196,7 @@ local function do_paste(node, action_type, action_fn)
clipboard[action_type] = {}
if not M.config.filesystem_watchers.enable then
return require("nvim-tree.actions.reloaders.reloaders").reload_explorer()
return reloaders.reload_explorer()
end
end
@@ -300,7 +301,7 @@ end
function M.setup(opts)
M.config.filesystem_watchers = opts.filesystem_watchers
M.config.actions = opts.actions
M.hl_pos = HL_POSITION[opts.renderer.highlight_clipboard]
M.hl_pos = HL_POSITION[opts.renderer.highlight_clipboard] or HL_POSITION.none
end
return M