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: More flexible way to disable lualine or enable extensions #1217

Open
9ary opened this issue Mar 25, 2024 · 0 comments
Open

Feat: More flexible way to disable lualine or enable extensions #1217

9ary opened this issue Mar 25, 2024 · 0 comments
Labels
new feature New feature or feature request

Comments

@9ary
Copy link

9ary commented Mar 25, 2024

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

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.

@9ary 9ary added the new feature New feature or feature request label Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or feature request
Projects
None yet
Development

No branches or pull requests

1 participant