Skip to content

Conversation

@miversen33
Copy link
Collaborator

RE: #479

Replaces source_selector.tab_labels with source_selector.sources.

Why? This allows users to have much more choice over the things that are displayed in their source selector. Previously, all sources in Neo-tree were added to the source selector and there was no way to remove any of them. This will get especially painful as Neo-tree grows and more developers write sources for it.

Additionally I added some logic to ensure that if source_selector is active, (IE one of the display bar options is enabled), that the first option in source selector is set to the default_source so that when users execute :Neotree, their source selector properly displays the first item in the sources.

Lastly, I fixed a few logs that had invalid function names in them, and updated the name of a mispelled variable because it annoyed me lol.

Please let me know your feedback!

Tagging users from #479 that participated as that PR was closed:
@cseickel @mrbjarksen @pysan3 @mehalter

@miversen33 miversen33 requested a review from cseickel April 16, 2023 20:24
@miversen33 miversen33 added the enhancement New feature or request label Apr 16, 2023
@miversen33
Copy link
Collaborator Author

I might consider this a breaking change as even though I added the migration path from source_selector.tab_labels to source_selector.sources I did still remove tab_labels.

@miversen33 miversen33 added the breaking-change Code that changes the config or public API. label Apr 16, 2023
@miversen33
Copy link
Collaborator Author

Also, I am not terribly keen on source_selector.sources so if anyone has a better name for that variable, lemme know! Maybe something like source_selector.display_sources? Idk, sources made the most sense when making this but it might get confusing as there is also a top level sources key that is going to have different values than source_selector.sources.

@cseickel
Copy link
Contributor

Also, I am not terribly keen on source_selector.sources so if anyone has a better name for that variable, lemme know!

I think it's a good name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Code that changes the config or public API. enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants