Skip to content

Commit 05943cf

Browse files
committed
docs: update README, add netrw config option
1 parent c5502d4 commit 05943cf

File tree

3 files changed

+35
-27
lines changed

3 files changed

+35
-27
lines changed

.styluaignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
defaults.lua
1+
**/defaults.lua

README.md

+28-19
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,7 @@ knowingly push a breaking change and interrupt your day. Bugs happen, but
1313
breaking changes can always be avoided. When breaking changes are needed, there
1414
will be a new branch that you can opt into, when it is a good time for you.
1515

16-
As of v1.30, a breaking change is defined as anything that _changes_ existing:
17-
18-
- vim commands (`:NeoTreeShow`, `:NeoTreeReveal`, etc)
19-
- configuration options that are passed into the `setup()` function
20-
- `NeoTree*` highlight groups
21-
- lua functions exported in the following modules that are not prefixed with `_`:
22-
* `neo-tree`
23-
* `neo-tree.events`
24-
* `neo-tree.sources.manager`
25-
* `neo-tree.sources.*` (init.lua files)
26-
* `neo-tree.sources.*.commands`
27-
* `neo-tree.ui.renderer`
28-
* `neo-tree.utils`
29-
30-
If there are other functions you would like to use that are not yet considered
31-
part of the public API, please open an issue so we can discuss it.
16+
See [What is a Breaking Change?](#what-is-a-breaking-change) for details.
3217

3318

3419
### User Experience GOOD :slightly_smiling_face: :thumbsup:
@@ -103,10 +88,15 @@ use {
10388
show_hidden = false,
10489
respect_gitignore = true,
10590
},
106-
follow_current_file = false, -- This will find and focus the file in the
107-
-- active buffer every time the current file is changed while the tree is open.
91+
follow_current_file = false, -- This will find and focus the file in the active buffer every
92+
-- time the current file is changed while the tree is open.
10893
use_libuv_file_watcher = false, -- This will use the OS level file watchers
109-
-- to detect changes instead of relying on nvim autocmd events.
94+
-- to detect changes instead of relying on nvim autocmd events.
95+
hijack_netrw_behavior = "open_default", -- netrw disabled, opening a directory opens neo-tree
96+
-- in whatever position is specified in window.position
97+
-- "open_split", -- netrw disabled, opening a directory opens within the
98+
-- window like netrw would, regardless of window.position
99+
-- "disabled", -- netrw left alone, neo-tree does not handle opening dirs
110100
window = {
111101
position = "left",
112102
width = 40,
@@ -394,6 +384,25 @@ configurable and take either strings, tables, or functions. You can take sane
394384
defaults or build your tree items from scratch. There should be the ability to
395385
add any features you can think of through existing hooks in the setup function.
396386

387+
## What is a Breaking Change?
388+
389+
As of v1.30, a breaking change is defined as anything that _changes_ existing:
390+
391+
- vim commands (`:NeoTreeShow`, `:NeoTreeReveal`, etc)
392+
- configuration options that are passed into the `setup()` function
393+
- `NeoTree*` highlight groups
394+
- lua functions exported in the following modules that are not prefixed with `_`:
395+
* `neo-tree`
396+
* `neo-tree.events`
397+
* `neo-tree.sources.manager`
398+
* `neo-tree.sources.*` (init.lua files)
399+
* `neo-tree.sources.*.commands`
400+
* `neo-tree.ui.renderer`
401+
* `neo-tree.utils`
402+
403+
If there are other functions you would like to use that are not yet considered
404+
part of the public API, please open an issue so we can discuss it.
405+
397406
## Contributions
398407

399408
Contributions are encouraged. Please see [CONTRIBUTING](CONTRIBUTING.md) for more details.

lua/neo-tree/defaults.lua

+6-7
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,13 @@ local config = {
7272
filesystem = {
7373
hijack_netrw_behavior = "open_default", -- netrw disabled, opening a directory opens neo-tree
7474
-- in whatever position is specified in window.position
75-
-- "open_split", -- netrw disabled, opening a directory opens within the
75+
-- "open_split", -- netrw disabled, opening a directory opens within the
7676
-- window like netrw would, regardless of window.position
77-
-- "disabled", -- netrw left alone, neo-tree does not handle opening dirs
78-
follow_current_file = false, -- This will find and focus the file in the active buffer
79-
-- every time the current file is changed while the tree
80-
-- is open.
81-
use_libuv_file_watcher = false, -- This will use the OS level file watchers to detect
82-
-- changes instead of relying on nvim autocmd events.
77+
-- "disabled", -- netrw left alone, neo-tree does not handle opening dirs
78+
follow_current_file = false, -- This will find and focus the file in the active buffer every time
79+
-- the current file is changed while the tree is open.
80+
use_libuv_file_watcher = false, -- This will use the OS level file watchers to detect changes
81+
-- instead of relying on nvim autocmd events.
8382
window = { -- see https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/popup
8483
-- for possible options. These can also be functions that return these
8584
-- options.

0 commit comments

Comments
 (0)