nvimdev / nvimdev/lspsaga.nvim

Add ability to open / close all items in Outline

Open
#1,435 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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.
I'm a big fan of the outline feature, but I think it could be improved. My use case is to open the outline to get a high-level overview of the file. The outline view opens by default with all items expanded, and therefore I have to go to each item and toggle it to a closed state with 'o'.

Describe the solution you'd like
I would prefer a way to open the outline with all details not shown
, so that I'm only seeing the top-level items of the outline.

Describe alternatives you've considered
I tried using the typical vim fold commands, but that didn't do what I wanted. Really, what I'm asking for is something like the fold commands, where I can expand everything, collapse everything, or expand/collapse one level, on one particular item.

Additional context
Create some method to easily toggle between these two states

02-small
01-small

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No implementation file or test is named. Start by locating the Outline feature's entry point and how its current item toggling works; then determine how to expose expand-all, collapse-all, and one-level expand/collapse actions. Done means the outline can switch between all-expanded and top-level-only views, with the requested per-item and per-level 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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.