-
Notifications
You must be signed in to change notification settings - Fork 18
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
Improvements from symbols-outline.nvim and ⚠️ breaking changes #12
Labels
Comments
hedyhli
changed the title
List of changes to original symbols-outline before fork detach
List of changes from original symbols-outline before fork detach, and related issues from upstream
Nov 12, 2023
It looks there are a lot more people migrating from symbols-outline.nvim to outline.nvim than elsewhere, I've included a script that can convert the setup opts into the new structure. |
hedyhli
changed the title
List of changes from original symbols-outline before fork detach, and related issues from upstream
Improvements from symbols-outline.nvim and ⚠️ breaking changes
Nov 15, 2023
Since github support has now detached my fork from symbols-outline.nvim, new changes from now on will be in CHANGELOG.md. |
1 task
folke
pushed a commit
to LazyVim/LazyVim
that referenced
this issue
Jul 5, 2024
## What is this PR for? The symbols-outline extra was removed in favor of outline.nvim in #2535 (thanks!), but the configuration for symbols in outline.nvim [is not backwards-compatible](hedyhli/outline.nvim#12). This fixes the configuration for the symbols icons and filter to be usable by outline.nvim. <!-- Describe the big picture of your changes to communicate to the maintainers why we should accept this pull request. --> ## Does this PR fix an existing issue? <!-- If this PR fixes any issues, please link to the issue here. Fixes #<issue_number> --> It doesn't seem like anyone has encountered this issue, but I can confirm that the config currently used by LazyVim is incorrect. The symbols table is at `symbols` for symbols-outline.nvim, but it's now at `symbols.icons` for outline.nvim. There is no such `symbols_blacklist` key. Instead, `symbols.filter` is used, which is a kind of "whitelist". Coincidentally, outline.nvim fully supports the LazyVim `kind_filter` config table structure. It can either be a list of strings (kinds), or a list of strings for each filetype key. Setting to nil or false makes it so all symbols are included, just like in LazyVim. See [the docs on the `symbols.filter`](https://github.com/hedyhli/outline.nvim?tab=readme-ov-file#symbols-table) structure. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment documents changes from upstream before github detaches the fork into a proper repo.
Fixes
OutlineClose
crashing when already closed: fix: plugin crashes when SymbolOutlineClose used simrat39/symbols-outline.nvim#163code_actions
: fix(code_actions): use the builtincode_action
simrat39/symbols-outline.nvim#168 (Getting errors when trying to rename functions or use code actions. simrat39/symbols-outline.nvim#123)_highlight_current_item
function checking provider on outline window^(#+)(%s+)$
being listed in the outline.🛑 Breaking changes
The fork has been renamed to outline.nvim for the following reasons:
symbols-outline
is a great name, usingSymbolsOutline*
everywhere as a prefix for commands and highlight groups is quite long to type.outline
import path.outline.nvim
does not use this import path.Regardless of this rename, I am eternally grateful to @simrat39 for their work in the original symbols-outline.nvim. This plugin would not exist without it.
What this means for you:
SymbolsOutline*
prefix should now useOutline*
symbols-outline
tooutline
Here are other breaking changes:
If your existing config uses the mentioned features, you can convert the setup opts using this script.
Config: Configuration options have been significantly restructured to
provide better consistency and understandability. Please see the default config for an example of the full list.
outline_window
table;outline_items
preview_window
.symbols.icons
, symbol blacklists are insymbols.blacklist
providers.lsp.blacklist_clients
.symbol_folding
withfold_markers
beingsymbol_folding.markers
, consistent toguides.markers
.The reasoning for the above is simple. When you see 'border' under
preview_window
you can directly infer it controls the border for the preview window. Previously, for example, when you seewinblend
orwrap
: is it for the outline window or the preview window? Furthermore, this change also aids extensibility to the configuration, and avoids cluttering the root setup opts namespace.If you disagree with this decision, you are always free to switch back to the original symbols-outline.nvim, or you could pin a commit in this fork if you still want to use the features and fixes from here.
Config:
keymaps.focus_location
RENAMED tokeymaps.peek_location
to avoid confusion with focus window commands.Config: Marker icons used for guides can now be customized.
show_guides
REMOVED in favor ofguides.enabled
.You can set
guides = false
to disable guides altogether, or setguides = true
to enable it but use default configuration for the guides. Otherwise, please useguides.enabled
if your configuration forguides
is a table.Behaviour: Removed hover floating window from
toggle_preview
.open_hover_on_preview=true
(false by default) so that thehover_symbol
action can be triggered whentoggle_preview
is triggered.Behaviour: When
auto_close=true
only auto close ifgoto_location
is used (where focus changed), and not forfocus_location
(Do not close outline when focus_location occurs simrat39/symbols-outline.nvim#119).Behaviour: For
auto_preview=true
, previously preview is only shown after some delay. Now preview is shown instantly every time the cursor moves.(66aecc7) Algorithms in parser and writer modules have been rewritten for better performance. Various exported functions have been removed. Everything seems to work the same but because of this major rewrite some things may break which I've missed
Features
Below is a list of features I've included in this fork which, at the time of writing, has not been included upstream (in the original repo). I try my best to keep this list up to date.
Features/Changes:
Toggling folds (and added default keymaps for it) ([request] Toggle fold simrat39/symbols-outline.nvim#194).
Control focus between outline and code window.
Focus,FocusOutline,FocusCode
(seecommands
Symbols Outline
panel simrat39/symbols-outline.nvim#207Show line number of each symbol in outline window (see recipes for a screenshot)
Cursorline option for the outline window.
Added function and command to show provider and outline window status, somewhat like
:LspInfo
.Move down/up by one line and peek_location immediately, default bindings are
<C-j>
and<C-k>
just like Aerial.Flash highlight when using goto/peek location.
Auto jump config option (see config
auto_goto
) (auto_jump config param simrat39/symbols-outline.nvim#229, Jump to symbol when the cursor moves simrat39/symbols-outline.nvim#228).New Follow command, opposite of
goto_location
/focus_location
New restore location keymap option to go back to corresponding outline location synced with code (see config
restore_location
).Outline/Preview window border/background/winhighlight configuration. ([Question] Possible to change bg colour of main window? simrat39/symbols-outline.nvim#136). See
outline_window.winhl
,preview_window.winhl
,preview_window.*width
options.All highlights used including the virtual text for symbol details and symbol lineno are now fully customizable using
outline_window.winhl
. See highlights.Option to blend cursor with cursorline (
outline_window.hide_cursor
)Option to use lspkind for icons, and use your own fetcher function. See config and tips sections in the readme.
Option for outline window split command
Screen recordings/shots of some of the features is shown at the bottom of the readme.
PRs
Key:
Distinguish between public and private function display in Elixir
(#187 by scottming)
Floating window (Draft)
(#101 by druskus20)
Show completed PRs
✅ center view on goto symbol
(#239 by skomposzczet)
Superseded by adding config option
✅ Open handler checks if view is not already open
(#235 by eyalz800)
✅ auto_jump config param
(#229 by stickperson)
Renamed to
auto_goto
for consistency✅ Update nerd fonts to 3.0
(#225 by anstadnik)
✅ fix(folding): optimize fold/unfold all
(#223 by wjdwndud0114)
✅ Support markdown setext-style headers
(#222 by msr1k)
✅ fix(icons): replace obsolete icons
(#219 by loichyan)
Superseded by #225
✅ Support ccls symbols
(#218 by rqdmap)
✅ fix: replace newlines with spaces in writer
(#204 by tbung)
✅ Make close_outline idempotent
(#200 by showermat)
Superseded by #163
✅ Fix some options
(#180 by cljoly)
✅ fix: Invalid buffer id error
(#177 by snowair)
✅ fix(code_actions): use the builtin code_action
(#168 by zjp-CN)
✅ fix: plugin crashes when SymbolOutlineClose used
(#163 by beauwilliams)
✅ feat: Add window_bg_highlight to config
(#137 by Zane-)
Improved implementation
✅ Added preview width and relative size
(#130 by Freyskeyd)
Improved upon and refactored with new config structure
✅ Improve preview, hover windows configurability and looks
(#128 by toppair)
Improved upon and refactored with new config structure
✅ Do not close outline when focus_location occurs
(#119 by M1Sports20)
✅ feat: instant_preview
(#116 by axieax)
Superseded with an improved implementation
✅ check if code_win is nill
(#110 by i3Cheese)
Superseded before this fork was created
(perhaps the PR was forgotten to be closed)
The text was updated successfully, but these errors were encountered: