From 940d5b36697220de64ef820b9fc2738d3510bb67 Mon Sep 17 00:00:00 2001 From: Jeetaditya Chatterjee Date: Sat, 22 Aug 2020 01:00:55 +0100 Subject: [PATCH 1/5] updating doom quit readme --- modules/ui/ligatures/README.org | 115 +++++++++++++++++++++++++++++++- 1 file changed, 113 insertions(+), 2 deletions(-) diff --git a/modules/ui/ligatures/README.org b/modules/ui/ligatures/README.org index 569a2e8ff..a97b22be6 100644 --- a/modules/ui/ligatures/README.org +++ b/modules/ui/ligatures/README.org @@ -16,7 +16,8 @@ - [[#mathematical-symbols-replacement][Mathematical symbols replacement]] - [[#coding-ligatures][Coding ligatures]] - [[#configuration][Configuration]] - - [[#set-ligatures][~set-ligatures!~]] + - [[#setting-liagtures][Setting liagtures]] + - [[#changing-ligatures][changing ligatures]] - [[#troubleshooting][Troubleshooting]] * Description @@ -102,7 +103,117 @@ Even though harfbuzz has been included in emacs 27, there is currently a [[https emacs 27. * TODO Configuration -** TODO ~set-ligatures!~ +** Setting liagtures +If you want to set ligatures for modules that don't have them by default you can +use the ~set-ligatures!~ macro in your config.el file +#+BEGIN_SRC emacs-lisp +(after! major-mode + (set-ligatures! 'major-mode + :symbol "keyword")) +#+END_SRC +eg. +#+BEGIN_SRC emacs-lisp +(after! go-mode + (set-ligatures! 'go-mode + :def "func" ; function keyword + :true "true" :false "false" + ; this will replace not only definitions + ; but coresponding functions aswell + :int "int" :str "string" + :float "float" :bool "bool" + :for "for" + :return "return" :yeild "yeild")) +#+END_SRC +you can set these symbols out of the box +#+BEGIN_SRC emacs-lisp +(set-ligatures! 'mode + ;; Functional + :lambda "lambda keyword" + :def "function keyword" + :composition "composition" + :map "map/dictionary keyword" + ;; Types + :null "null type" + :true "true keyword" + :false "false keyword" + :int "int keyword" + :float "float keyword" + :str "string keyword" + :bool "boolean keywork" + :list "list keyword" + ;; Flow + :not "not operator" + :in "in operator" + :not-in "not in operator" + :and "and keyword" + :or "or keyword" + :for "for keyword" + :some "some keyword" + :return "return" + :yield "yeild" + ;; Other + :union "⋃" + :intersect "∩" + :diff "∖" + :tuple "⨂" + :pipe "" ;; FIXME: find a non-private char + :dot "•") +#+END_SRC + + +if you have multiple versions of the same keyword you can set the symbol twice + +#+BEGIN_SRC emacs-lisp +(set-ligatures! scala-mode + :null "none" + :null "None") + +#+END_SRC +** changing ligatures +if you don't like the symbols chosen you can change them by using... + +#+BEGIN_SRC emacs-lisp +; you don't need to include all of them you can pick and mix +(setq +ligatures-extra-symbols + '(;; org + :name "»" + :src_block "»" + :src_block_end "«" + :quote "“" + :quote_end "”" + ;; Functional + :lambda "λ" + :def "ƒ" + :composition "∘" + :map "↦" + ;; Types + :null "∅" + :true "𝕋" + :false "𝔽" + :int "ℤ" + :float "ℝ" + :str "𝕊" + :bool "𝔹" + :list "𝕃" + ;; Flow + :not "¬" + :in "∈" + :not-in "∉" + :and "∧" + :or "∨" + :for "∀" + :some "∃" + :return "⟼" + :yield "⟻" + ;; Other + :union "⋃" + :intersect "∩" + :diff "∖" + :tuple "⨂" + :pipe "" ;; FIXME: find a non-private char + :dot "•")) + ;; you could also add your own if you want +#+END_SRC * TODO Troubleshooting # Common issues and their solution, or places to look for help. From a4a51550c9f1816612f3757a80fd89c06a331f1f Mon Sep 17 00:00:00 2001 From: Jeetaditya Chatterjee Date: Sat, 22 Aug 2020 01:04:45 +0100 Subject: [PATCH 2/5] doc/updating doom-quit Read-me --- modules/ui/doom-quit/README.org | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/modules/ui/doom-quit/README.org b/modules/ui/doom-quit/README.org index 18f238357..03a93c174 100644 --- a/modules/ui/doom-quit/README.org +++ b/modules/ui/doom-quit/README.org @@ -3,6 +3,37 @@ #+SINCE: v2.0 #+STARTUP: inlineimages +* Table of Contents :TOC_3:noexport: +- [[#description][Description]] + - [[#module-flags][Module Flags]] + - [[#plugins][Plugins]] +- [[#prerequisites][Prerequisites]] +- [[#features][Features]] +- [[#configurations][Configurations]] +- [[#troubleshooting][Troubleshooting]] + +* Description A silly module that prompts you with messages when you try to quit, like DOOM did. Some quotes are from Doom's quit-message list. Others are random, nerdy -references that no decent human being has any business recognizing. +references that no decent human being has any business recognising. +** Module Flags +This module provides no flags +** Plugins +This module uses no Plugins +* Prerequisites +This module provides no prerequisite +* Features +This module only works when you run individual Emacs instances and not the +daemon. +* Configurations + you can configure the messages by adding to the variable ~+doom-quit-messages~ + #+BEGIN_SRC emacs-lisp +(setq +doom-quit-messages '(;;from doom 2 + "Don't go now, there's a dimensional shambler waiting at the dos prompt!" + "Get outta here and go back to your boring programs." + "If I were your boss, I'd deathmatch ya in a minute!" + "Look, bud. You leave now and you forfeit your body count!" + "You're lucky I don't smack you for thinking about leaving.")) + #+END_SRC +* Troubleshooting +If you have any issues with this module do let me know From 9ed5fee1ed1486f40588e7ae3d67dbedc61842ea Mon Sep 17 00:00:00 2001 From: Jeetaditya Chatterjee Date: Sat, 22 Aug 2020 01:08:37 +0100 Subject: [PATCH 3/5] doc/cleaing up ligatures readme --- modules/ui/ligatures/README.org | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/ui/ligatures/README.org b/modules/ui/ligatures/README.org index a97b22be6..4179ed54a 100644 --- a/modules/ui/ligatures/README.org +++ b/modules/ui/ligatures/README.org @@ -152,12 +152,12 @@ you can set these symbols out of the box :return "return" :yield "yeild" ;; Other - :union "⋃" - :intersect "∩" - :diff "∖" - :tuple "⨂" - :pipe "" ;; FIXME: find a non-private char - :dot "•") + :union "Union keyword" + :intersect "Intersect keyword" + :diff "diff keyword" + :tuple "Tuple Keyword " + :pipe "Pipe Keyword" ;; FIXME: find a non-private char + :dot "Dot operator") #+END_SRC From 51b47d0fa6d829b7f9888ab38c5756ff5024f3e8 Mon Sep 17 00:00:00 2001 From: Jeetaditya Chatterjee Date: Sat, 22 Aug 2020 02:38:12 +0100 Subject: [PATCH 4/5] Redoing ui/hl-todo README Redid the README so it fits the new format --- modules/ui/hl-todo/README.org | 78 ++++++++++++++++++++++++++++++++--- 1 file changed, 72 insertions(+), 6 deletions(-) diff --git a/modules/ui/hl-todo/README.org b/modules/ui/hl-todo/README.org index d8af7eb85..15e62368a 100644 --- a/modules/ui/hl-todo/README.org +++ b/modules/ui/hl-todo/README.org @@ -1,13 +1,79 @@ #+TITLE: :ui hl-todo -This module adds syntax highlighting for TODO/FIXME/NOTE tags in programming major-modes. +* Table of Contents :TOC_3:noexport: +- [[#description][Description]] + - [[#module-flags][Module Flags]] + - [[#plugins][Plugins]] +- [[#prerequisites][Prerequisites]] +- [[#features][Features]] + - [[#making-items][Making Items]] + - [[#using-items][Using Items]] +- [[#configuration][Configuration]] +- [[#troubleshooting][Troubleshooting]] -What keywords are highlighted (and their color) can be customized through ~hl-todo-keyword-faces~. +* Description +This module adds syntax highlighting for TODO/FIXME/NOTE tags in programming +major-modes. -#+BEGIN_SRC emacs-lisp +** Module Flags +This module provides no flags +** Plugins +[[https://github.com/tarius/hl-todo][hl-todo]] +* Prerequisites +This module has no prerequisites +* Features +** Making Items +You can make a TODO item by simply writing ++ =TODO= + For things that need to be done, just not today. ++ =HACK= + For tidbits that are unconventional and not intended uses of the + constituent parts, and may break in a future update. ++ =FIXME= + For problems that will become bigger problems later if not fixed ASAP. ++ =REVIEW= + for things that were done hastily and/or hasn't been thoroughly + tested. it may not even be necessary! ++ =NOTE= + For especially important gotchas with a given implementation, + directed at another user other than the author. ++ =DEPRECATED= + For things that just gotta go and will soon be gone. ++ =BUG= + For a known bug that needs a workaround ++ =XXX= + For warning about a problematic or misguiding code +** Using Items +To see all of the TODO items in a project you can use +=SPC p t= +This will bring up a buffer you can use to quickly jump to the item +* Configuration +To add your own ITEMS you would need to configure them using +~hl-todo-keyword-faces~ +#+BEGIN_SRC emacs-lisp :tangle no ;; the default (setq hl-todo-keyword-faces - `(("TODO" . ,(face-foreground 'warning)) - ("FIXME" . ,(face-foreground 'error)) - ("NOTE" . ,(face-foreground 'success)))) + `(("FOO" . ,(face-foreground "MY COLOUR HEX CODE")) + ("BAR" . ,(face-foreground 'my-colour-var)))) #+END_SRC + +You can also add keybindings to jump and configure the next TODO item in the buffer using +| function | description | proposed binding | +|--------------------+-----------------------------------+------------------| +| ~hl-todo-previous~ | move to the last TODO item | =C-c t p= | +| ~hl-todo-next~ | move to the next TODO item | =C-c t n= | +| ~hl-todo-occur~ | list all TODO items in the buffer | =C-c t o= | +| ~hl-todo-insert~ | make a new TODO item | =C-c t i= | + +this can be mapped like this +#+BEGIN_SRC emacs-lisp :tangle no +(map! :prefix "C-c t" + "p"#'hl-todo-previous + "n"#'hl-todo-next + "o"#'hl-todo-occur + "i"#'hl-todo-insert) + +#+END_SRC + +* Troubleshooting +If you have any problems with this module do get in touch! From 89068d88d4eca3ebefdd322064969586d01caadf Mon Sep 17 00:00:00 2001 From: Jeetaditya Chatterjee Date: Sat, 22 Aug 2020 18:32:02 +0100 Subject: [PATCH 5/5] adding the requested changes --- modules/ui/hl-todo/README.org | 62 ++++++++++++++++++--------------- modules/ui/ligatures/README.org | 30 ++++++++-------- 2 files changed, 47 insertions(+), 45 deletions(-) diff --git a/modules/ui/hl-todo/README.org b/modules/ui/hl-todo/README.org index 15e62368a..1898ce03d 100644 --- a/modules/ui/hl-todo/README.org +++ b/modules/ui/hl-todo/README.org @@ -1,4 +1,7 @@ #+TITLE: :ui hl-todo +#+DATE: February 19, 2017 +#+SINCE: v1.3 +#+STARTUP: inlineimages * Table of Contents :TOC_3:noexport: - [[#description][Description]] @@ -7,7 +10,8 @@ - [[#prerequisites][Prerequisites]] - [[#features][Features]] - [[#making-items][Making Items]] - - [[#using-items][Using Items]] + - [[#keybindings][Keybindings]] + - [[#adding-items][Adding items.]] - [[#configuration][Configuration]] - [[#troubleshooting][Troubleshooting]] @@ -17,11 +21,15 @@ major-modes. ** Module Flags This module provides no flags + ** Plugins -[[https://github.com/tarius/hl-todo][hl-todo]] ++ [[https://github.com/tarius/hl-todo][hl-todo]] + * Prerequisites This module has no prerequisites + * Features + ** Making Items You can make a TODO item by simply writing + =TODO= @@ -43,37 +51,33 @@ You can make a TODO item by simply writing For a known bug that needs a workaround + =XXX= For warning about a problematic or misguiding code -** Using Items -To see all of the TODO items in a project you can use -=SPC p t= -This will bring up a buffer you can use to quickly jump to the item + +** Keybindings +| keybind | description | +|-----------+----------------------------------| +| =]t= | go to next TODO item | +| =[t= | go to previous TODO item | +| =SPC p t= | show all TODO items in a project | +| =SPC s p= | search project for a string | +| =SPC s b= | search buffer for string | + +** TODO Adding items. +The way you would add a TODO item is to use a snippet but these have not been +made. you can make them yourself by adding the snippet to +=$DOOMDIR/snippets/MAJOR-MODE/name-of-snippet=. you will find more info on how +to make them [[https://github.com/hlissner/doom-snippets][here]] + * Configuration To add your own ITEMS you would need to configure them using ~hl-todo-keyword-faces~ -#+BEGIN_SRC emacs-lisp :tangle no +#+BEGIN_SRC emacs-lisp ;; the default -(setq hl-todo-keyword-faces - `(("FOO" . ,(face-foreground "MY COLOUR HEX CODE")) - ("BAR" . ,(face-foreground 'my-colour-var)))) +(after! hl-todo + (setq hl-todo-keyword-faces + `( + ("FOO" . ,(face-foreground "MY COLOUR HEX CODE")) + ("BAR" . ,(face-foreground 'my-colour-var))))) #+END_SRC -You can also add keybindings to jump and configure the next TODO item in the buffer using -| function | description | proposed binding | -|--------------------+-----------------------------------+------------------| -| ~hl-todo-previous~ | move to the last TODO item | =C-c t p= | -| ~hl-todo-next~ | move to the next TODO item | =C-c t n= | -| ~hl-todo-occur~ | list all TODO items in the buffer | =C-c t o= | -| ~hl-todo-insert~ | make a new TODO item | =C-c t i= | - -this can be mapped like this -#+BEGIN_SRC emacs-lisp :tangle no -(map! :prefix "C-c t" - "p"#'hl-todo-previous - "n"#'hl-todo-next - "o"#'hl-todo-occur - "i"#'hl-todo-insert) - -#+END_SRC - -* Troubleshooting +* TODO Troubleshooting If you have any problems with this module do get in touch! diff --git a/modules/ui/ligatures/README.org b/modules/ui/ligatures/README.org index 4179ed54a..df5a16271 100644 --- a/modules/ui/ligatures/README.org +++ b/modules/ui/ligatures/README.org @@ -16,8 +16,8 @@ - [[#mathematical-symbols-replacement][Mathematical symbols replacement]] - [[#coding-ligatures][Coding ligatures]] - [[#configuration][Configuration]] - - [[#setting-liagtures][Setting liagtures]] - - [[#changing-ligatures][changing ligatures]] + - [[#setting-ligatures][Setting ligatures]] + - [[#changing-ligatures][Changing ligatures]] - [[#troubleshooting][Troubleshooting]] * Description @@ -102,18 +102,18 @@ Even though harfbuzz has been included in emacs 27, there is currently a [[https (#40864)]] which prevents a safe usage of /composition-function-table/ method in emacs 27. -* TODO Configuration -** Setting liagtures +* Configuration +** Setting ligatures If you want to set ligatures for modules that don't have them by default you can -use the ~set-ligatures!~ macro in your config.el file +use the ~set-ligatures!~ macro in your config el file #+BEGIN_SRC emacs-lisp -(after! major-mode - (set-ligatures! 'major-mode +(after! PACKAGE + (set-ligatures! 'MAJOR-MODE :symbol "keyword")) #+END_SRC eg. #+BEGIN_SRC emacs-lisp -(after! go-mode +(after! go-mode ; in this case the major mode and package named the same thing (set-ligatures! 'go-mode :def "func" ; function keyword :true "true" :false "false" @@ -126,7 +126,7 @@ eg. #+END_SRC you can set these symbols out of the box #+BEGIN_SRC emacs-lisp -(set-ligatures! 'mode +(set-ligatures! 'MAJOR-MODE ;; Functional :lambda "lambda keyword" :def "function keyword" @@ -160,21 +160,19 @@ you can set these symbols out of the box :dot "Dot operator") #+END_SRC - -if you have multiple versions of the same keyword you can set the symbol twice +If you have multiple versions of the same keyword you can set the symbol twice #+BEGIN_SRC emacs-lisp (set-ligatures! scala-mode :null "none" :null "None") - #+END_SRC -** changing ligatures +** Changing ligatures if you don't like the symbols chosen you can change them by using... #+BEGIN_SRC emacs-lisp -; you don't need to include all of them you can pick and mix -(setq +ligatures-extra-symbols +;; you don't need to include all of them you can pick and mix +(plist-put +ligatures-extra-symbols '(;; org :name "»" :src_block "»" @@ -216,4 +214,4 @@ if you don't like the symbols chosen you can change them by using... #+END_SRC * TODO Troubleshooting -# Common issues and their solution, or places to look for help. + If you have any problems with this module, do get in touch!