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

adding file icons #244

Merged
merged 5 commits into from
Sep 6, 2024
Merged

adding file icons #244

merged 5 commits into from
Sep 6, 2024

Conversation

MagicDuck
Copy link
Owner

fixes #182

@MagicDuck MagicDuck merged commit 16d1458 into main Sep 6, 2024
5 checks passed
@MagicDuck MagicDuck deleted the file-icons branch September 6, 2024 21:52
Comment on lines +42 to +54
local found, lib = pcall(require, 'mini.icons')
if not found then
return nil
end
-- according to mini.icons docs, need to check this
-- to make sure setup has been called!
-- selene: allow(global_usage)
---@diagnostic disable-next-line
if not _G.MiniIcons then
return nil
end

return lib

Choose a reason for hiding this comment

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

@MagicDuck, hi! Saw your Reddit post about adding support for 'mini.icons' and decided to see if it does the _G.MiniIcons check. It does, thanks for reading 'mini.icons' help page :)

One thing I'd like to mention is that this whole get_lib can be compressed to a single return _G.MiniIcons. This object is both an indication that user has run require('mini.icons').setup() (i.e. opted in for using it and not only has it available from the full 'mini.nvim' install) and the whole require('mini.icons') table itself.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Haha, no problem! Thank you for building mini.icons! :)
I’ll make a note for myself to update this if I get a chance.

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.

feature(icons): Add file path icon on search result pane
2 participants