A company-mode backend to autocomplete font awesome CSS class names with icon previz ! 😝
This backend depends on the all-the-icons
package and the presence of the [http://fontawesome.io/](Font Awesome font) in your system.
Copy company-fontawesome.el
somewhere in your load-path
then
execute the following:
(require 'company-fontawesome)
(add-to-list 'company-backends 'company-fontawesome)
(and / or add it to your init file)
The wrong icon is displayed:
Disable the conflicting font (usually one of font-mfizz or octicons)
if you can't live with it until I find a way to force company-mode
to display the completion list using the Font Awesome face exclusively.
I finished the first iteration of this plug-in 90 minutes after writing my first
(message "Hello, world!")
Emacs Lisp program. And it was 2am. Expect
rough edgez. 😁
- Cache candidates !
- [ ] Offer to insert the character instead of the class name - Add completions for the modifier class names (e.g. fa-spin, fa-border, etc.)
- Add synonyms, e.g. magnifier / search from the FA metadata
- Steal more ideas from Will Boyd
- Properly package for MELPA
Don't hesitate to ask if you have ideas or wishes, I'll do my best.
My thanks go to Will Boyd (@lonekorean) for provoking me into the discovery of Emacs Lisp, just for the occasion.