@@ -21,7 +21,6 @@ CONTENTS *nvim-tree*
21
21
5.9 API Commands | nvim-tree-api.commands |
22
22
6. Mappings | nvim-tree-mappings |
23
23
6.1 Default Mappings | nvim-tree-mappings-default |
24
- 6.2 Legacy Mappings | nvim-tree-mappings-legacy |
25
24
7. Highlight Groups | nvim-tree-highlight |
26
25
8. Events | nvim-tree-events |
27
26
9. Bookmarks | nvim-tree-bookmarks |
@@ -285,14 +284,6 @@ Show the mappings: `g?`
285
284
286
285
Calls: `api.tree.collapse_all (true)`
287
286
288
- *:NvimTreeGenerateOnAttach*
289
-
290
- Creates and opens a new file `nvim- tree- on - attach.lua ` in | stdpath | `" cache" ` ,
291
- usually `$XDG_CACHE_HOME /nvim` . Contains | nvim-tree.on_attach | function based
292
- on your | nvim-tree.view.mappings | , | nvim-tree.remove_keymaps | as well as the
293
- defaults.
294
- See https://github.com/nvim-tree/nvim-tree.lua/wiki/Migrating-To-on_attach
295
-
296
287
==============================================================================
297
288
4. SETUP *nvim-tree-setup*
298
289
@@ -324,7 +315,6 @@ applying configuration.
324
315
reload_on_bufenter = false,
325
316
respect_buf_cwd = false,
326
317
on_attach = "default",
327
- remove_keymaps = false,
328
318
select_prompts = false,
329
319
view = {
330
320
centralize_selection = false,
@@ -337,12 +327,6 @@ applying configuration.
337
327
number = false,
338
328
relativenumber = false,
339
329
signcolumn = "yes",
340
- mappings = {
341
- custom_only = false,
342
- list = {
343
- -- user mappings go here
344
- },
345
- },
346
330
float = {
347
331
enable = false,
348
332
quit_on_focus_loss = true,
@@ -816,15 +800,6 @@ specific mappings. See |nvim-tree-mappings|.
816
800
When on_attach is not a function, | nvim-tree-mappings-default | will be called.
817
801
Type: `function(bufnr) | string`, Default: `" default" `
818
802
819
- *nvim-tree.remove_keymaps*
820
- Deprecated: please see | nvim-tree-mappings-legacy |
821
- This can be used to remove the default mappings in the tree.
822
- - Remove specific keys by passing a `string ` table of keys
823
- eg. {"<C-o> ", "<CR> ", "o", "<Tab> "}
824
- - Remove all default mappings by passing `true`
825
- - Ignore by passing `false`
826
- Type: `bool` or `{string }` , Default: `false`
827
-
828
803
*nvim-tree.select_prompts*
829
804
Use | vim.ui.select | style prompts. Necessary when using a UI prompt decorator
830
805
such as dressing.nvim or telescope-ui-select.nvim
@@ -894,20 +869,6 @@ Window / buffer setup.
894
869
Show diagnostic sign column. Value can be `" yes" ` , `" auto" ` , `" no" ` .
895
870
Type: `string ` , Default: `" yes" `
896
871
897
- *nvim-tree.view.mappings*
898
- Deprecated: please see | nvim-tree-mappings-legacy |
899
-
900
- *nvim-tree.view.mappings.custom_only*
901
- Will use only the provided user mappings and not the default otherwise,
902
- extends the default mappings with the provided user mappings.
903
- Overrides | nvim-tree.remove_keymaps |
904
- Type: `boolean ` , Default: `false`
905
-
906
- *nvim-tree.view.mappings.list*
907
- A list of keymaps that will extend or override the default keymaps.
908
- Type: `table`
909
- Default: see | nvim-tree-mappings-legacy |
910
-
911
872
*nvim-tree.view.float*
912
873
Configuration options for floating window
913
874
@@ -1827,21 +1788,6 @@ config.mappings.default_on_attach({bufnr})
1827
1788
Parameters: ~
1828
1789
• {bufnr} (number) nvim-tree buffer number passed to | nvim-tree.on_attach |
1829
1790
1830
- config.mappings.active() *nvim-tree-api.config.mappings.active()*
1831
- Deprecated: only functions when using legacy | nvim-tree.view.mappings |
1832
- Retrieve a clone of the currently active mappings: defaults + user.
1833
- Changing the active mappings will require a call to | nvim-tree-setup |
1834
-
1835
- Return: ~
1836
- (table) as per | nvim-tree.view.mappings.list |
1837
-
1838
- config.mappings.default() *nvim-tree-api.config.mappings.default()*
1839
- Deprecated: only functions when using legacy | nvim-tree.view.mappings |
1840
- Retrieve a clone of the default mappings.
1841
-
1842
- Return: ~
1843
- (table) as per | nvim-tree.view.mappings.list |
1844
-
1845
1791
*nvim-tree-api.config.mappings.get_keymap()*
1846
1792
config.mappings.get_keymap()
1847
1793
Retrieves all buffer local mappings for nvim-tree.
@@ -2019,57 +1965,6 @@ Alternatively, you may apply these default mappings from your |nvim-tree.on_atta
2019
1965
-- your removals and mappings go here
2020
1966
end
2021
1967
<
2022
- ==============================================================================
2023
- 6.2 LEGACY MAPPINGS *nvim-tree-mappings-legacy*
2024
-
2025
- nvim-tree mappings were provided via the deprecated | nvim-tree.view.mappings |
2026
- and | nvim-tree.remove_keymaps |
2027
-
2028
- These are ignored when | nvim-tree.on_attach | is present.
2029
-
2030
- You are encouraged to migrate you existing legacy mappings to
2031
- | nvim-tree.on_attach | using | :NvimTreeGenerateOnAttach |
2032
-
2033
- Please visit https://github.com/nvim-tree/nvim-tree.lua/wiki/Migrating-To-on_attach
2034
-
2035
- `view .mappings.list ` is a table of:
2036
- {key} (string| table of string) mandatory | {lhs} |.
2037
-
2038
- {action} (string) mandatory name of the action.
2039
- `" " ` to remove an action with {key} . The case of {key} must
2040
- exactly match the action you are removing e.g. `' <Tab>' ` to
2041
- remove the default preview action.
2042
- An arbitrary description when using `action_cb` .
2043
-
2044
- {action_cb} (function) optional custom function that will be called.
2045
- Receives the node as a parameter.
2046
- Non-empty description for `action` is required.
2047
-
2048
- {mode} (string) optional mode as per | nvim_set_keymap | .
2049
- Default `' n' ` .
2050
-
2051
- Examples:
2052
- >
2053
- local function print_node_path(node)
2054
- print(node.absolute_path)
2055
- end
2056
-
2057
- ----
2058
-
2059
- view = {
2060
- mappings = {
2061
- list = {
2062
- -- remove a default mapping for cd
2063
- { key = "<2-RightMouse>", action = "" },
2064
-
2065
- -- add multiple normal mode mappings for edit
2066
- { key = { "<CR>", "o" }, action = "edit", mode = "n" },
2067
-
2068
- -- custom action
2069
- { key = "p", action = "print_the_node_path", action_cb = print_node_path },
2070
-
2071
- ----
2072
- <
2073
1968
==============================================================================
2074
1969
7. HIGHLIGHT GROUPS *nvim-tree-highlight*
2075
1970
0 commit comments