nvimdev / nvimdev/lspsaga.nvim
Add option to have outline open in fully collapsed mode
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 3.8k
- Forks
- 308
- PR merge metrics
- No merged PRs in 30d
Description
Is your feature request related to a problem? Please describe.
When I use the LspSaga outline feature, I commonly want all collapsible objects to be collapsed to get a high level overview of the current file.
I have tried setting detail=false in my lspsaga setup which does not seem to do this action and I don't see any other available option in the documentation (https://nvimdev.github.io/lspsaga/outline/) that looks applicable.
Describe the solution you'd like
I would like to see an option to open the outline with every collapsable object in the collapsed state by default. It could for example look like
require('lspsaga').setup({
-- The default value of collapsed could be false to align with current behaviour
outline = { collapsed = true }
})
Describe alternatives you've considered
An alternative solution could be the already requested feature (https://github.com/nvimdev/lspsaga.nvim/issues/1435) where one has to press the "collapse all" button when using the outline.
Another possible solution would be to add a keybind which lets you jump to the next collapsible object in the list so that one can jump between high level objects in an easy way. This keybind would be useful for getting a slightly better high level overview of the file, but I belive it to be less useful for the problem at hand.
Additional context
To me, it sounds similar in scope to the already mentioned feature request of being able to collapse all items in the outline (https://github.com/nvimdev/lspsaga.nvim/issues/1435) so the two features could probably be implemented in tandem.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the outline documentation linked in the issue and review the existing setup options, especially detail. Compare the requested behavior with issue #1435 before deciding whether the features should be implemented together. Done means a documented outline option opens every collapsible object in the collapsed state without changing the current default behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100