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: add more match for bufferline icons #1270

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Parsifa1
Copy link
Contributor

@Parsifa1 Parsifa1 commented Jul 5, 2024

No description provided.

@shadmansaleh
Copy link
Member

Are these icons specific to mini.icon? Or do they exist in nvim-web-devicons?

elseif self.filetype == 'TelescopePrompt' then
dev, _ = require('nvim-web-devicons').get_icon('telescope')
dev, _ = require('nvim-web-devicons').get_icon_by_filetype('TelescopePrompt')
elseif self.filetype == 'fugitive' then
Copy link
Contributor Author

@Parsifa1 Parsifa1 Jul 7, 2024

Choose a reason for hiding this comment

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

In fact, the original query statement does not work properly.
TelescopePrompt Never displays properly

@Parsifa1
Copy link
Contributor Author

Parsifa1 commented Jul 7, 2024

nvim-web-devicons does not provide icons for these (maybe some do), but if nvim-web-devicons cannot be queried, it will return nil, which will not have any impact.

@@ -38,12 +38,94 @@ function Buffer:get_props()
local status, _ = pcall(require, 'nvim-web-devicons')
if not status then
dev, _ = '', ''
elseif self.filetype == 'minideps-confirm' then
Copy link
Member

Choose a reason for hiding this comment

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

Can you put a comment at the start of these and at the end of these. stating the icons in this block exist in mini.icons (with link). and that it's relying on the fact that mini.icons patching nvim-web-devicons interface. Tbh this feels like an anti-pattern that they are patching other modules like this. I'm still not sure about relying on it like this. especially not without proper documentation.

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.

None yet

2 participants