diff --git a/docs/modules.org b/docs/modules.org index df245abf3..86be6c9f4 100644 --- a/docs/modules.org +++ b/docs/modules.org @@ -197,6 +197,7 @@ Aesthetic modules that affect the Emacs interface or user experience. + [[file:../modules/ui/doom/README.org][doom]] - TODO + [[file:../modules/ui/doom-dashboard/README.org][doom-dashboard]] - TODO + [[file:../modules/ui/doom-quit/README.org][doom-quit]] - TODO ++ [[file:../modules/ui/emoji/README.org][emoji]] =+ascii +github +unicode= - Adds emoji support to Emacs + fill-column - TODO + [[file:../modules/ui/hl-todo/README.org][hl-todo]] - TODO + [[file:../modules/ui/hydra/README.org][hydra]] - TODO diff --git a/init.example.el b/init.example.el index 1907d7c63..9b8400025 100644 --- a/init.example.el +++ b/init.example.el @@ -30,6 +30,7 @@ doom ; what makes DOOM look the way it does doom-dashboard ; a nifty splash screen for Emacs doom-quit ; DOOM quit-message prompts when you quit Emacs + ;;(emoji +unicode) ; 🙂 ;;fill-column ; a `fill-column' indicator hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW ;;hydra diff --git a/modules/config/default/+emacs-bindings.el b/modules/config/default/+emacs-bindings.el index 977454b41..68eb1d2dd 100644 --- a/modules/config/default/+emacs-bindings.el +++ b/modules/config/default/+emacs-bindings.el @@ -124,6 +124,7 @@ ;;; i --- insert (:prefix-map ("i" . "insert") + :desc "Emoji" "e" #'emojify-insert-emoji :desc "Current file name" "f" #'+default/insert-file-path :desc "Current file path" "F" (cmd!! #'+default/insert-file-path t) :desc "Snippet" "s" #'yas-insert-snippet diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index cd528ca80..b1bfc0191 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -453,6 +453,7 @@ ;;; i --- insert (:prefix-map ("i" . "insert") + :desc "Emoji" "e" #'emojify-insert-emoji :desc "Current file name" "f" #'+default/insert-file-path :desc "Current file path" "F" (cmd!! #'+default/insert-file-path t) :desc "Evil ex path" "p" (cmd! (evil-ex "R!echo ")) diff --git a/modules/ui/emoji/README.org b/modules/ui/emoji/README.org new file mode 100644 index 000000000..f67ed7434 --- /dev/null +++ b/modules/ui/emoji/README.org @@ -0,0 +1,56 @@ +#+TITLE: ui/emoji +#+DATE: September 30, 2020 +#+SINCE: v2.0.10 +#+STARTUP: inlineimages nofold + +* Table of Contents :TOC_3:noexport: +- [[#description][Description]] + - [[#maintainers][Maintainers]] + - [[#module-flags][Module Flags]] + - [[#plugins][Plugins]] +- [[#prerequisites][Prerequisites]] +- [[#features][Features]] +- [[#configuration][Configuration]] +- [[#troubleshooting][Troubleshooting]] + +* Description +Displays and inserts emojis (ASCII, Github style, unicode). + ++ Converts recognized text to emojis. ++ Enables inserting emojis. + +** Maintainers +This module has no dedicated maintainers. + +** Module Flags ++ =+ascii= Include plain text emojis like =:)=. ++ =+github= Include Github-style emojis like =:smile:=. ++ =+unicode= Include unicode emojis like 🙂. + +** Plugins ++ [[https://github.com/iqbalansari/emacs-emojify][emojify]] by @iqbalansari + +* Prerequisites + +See the [[https://github.com/iqbalansari/emacs-emojify/blob/master/README.org#requirements][emojify requirements]] docs: + +#+BEGIN_QUOTE +The [[https://github.com/iqbalansari/emacs-emojify][emojify]] package requires Emacs *v24.3* and above. Emacs should be compiled +with support for *PNG* images to display emojis as images. It is *recommended* +that Emacs is compiled with *ImageMagick* support. ~emojify~ will use it to +resize emojis if needed, additionally imagemagick is used to set background +color for emojis to workaround the bug described in [[https://github.com/iqbalansari/emacs-emojify/issues/7][issue 7]]. However these are +*completely optional*. + +PNG support might require some additional steps to on Windows, you might find +[[http://stackoverflow.com/questions/2650041/emacs-under-windows-and-png-files][this]] stackoverflow answer helpful. +#+END_QUOTE + +* TODO Features +# An in-depth list of features, how to use them, and their dependencies. + +* TODO Configuration +# How to configure this module, including common problems and how to address them. + +* TODO Troubleshooting +# Common issues and their solution, or places to look for help. diff --git a/modules/ui/emoji/config.el b/modules/ui/emoji/config.el new file mode 100644 index 000000000..c536cc202 --- /dev/null +++ b/modules/ui/emoji/config.el @@ -0,0 +1,11 @@ +;;; ui/emoji/config.el -*- lexical-binding: t; -*- + +(use-package! emojify + :hook (doom-first-buffer . global-emojify-mode) + :config + (setq emojify-styles + (delq + nil (list (if (featurep! +ascii) 'ascii) + (if (featurep! +github) 'github) + (if (featurep! +unicode) 'unicode)))) + (emojify-set-emoji-styles emojify-styles)) diff --git a/modules/ui/emoji/packages.el b/modules/ui/emoji/packages.el new file mode 100644 index 000000000..0014668f5 --- /dev/null +++ b/modules/ui/emoji/packages.el @@ -0,0 +1,4 @@ +;; -*- no-byte-compile: t; -*- +;;; ui/emoji/packages.el + +(package! emojify :pin "d886069974d05c8c15654204f9afeaee962f3e7d")