Skip to content
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

feat(filter): custom title #1489

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

sand4rt
Copy link
Contributor

@sand4rt sand4rt commented May 31, 2024

allows a custom filter title:

window = {
    mappings = {
        ["/"] = { "fuzzy_finder", config = { title = "CUSTOM TITLE" } },
        
        ["o"] = { "show_help", config = { title = "Help", } }, -- NOTE: other popups do have this function
    }
}

@miversen33
Copy link
Collaborator

Please add something about this in the doc at least as well. Remember that undocumented features will end up never being used ;)

Copy link
Collaborator

@miversen33 miversen33 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason this isn't also added to filters/init.lua?

@sand4rt
Copy link
Contributor Author

sand4rt commented May 31, 2024

Please add something about this in the doc at least as well. Remember that undocumented features will end up never being used ;)

done

@sand4rt
Copy link
Contributor Author

sand4rt commented May 31, 2024

Any reason this isn't also added to filters/init.lua?

Was not sure what keymap triggers that function? I've never seen those popups

@miversen33
Copy link
Collaborator

I was talking about the vim helpdoc as there is a section specifically calling out "custom mappings" which is where this would be used.

@miversen33
Copy link
Collaborator

IIRC common is what external sources will fall under. So any external source that doesn't implement the show_filter function will be provided that function by neo-tree on source load. By not including this option there, we are adding a "neo-tree only" feature that is inaccessible to external sources. Personal motivation aside, we should try to not do that :)

@sand4rt
Copy link
Contributor Author

sand4rt commented May 31, 2024

I was talking about the vim helpdoc as there is a section specifically calling out "custom mappings" which is where this would be used.

@miversen33 i've added the docs what do you think?

@sand4rt
Copy link
Contributor Author

sand4rt commented May 31, 2024

IIRC common is what external sources will fall under. So any external source that doesn't implement the show_filter function will be provided that function by neo-tree on source load. By not including this option there, we are adding a "neo-tree only" feature that is inaccessible to external sources. Personal motivation aside, we should try to not do that :)

Uhmm, im not sure what the best option is here. I think it's best if you make a decision on this, as aim fairly new to nvim/lua. Would you like me to adjust filters/init.lua as well?

@miversen33
Copy link
Collaborator

I was talking about the vim helpdoc as there is a section specifically calling out "custom mappings" which is where this would be used.

@miversen33 i've added the docs what do you think?

LGTM, Thanks!

@miversen33
Copy link
Collaborator

IIRC common is what external sources will fall under. So any external source that doesn't implement the show_filter function will be provided that function by neo-tree on source load. By not including this option there, we are adding a "neo-tree only" feature that is inaccessible to external sources. Personal motivation aside, we should try to not do that :)

Uhmm, im not sure what the best option is here. I think it's best if you make a decision on this, as aim fairly new to nvim/lua. Would you like me to adjust filters/init.lua as well?

I am going to leave this up to @pysan3 to decide on. IMO it makes sense to expose this option to external sources as well, but I could also be completely wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants