Skip to content

Commit 886d852

Browse files
authored
fix(#1858): deprecation warning for config.mappings.active and default (#2084)
1 parent 6515a1e commit 886d852

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lua/nvim-tree/api.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
local notify = require "nvim-tree.notify"
2+
13
local Api = {
24
tree = {},
35
node = { navigate = { sibling = {}, git = {}, diagnostics = {} }, run = {}, open = {} },
@@ -176,9 +178,11 @@ Api.marks.navigate.select = require("nvim-tree.marks.navigation").select
176178
Api.config.mappings.default_on_attach = require("nvim-tree.keymap").default_on_attach
177179

178180
Api.config.mappings.active = function()
181+
notify.warn "api.config.mappings.active is deprecated in favor of config.mappings.get_keymap"
179182
return require("nvim-tree.keymap-legacy").active_mappings_clone()
180183
end
181184
Api.config.mappings.default = function()
185+
notify.warn "api.config.mappings.default is deprecated in favor of config.mappings.get_keymap_default"
182186
return require("nvim-tree.keymap-legacy").default_mappings_clone()
183187
end
184188

0 commit comments

Comments
 (0)