From 3d8912ca53e6407063d07bad0e14d9e12c476f16 Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Tue, 1 Mar 2022 07:33:24 +1100 Subject: [PATCH] add more sensible defaults for window_picker.excludes (#1027) --- README.md | 7 ++----- doc/nvim-tree-lua.txt | 14 +++++++------- lua/nvim-tree/actions/open-file.lua | 7 ++----- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 6a15eb65..b0d2161c 100644 --- a/README.md +++ b/README.md @@ -175,11 +175,8 @@ require'nvim-tree'.setup { enable = true, chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", exclude = { - filetype = { - "notify", - "packer", - "qf" - } + filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame", }, + buftype = { "nofile", "terminal", "help", }, } } } diff --git a/doc/nvim-tree-lua.txt b/doc/nvim-tree-lua.txt index cc73aba6..03fb10e5 100644 --- a/doc/nvim-tree-lua.txt +++ b/doc/nvim-tree-lua.txt @@ -141,11 +141,8 @@ function. enable = true, chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", exclude = { - filetype = { - "notify", - "packer", - "qf" - } + filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame", }, + buftype = { "nofile", "terminal", "help", }, } } }, @@ -428,10 +425,13 @@ Here is a list of the options available in the setup call: default: `"ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"` - |actions.open_file.window_picker.exclude|: Table of buffer option names - mapped to a list of option values taht indicates to the picker that the + mapped to a list of option values that indicates to the picker that the buffer's window should not be selectable. type: `table` - default: `{ filetype = { "packer", "qf", "notify" } }` + default: `{` + `filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame", },` + `buftype = { "nofile", "terminal", "help", }` + `}` ============================================================================== OPTIONS *nvim-tree-options* diff --git a/lua/nvim-tree/actions/open-file.lua b/lua/nvim-tree/actions/open-file.lua index 97c5164a..204cb827 100644 --- a/lua/nvim-tree/actions/open-file.lua +++ b/lua/nvim-tree/actions/open-file.lua @@ -10,11 +10,8 @@ local M = { enable = true, chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", exclude = { - filetype = { - "notify", - "packer", - "qf" - } + filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame", }, + buftype = { "nofile", "terminal", "help", }, } } }