neo-tree.nvim icon indicating copy to clipboard operation
neo-tree.nvim copied to clipboard

feat(filter): custom title

Open sand4rt opened this issue 1 year ago • 9 comments

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
    }
}

sand4rt avatar May 31 '24 00:05 sand4rt

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

miversen33 avatar May 31 '24 01:05 miversen33

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

done

sand4rt avatar May 31 '24 01:05 sand4rt

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

sand4rt avatar May 31 '24 01:05 sand4rt

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 avatar May 31 '24 01:05 miversen33

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 :)

miversen33 avatar May 31 '24 01:05 miversen33

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 avatar May 31 '24 10:05 sand4rt

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?

sand4rt avatar May 31 '24 10:05 sand4rt

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 avatar May 31 '24 14:05 miversen33

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.

miversen33 avatar May 31 '24 14:05 miversen33