|
1 | | -local notify = require("nvim-tree.notify") |
2 | | - |
3 | 1 | local M = {} |
4 | 2 |
|
5 | 3 | --- Create empty sub-tables if not present |
@@ -120,25 +118,32 @@ end |
120 | 118 | ---@param u nvim_tree.config user supplied subset of config |
121 | 119 | local function deprecated_config(u) |
122 | 120 | if type(u.view) == "table" and u.view.hide_root_folder then |
123 | | - notify.info("view.hide_root_folder is deprecated, please set renderer.root_folder_label = false") |
| 121 | + require("nvim-tree.notify").info( |
| 122 | + "view.hide_root_folder is deprecated, please set renderer.root_folder_label = false" |
| 123 | + ) |
124 | 124 | end |
125 | 125 | end |
126 | 126 |
|
127 | 127 | ---@param u nvim_tree.config user supplied subset of config |
128 | 128 | local function removed_config(u) |
129 | 129 | if u.auto_close then |
130 | | - notify.warn("auto close feature has been removed: https://github.com/nvim-tree/nvim-tree.lua/wiki/Auto-Close") |
| 130 | + require("nvim-tree.notify").warn( |
| 131 | + "auto close feature has been removed: https://github.com/nvim-tree/nvim-tree.lua/wiki/Auto-Close" |
| 132 | + ) |
131 | 133 | u["auto_close"] = nil |
132 | 134 | end |
133 | 135 |
|
134 | 136 | if u.focus_empty_on_setup then |
135 | | - notify.warn("focus_empty_on_setup has been removed: https://github.com/nvim-tree/nvim-tree.lua/wiki/Open-At-Startup") |
| 137 | + require("nvim-tree.notify").warn( |
| 138 | + "focus_empty_on_setup has been removed: https://github.com/nvim-tree/nvim-tree.lua/wiki/Open-At-Startup" |
| 139 | + ) |
136 | 140 | u["focus_empty_on_setup"] = nil |
137 | 141 | end |
138 | 142 |
|
139 | 143 | if u.create_in_closed_folder then |
140 | | - notify.warn( |
141 | | - "create_in_closed_folder has been removed and is now the default behaviour. You may use api.fs.create to add a file under your desired node.") |
| 144 | + require("nvim-tree.notify").warn( |
| 145 | + "create_in_closed_folder has been removed and is now the default behaviour. You may use api.fs.create to add a file under your desired node." |
| 146 | + ) |
142 | 147 | end |
143 | 148 | u["create_in_closed_folder"] = nil |
144 | 149 | end |
|
0 commit comments