Open 9ary opened 3 months ago
Currently lualine can only disable itself (or enable an extension) based on filetype. I'd like to be able to check for other things like variables, or even better, provide a custom filter function.
Plugins don't always use their own filetypes for their buffers. For example, undotree uses diff for its diff panel, but it also sets b:isUndotreeBuffer, so those buffers can still be identified easily, but lualine is currently incapable of recognizing this. https://github.com/mbbill/undotree/blob/aa93a7e5890dbbebbc064cd22260721a6db1a196/autoload/undotree.vim#L559-L561
diff
b:isUndotreeBuffer
See also airline's extension for this plugin: https://github.com/vim-airline/vim-airline/blob/master/autoload/airline/extensions/undotree.vim It looks for t:undotree instead, but the idea is the same.
t:undotree
Requested feature
Currently lualine can only disable itself (or enable an extension) based on filetype. I'd like to be able to check for other things like variables, or even better, provide a custom filter function.
Motivation
Plugins don't always use their own filetypes for their buffers. For example, undotree uses
diff
for its diff panel, but it also setsb:isUndotreeBuffer
, so those buffers can still be identified easily, but lualine is currently incapable of recognizing this. https://github.com/mbbill/undotree/blob/aa93a7e5890dbbebbc064cd22260721a6db1a196/autoload/undotree.vim#L559-L561See also airline's extension for this plugin: https://github.com/vim-airline/vim-airline/blob/master/autoload/airline/extensions/undotree.vim It looks for
t:undotree
instead, but the idea is the same.