Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions doc/nvim-tree-lua.txt
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,11 @@ keep using |netrw| without its browser features please ensure:
|nvim_tree.config| {disable_netrw}` = false`
|nvim_tree.config| {hijack_netrw}` = true`

==============================================================================
Sessions *nvim-tree-sessions*

nvim-tree restores its buffers when restoring vim sessions (for nvim 0.13+).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a note about where the file is saved, similar to nvim-tree-config-bookmarks?

==============================================================================
Legacy *nvim-tree-legacy*

Expand Down Expand Up @@ -1911,11 +1916,6 @@ Config: experimental *nvim-tree-config-experimental*
In the event of a problem please disable the experiment and raise an
issue.

Fields: ~
• {session_restore_nvim}? (`boolean`, default: `true`) Restore
nvim-tree buffers when restoring vim sessions
(requires 0.13+).

==============================================================================
Config: log *nvim-tree-config-log*

Expand Down Expand Up @@ -2221,7 +2221,6 @@ Following is the default configuration, see |nvim_tree.config| for details. >lua
persist = false,
},
experimental = {
session_restore_nvim = true
},
log = {
enable = false,
Expand Down
3 changes: 0 additions & 3 deletions lua/nvim-tree/_meta/config/experimental.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ error("Cannot require a meta file")
---
---@class nvim_tree.config.experimental
---
---Restore nvim-tree buffers when restoring vim sessions (requires 0.13+).
---(default: `true`)
---@field session_restore_nvim? boolean
--Example below for future reference:
--
--Buffers opened by nvim-tree will use with relative paths instead of absolute.
Expand Down
2 changes: 1 addition & 1 deletion lua/nvim-tree/autocmd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function M.global()
end,
})

if vim.fn.has("nvim-0.13") == 1 and config.g.experimental.session_restore_nvim then
if vim.fn.has("nvim-0.13") == 1 then
vim.api.nvim_create_autocmd("SessionWritePre", { ---@diagnostic disable-line: param-type-mismatch
group = augroup_id,
callback = function()
Expand Down
1 change: 0 additions & 1 deletion lua/nvim-tree/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ M.d = { -- config-default-start
persist = false,
},
experimental = {
session_restore_nvim = true
},
log = {
enable = false,
Expand Down
Loading