mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-25 02:08:40 +02:00
plugins/nvim-tree: remove deprecated option view.mappings
This commit is contained in:
parent
e7f2da50e2
commit
67ef20a223
2 changed files with 51 additions and 66 deletions
|
@ -48,6 +48,20 @@ in {
|
||||||
(optionWarnings.mkDeprecatedOption {
|
(optionWarnings.mkDeprecatedOption {
|
||||||
option = basePluginPath ++ ["removeKeymaps"];
|
option = basePluginPath ++ ["removeKeymaps"];
|
||||||
alternative = basePluginPath ++ ["onAttach"];
|
alternative = basePluginPath ++ ["onAttach"];
|
||||||
|
message = ''
|
||||||
|
Mappings can now be customized from the `onAttach` function.
|
||||||
|
Learn more at `:help nvim-tree-mappings-legacy`.
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
# Deprecate warning added 2023-04-24
|
||||||
|
# TODO Remove both this warning and the one above (removeKeymaps) in ~1 month (June).
|
||||||
|
(optionWarnings.mkDeprecatedOption {
|
||||||
|
option = basePluginPath ++ ["view" "mappings"];
|
||||||
|
alternative = basePluginPath ++ ["onAttach"];
|
||||||
|
message = ''
|
||||||
|
Mappings can now be customized from the `onAttach` function.
|
||||||
|
Learn more at `:help nvim-tree-mappings-legacy`.
|
||||||
|
'';
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -373,7 +387,7 @@ in {
|
||||||
Necessary when using a UI prompt decorator such as dressing.nvim or telescope-ui-select.nvim.
|
Necessary when using a UI prompt decorator such as dressing.nvim or telescope-ui-select.nvim.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
view = helpers.mkCompositeOption "Window / buffer setup." {
|
view = {
|
||||||
centralizeSelection = helpers.defaultNullOpts.mkBool false ''
|
centralizeSelection = helpers.defaultNullOpts.mkBool false ''
|
||||||
When entering nvim-tree, reposition the view so that the current node is
|
When entering nvim-tree, reposition the view so that the current node is
|
||||||
initially centralized, see |zz|.
|
initially centralized, see |zz|.
|
||||||
|
@ -1036,8 +1050,7 @@ in {
|
||||||
on_attach = onAttach;
|
on_attach = onAttach;
|
||||||
remove_keymaps = removeKeymaps;
|
remove_keymaps = removeKeymaps;
|
||||||
select_prompts = selectPrompts;
|
select_prompts = selectPrompts;
|
||||||
view = with view;
|
view = with view; {
|
||||||
ifNonNull' cfg.view {
|
|
||||||
centralize_selection = centralizeSelection;
|
centralize_selection = centralizeSelection;
|
||||||
inherit cursorline;
|
inherit cursorline;
|
||||||
debounce_delay = debounceDelay;
|
debounce_delay = debounceDelay;
|
||||||
|
|
|
@ -90,34 +90,6 @@
|
||||||
number = false;
|
number = false;
|
||||||
relativenumber = false;
|
relativenumber = false;
|
||||||
signcolumn = "yes";
|
signcolumn = "yes";
|
||||||
mappings = {
|
|
||||||
customOnly = false;
|
|
||||||
list = [
|
|
||||||
# remove a default mapping for cd
|
|
||||||
{
|
|
||||||
key = "<2-RightMouse>";
|
|
||||||
action = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
# add multiple normal mode mappings for edit
|
|
||||||
{
|
|
||||||
key = ["<CR>" "o"];
|
|
||||||
action = "edit";
|
|
||||||
mode = "n";
|
|
||||||
}
|
|
||||||
|
|
||||||
# custom action
|
|
||||||
{
|
|
||||||
key = "p";
|
|
||||||
action = "print_the_node_path";
|
|
||||||
action_cb = ''
|
|
||||||
function(node)
|
|
||||||
print(node.absolute_path)
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
float = {
|
float = {
|
||||||
enable = false;
|
enable = false;
|
||||||
quitOnFocusLoss = true;
|
quitOnFocusLoss = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue