diff --git a/doc/nvim-tree-lua.txt b/doc/nvim-tree-lua.txt index 6fd01f18f1b..347b58e9bc8 100644 --- a/doc/nvim-tree-lua.txt +++ b/doc/nvim-tree-lua.txt @@ -879,6 +879,13 @@ 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+). +Persistent storage is located in +`vim.fn.stdpath("data") .. "/nvim-tree-session.json"`. + ============================================================================== Legacy *nvim-tree-legacy* @@ -1911,11 +1918,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* @@ -2221,7 +2223,6 @@ Following is the default configuration, see |nvim_tree.config| for details. >lua persist = false, }, experimental = { - session_restore_nvim = true }, log = { enable = false, diff --git a/lua/nvim-tree/_meta/config/experimental.lua b/lua/nvim-tree/_meta/config/experimental.lua index 6eee1dcdec9..da8467cf0a3 100644 --- a/lua/nvim-tree/_meta/config/experimental.lua +++ b/lua/nvim-tree/_meta/config/experimental.lua @@ -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. diff --git a/lua/nvim-tree/autocmd.lua b/lua/nvim-tree/autocmd.lua index e530cc52e9d..3d9668537fe 100644 --- a/lua/nvim-tree/autocmd.lua +++ b/lua/nvim-tree/autocmd.lua @@ -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() diff --git a/lua/nvim-tree/config.lua b/lua/nvim-tree/config.lua index 43e11f682d5..24d87c389a2 100644 --- a/lua/nvim-tree/config.lua +++ b/lua/nvim-tree/config.lua @@ -297,7 +297,6 @@ M.d = { -- config-default-start persist = false, }, experimental = { - session_restore_nvim = true }, log = { enable = false,