-
-
Notifications
You must be signed in to change notification settings - Fork 33
feat(ui): add auto_width option for dynamic outlinewindow-resizing
#155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Added a `shrinkwrap` conf to `outline_window` allowing the outline sidebarwidth to dynamically adjust, based on contentsize. New options include `enabled`, `max_width`, and `width_include_inlay`
Added documentation for the new `shrinkwrap` config under `outline_window` in both README and vimdoc, changed default enabled state to disabled to ensure backwardscompatibility
Renamed outwardfacing vars and options to be more concise and easier to understand intuitively
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds an auto_width configuration option to enable dynamic resizing of the outline window based on content width, addressing Issue #141.
- Adds
auto_widthconfig with options for enabling, max width, and inlay hints inclusion - Implements dynamic width calculation and window resizing in
Sidebar:build_outline() - Updates documentation in README and help text
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| lua/outline/sidebar.lua | Adds max_line_size field tracking, implements update_width() method, and integrates width calculation during outline building |
| lua/outline/config.lua | Adds auto_width configuration table with defaults for enabled, max_width, and include_inlay_hints |
| doc/outline.txt | Documents new auto_width configuration options and clarifies width behavior |
| README.md | Documents new auto_width configuration options and clarifies width behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| enabled = false, | ||
| -- Maximum width (columns or percent if relative_width) | ||
| max_width = 40, | ||
| -- Include inlay-details in widthcalculation |
Copilot
AI
Dec 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space in 'widthcalculation'. Should be 'width calculation'.
| -- Include inlay-details in widthcalculation | |
| -- Include inlay-details in width calculation |
| -- Percentage or integer of columns | ||
| -- Percentage or integer of columns, sets min-width for auto_width option | ||
| width = 25, | ||
| -- Note: When auto_width is enabled, 'width' acts as the minimum windowwidth |
Copilot
AI
Dec 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space in 'windowwidth'. Should be 'window width'.
| -- Note: When auto_width is enabled, 'width' acts as the minimum windowwidth | |
| -- Note: When auto_width is enabled, 'width' acts as the minimum window width |
| enabled = false, | ||
| -- Maximum width (columns or percent if relative_width) | ||
| max_width = 40, | ||
| -- Include inlay-details in widthcalculation |
Copilot
AI
Dec 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space in 'widthcalculation'. Should be 'width calculation'.
| -- Include inlay-details in widthcalculation | |
| -- Include inlay-details in width calculation |
| -- Percentage or integer of columns | ||
| -- Percentage or integer of columns, sets min-width for auto_width option | ||
| width = 25, | ||
| -- Note: When auto_width is enabled, 'width' acts as minimum windowwidth |
Copilot
AI
Dec 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space in 'windowwidth'. Should be 'window width'.
| -- Note: When auto_width is enabled, 'width' acts as minimum windowwidth | |
| -- Note: When auto_width is enabled, 'width' acts as minimum window width |
Hi, this MR tries to implement Issue #141 by adding an
auto_widthoption for the outline window. This allows the window width to automatically fit the longest entry, with an option to include or exclude inlay text in the calculation.The new feature is disabled by default to not interfere with existing configurations. Otherwise no breaking changes should have been introduced.
Summary of changes:
auto_widthconfiginclude_inlay_hints)Let me know if you have any feedback or suggestions!