diff --git a/CHANGELOG.md b/CHANGELOG.md index aad6e58..6e62294 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -86,6 +86,11 @@ - New outline window can be opened when no providers are found. A message is displayed in the outline buffer. Same goes for refreshing outline during buffer switches. +- Config option `autofold_depth = 1` is now the default. To restore previous + behaviour set it to `false` (`nil` will NOT work). Reason being that it is + rarely beneficial to show neighboring symbol locations (sometimes even same + line!) when opening outline with the intention of getting an overall view of + the file and jumping elsewhere. ### Fixes diff --git a/README.md b/README.md index 62c84db..80c2995 100644 --- a/README.md +++ b/README.md @@ -274,8 +274,8 @@ Pass a table to the setup call with your configuration options. }, symbol_folding = { - -- Depth past which nodes will be folded by default - autofold_depth = nil, + -- Depth past which nodes will be folded by default. Set to false to unfold all on open. + autofold_depth = 1, -- When to auto unfold nodes auto_unfold = { -- Auto unfold currently hovered symbol @@ -884,6 +884,8 @@ unless specified otherwise. ### Unfold others +(Now a default behaviour, different to symbols-outline.nvim.) + Unfold all others except currently hovered item. ```lua @@ -896,6 +898,14 @@ symbol_folding = { ```
outline window showing auto fold depth
+### Unfold entire symbol tree by default + +```lua +symbol_folding = { + autofold_depth = false, +}, +``` + ### Auto-unfold when there's only two (or any number of) root nodes ```lua diff --git a/lua/outline/config.lua b/lua/outline/config.lua index 9d19f98..920f39e 100644 --- a/lua/outline/config.lua +++ b/lua/outline/config.lua @@ -60,7 +60,7 @@ M.defaults = { winblend = 0, }, symbol_folding = { - autofold_depth = nil, + autofold_depth = 1, auto_unfold = { hovered = true, ---@type boolean|integer