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!: abstract icon getter functions #10

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

librephoenix
Copy link

This PR abstracts the icon getter functions into two new variables: magit-file-icons-icon-for-file-func and magit-file-icons-icon-for-dir-func which will allow the package to support icon backends other than nerd-icons. These functions default to using nerd-icons functions for compatibility, but can be overriden with custom functions from any icon backend.

This removes the dependency on nerd-icons, which will break user config if they are using nerd-icons and have not called (require 'nerd-icons) before loading the package.

This also updates the documentation with an example (using all-the-icons) and updates the test files so tests can still run. The tests are only run using nerd-icons, however.

Hopefully this is an improvement over #5, so let me know what you think! Thanks!

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.

1 participant