Skip to content

A company-mode backend for autocompletion of Font Awesome class names, with previews !

Notifications You must be signed in to change notification settings

ameuret/company-fontawesome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

company-fontawesome.el

A company-mode backend to autocomplete font awesome CSS class names with icon previz ! 😝

Actual FA icons shown in selection list

Setup

Dependencies

This backend depends on the all-the-icons package and the presence of the [https://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)

FAQ

The wrong icon is displayed:

Wrong icon is shown in selection list

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.

Caveat Emptor

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. 😁

TODO

  • 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

Contribute

Don't hesitate to ask if you have ideas or wishes, I'll do my best.

Acks

My thanks go to Will Boyd (@lonekorean) for provoking me into the discovery of Emacs Lisp, just for the occasion.

About

A company-mode backend for autocompletion of Font Awesome class names, with previews !

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published