fix(#1858): deprecation warning for config.mappings.active and default (#2084)

This commit is contained in:
Alexander Courtis 2023-03-26 15:29:16 +11:00 committed by GitHub
parent 6515a1e1a9
commit 886d852f6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,5 @@
local notify = require "nvim-tree.notify"
local Api = {
tree = {},
node = { navigate = { sibling = {}, git = {}, diagnostics = {} }, run = {}, open = {} },
@ -176,9 +178,11 @@ Api.marks.navigate.select = require("nvim-tree.marks.navigation").select
Api.config.mappings.default_on_attach = require("nvim-tree.keymap").default_on_attach
Api.config.mappings.active = function()
notify.warn "api.config.mappings.active is deprecated in favor of config.mappings.get_keymap"
return require("nvim-tree.keymap-legacy").active_mappings_clone()
end
Api.config.mappings.default = function()
notify.warn "api.config.mappings.default is deprecated in favor of config.mappings.get_keymap_default"
return require("nvim-tree.keymap-legacy").default_mappings_clone()
end