-
Notifications
You must be signed in to change notification settings - Fork 20
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
adding file icons #244
Conversation
a96311c
to
d7aac48
Compare
d7aac48
to
8b963f5
Compare
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
fixes #182