File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 1
1
local utils = require " nvim-tree.utils"
2
- local core = require " nvim-tree.core"
3
2
local notify = require " nvim-tree.notify"
4
3
5
4
local pad = require " nvim-tree.renderer.components.padding"
@@ -138,7 +137,7 @@ function Builder:_build_folder(node)
138
137
local foldername_hl = " NvimTreeFolderName"
139
138
if node .link_to and self .symlink_destination then
140
139
local arrow = icons .i .symlink_arrow
141
- local link_to = utils .path_relative (node .link_to , core . get_cwd () )
140
+ local link_to = utils .path_relative (node .link_to , self . root_cwd )
142
141
foldername = foldername .. arrow .. link_to
143
142
foldername_hl = " NvimTreeSymlinkFolderName"
144
143
elseif vim .tbl_contains (self .special_files , node .absolute_path ) or vim .tbl_contains (self .special_files , node .name ) then
@@ -160,7 +159,7 @@ function Builder:_build_symlink(node)
160
159
local arrow = icons .i .symlink_arrow
161
160
local symlink_formatted = node .name
162
161
if self .symlink_destination then
163
- local link_to = utils .path_relative (node .link_to , core . get_cwd () )
162
+ local link_to = utils .path_relative (node .link_to , self . root_cwd )
164
163
symlink_formatted = symlink_formatted .. arrow .. link_to
165
164
end
166
165
Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ local DecoratorOpened = require "nvim-tree.renderer.decorator.opened"
20
20
local M = {
21
21
last_highlights = {},
22
22
decorators = {},
23
- deco = {},
24
23
}
25
24
26
25
local SIGN_GROUP = " NvimTreeRendererSigns"
@@ -72,7 +71,7 @@ function M.draw()
72
71
local cursor = vim .api .nvim_win_get_cursor (view .get_winnr ())
73
72
icon_component .reset_config ()
74
73
75
- local lines , hl , sign_names = Builder .new (core .get_cwd (), M .deco )
74
+ local lines , hl , sign_names = Builder .new (core .get_cwd (), M .decorators )
76
75
:configure_root_label (M .config .root_folder_label )
77
76
:configure_trailing_slash (M .config .add_trailing )
78
77
:configure_special_files (M .config .special_files )
@@ -108,7 +107,7 @@ function M.setup(opts)
108
107
icon_component .setup (opts )
109
108
110
109
-- priority order
111
- M .deco = {
110
+ M .decorators = {
112
111
DecoratorCut :new (opts ),
113
112
DecoratorCopied :new (opts ),
114
113
DecoratorDiagnostics :new (opts ),
You can’t perform that action at this time.
0 commit comments