branch: externals/modus-themes commit cb612d368977801521a1effc69bfd39763ddeac1 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Document how users can add support for combobulate This is in response to the question raised by Damien Cassou in issue 108: <https://github.com/protesilaos/modus-themes/issues/108>. --- doc/modus-themes.info | 310 +++++++++++++++++++++++++++++--------------------- doc/modus-themes.org | 51 +++++++++ 2 files changed, 233 insertions(+), 128 deletions(-) diff --git a/doc/modus-themes.info b/doc/modus-themes.info index 82223a4509..74ac348308 100644 --- a/doc/modus-themes.info +++ b/doc/modus-themes.info @@ -146,6 +146,7 @@ Advanced customization * DIY Custom hl-todo colors:: * DIY Add support for solaire-mode:: * DIY Add support for meow-mode:: +* DIY Add support for combobulate:: * DIY Use a hook at the post-load-theme phase:: DIY Stylistic variants using palette overrides @@ -1617,6 +1618,7 @@ such, they are labeled as "do-it-yourself" or "DIY". * DIY Custom hl-todo colors:: * DIY Add support for solaire-mode:: * DIY Add support for meow-mode:: +* DIY Add support for combobulate:: * DIY Use a hook at the post-load-theme phase:: @@ -3987,7 +3989,7 @@ the post-load-theme phase. Reload the theme for changes to take effect. -File: modus-themes.info, Node: DIY Add support for meow-mode, Next: DIY Use a hook at the post-load-theme phase, Prev: DIY Add support for solaire-mode, Up: Advanced customization +File: modus-themes.info, Node: DIY Add support for meow-mode, Next: DIY Add support for combobulate, Prev: DIY Add support for solaire-mode, Up: Advanced customization 7.21 DIY Add support for meow-mode ================================== @@ -4018,9 +4020,60 @@ styles to use. The following is but a basic attempt to get started. the post-load-theme phase. -File: modus-themes.info, Node: DIY Use a hook at the post-load-theme phase, Prev: DIY Add support for meow-mode, Up: Advanced customization +File: modus-themes.info, Node: DIY Add support for combobulate, Next: DIY Use a hook at the post-load-theme phase, Prev: DIY Add support for meow-mode, Up: Advanced customization -7.22 DIY Use a hook at the post-load-theme phase +7.22 DIY Add support for combobulate +==================================== + +The ‘combobulate’ package provides the means to operate on text that is +underpinned by the ‘tree-sitter’ program. Because this is a specialized +case that requires intimate knowledge of the technicalities, I am not +adding support for this package directly at the theme level. Users can +try this instead: + + (defun my-modus-themes-custom-faces (&rest _) + (modus-themes-with-colors + (custom-set-faces + `(combobulate-active-indicator-face ((,c :foreground ,fg-main))) + `(combobulate-dimmed-indicator-face ((,c :inherit shadow))) + `(combobulate-error-indicator-face ((,c :inherit error))) + `(combobulate-query-highlight-fiery-flames-face ((,c :inherit modus-themes-intense-red))) + `(combobulate-query-highlight-gleaming-gold-face ((,c :inherit modus-themes-intense-yellow))) + `(combobulate-query-highlight-majestic-mercury-face ((,c :inherit modus-themes-intense-cyan))) + `(combobulate-query-highlight-mysterious-mauve-face ((,c :inherit modus-themes-intense-magenta))) + `(combobulate-query-highlight-radiant-rind-face ((,c :inherit modus-themes-subtle-red))) + `(combobulate-query-highlight-regal-ripples-face ((,c :inherit modus-themes-intense-blue))) + `(combobulate-query-highlight-serene-shade-face ((,c :inherit modus-themes-subtle-green))) + `(combobulate-query-highlight-silver-shadows-face ((,c :background ,bg-active :foreground ,fg-main))) + `(combobulate-query-highlight-vibrant-veggie-face ((,c :inherit modus-themes-intense-green))) + `(combobulate-query-query-anonymous-face ((,c :inherit modus-themes-bold :foreground ,fg-alt))) + `(combobulate-query-query-builtin-face ((,c :inherit font-lock-builtin-face))) + `(combobulate-query-query-constant-face ((,c :inherit font-lock-constant-face))) + `(combobulate-query-query-doc-markup-face ((,c :inherit font-lock-doc-markup-face))) + `(combobulate-query-query-keyword-face ((,c :inherit font-lock-keyword-face))) + `(combobulate-query-query-predicate-builtin-face ((,c :inherit bold))) + `(combobulate-query-query-string-face ((,c :inherit font-lock-string-face))) + `(combobulate-refactor-choice-face ((,c :inherit modus-themes-slant :foreground ,info))) + `(combobulate-refactor-cursor-face ((,c :foreground ,cursor))) + `(combobulate-refactor-field-face ((,c :background ,bg-inactive :foreground ,fg-main :extend nil))) + `(combobulate-refactor-highlight-face ((,c :inherit highlight))) + `(combobulate-refactor-inactive-choice-face ((,c :inherit modus-themes-slant :foreground ,fg-dim))) + `(combobulate-refactor-inactive-field-face ((,c :background ,bg-dim :foreground ,fg-dim :extend nil))) + `(combobulate-refactor-label-face ((,c :inherit modus-themes-search-replace))) + `(combobulate-tree-branch-face ((,c :inherit shadow))) + `(combobulate-tree-highlighted-node-face ((,c :inherit success))) + `(combobulate-tree-normal-node-face ((,c :foreground ,fg-main))) + `(combobulate-tree-pulse-node-face ((,c :background ,bg-blue-intense :extend t)))))) + + (add-hook 'enable-theme-functions #'my-modus-themes-custom-faces) + + *note Using a hook at the post-load-theme phase: DIY Use a hook at +the post-load-theme phase. + + +File: modus-themes.info, Node: DIY Use a hook at the post-load-theme phase, Prev: DIY Add support for combobulate, Up: Advanced customization + +7.23 DIY Use a hook at the post-load-theme phase ================================================ Many of the Do-It-Yourself (DIY) snippets provided herein make use of a @@ -4068,7 +4121,7 @@ it will not use them (in plain terms, the code works with or without File: modus-themes.info, Node: DIY A theme-agnostic hook for theme loading, Up: DIY Use a hook at the post-load-theme phase -7.22.1 DIY A theme-agnostic hook for theme loading +7.23.1 DIY A theme-agnostic hook for theme loading -------------------------------------------------- [ NOTE: The following is for versions of Emacs before 29. For Emacs 29 @@ -6405,130 +6458,131 @@ B.3 Concept index Tag Table: Node: Top872 -Node: Overview8532 -Node: How do the themes look like11298 -Node: Learn about the latest changes11657 -Node: Installation12045 -Node: Install manually from source12971 -Node: Install from the archives13794 -Node: Install on GNU/Linux14393 -Node: Debian 11 Bullseye14884 -Node: GNU Guix15292 -Node: Dealing with byte compilation errors15575 -Node: Enable and load16733 -Node: The require-theme for built-in Emacs themes20677 -Node: Sample configuration with and without use-package21797 -Node: Differences between loading and enabling24643 -Node: Customization options26766 -Node: Custom reload theme30637 -Node: Disable other themes31557 -Node: Bold constructs32799 -Node: Italic constructs33671 -Node: Option for which themes to toggle34499 -Node: Mixed fonts35274 -Node: Command prompts36328 -Node: Completion UIs38169 -Node: Org mode blocks41018 -Node: Heading styles41661 -Node: UI typeface46087 -Node: Palette overrides47060 -Node: Palette extension51446 -Node: Preview theme colors53922 -Node: Use colors from the Modus themes palette55725 -Node: Get a single color from the palette with modus-themes-get-color-value56589 -Node: Use theme colors in code with modus-themes-with-colors58949 -Node: Advanced customization61203 -Node: DIY Palette override presets62888 -Node: DIY Stylistic variants using palette overrides65735 -Node: DIY Make the mode line borderless67789 -Node: DIY Make the active mode line colorful69164 -Node: DIY Make the tab bar more or less colorful71382 -Node: DIY Make the fringe invisible or another color73319 -Node: DIY Make links use subtle or no underlines74516 -Node: DIY Make prompts more or less colorful75634 -Node: DIY Make completion matches more or less colorful76957 -Node: DIY Make comments yellow and strings green80516 -Node: DIY Make code syntax use the old alt-syntax style82223 -Node: DIY Make use of alternative styles for code syntax85336 -Node: DIY Make matching parenthesis more or less intense88798 -Node: DIY Make box buttons more or less gray90170 -Node: DIY Make TODO and DONE more or less intense91183 -Node: DIY Make headings more or less colorful92684 -Node: DIY Make Org block colors more or less colorful94801 -Node: DIY Make Org agenda more or less colorful99173 -Node: DIY Make inline code in prose use alternative styles102348 -Node: DIY Make mail citations and headers more or less colorful104588 -Node: DIY Make the region preserve text colors plus other styles106988 -Node: DIY Make mouse highlights more or less colorful108544 -Node: DIY Make language underlines less colorful109557 -Node: DIY Make line numbers use alternative styles110709 -Node: DIY Make diffs use only a foreground112352 -Node: DIY Make deuteranopia diffs red and blue instead of yellow and blue115239 -Node: DIY More accurate colors in terminal emulators117711 -Node: DIY Range of color with terminal emulators119019 -Node: DIY Per-theme customization settings121806 -Node: DIY Do not extend the region background123239 -Node: DIY Add padding to the mode line124041 -Node: DIY Remap face with local value126969 -Node: DIY Font configurations for Org and others129508 -Ref: DIY Font configurations for Org and others-Footnote-1132489 -Node: DIY Configure bold and italic faces132676 -Node: DIY Custom Org todo keyword and priority faces137298 -Node: DIY Custom Org emphasis faces141039 -Node: DIY Use colored Org source blocks per language145916 -Node: DIY Measure color contrast150556 -Node: DIY Load theme depending on time of day153273 -Node: DIY Backdrop for pdf-tools154301 -Node: DIY Toggle themes without reloading them157462 -Node: DIY Use more spacious margins or padding in Emacs frames158771 -Node: DIY Custom hl-todo colors163008 -Node: DIY Add support for solaire-mode164825 -Node: DIY Add support for meow-mode167923 -Node: DIY Use a hook at the post-load-theme phase169715 -Node: DIY A theme-agnostic hook for theme loading171834 -Node: Face coverage174465 -Node: Supported packages174917 -Node: Indirectly covered packages180661 -Node: Notes on individual packages182017 -Node: Note on calendarel weekday and weekend colors183117 -Node: Note on git-gutter in Doom Emacs184265 -Node: Note on php-mode multiline comments186765 -Node: Note on underlines in compilation buffers187525 -Node: Note on inline Latex in Org buffers188397 -Node: Note on dimmerel189007 -Node: Note on display-fill-column-indicator-mode190492 -Node: Note on highlight-parenthesesel191943 -Node: Note on mmm-modeel background colors198020 -Node: Note for prism200372 -Node: Note on company-mode overlay pop-up203584 -Ref: Note on company-mode overlay pop-up-Footnote-1204312 -Ref: Note on company-mode overlay pop-up-Footnote-2204379 -Node: Note on ERC escaped color sequences204434 -Ref: Note on ERC escaped color sequences-Footnote-1205862 -Node: Note on powerline or spaceline205972 -Node: Note on SHR colors206386 -Node: Note on SHR fonts206806 -Node: Note on Ement colors and fonts207493 -Node: Note on pdf-tools link hints208997 -Node: Note on the Notmuch logo211453 -Node: Note on goto-address-mode faces211985 -Node: Frequently Asked Questions213103 -Node: Is the contrast ratio about adjacent colors?213734 -Node: What does it mean to avoid exaggerations?215243 -Node: Why are colors mostly variants of blue magenta cyan?217093 -Node: What is the best setup for legibility?221427 -Node: Are these color schemes?224069 -Node: Port the Modus themes to other platforms?227723 -Node: Contributing230557 -Node: Sources of the themes230956 -Node: Issues you can help with231852 -Node: Patches require copyright assignment to the FSF233244 -Node: Acknowledgements235466 -Node: GNU Free Documentation License239727 -Node: Indices264890 -Node: Function index265069 -Node: Variable index266367 -Node: Concept index269718 +Node: Overview8568 +Node: How do the themes look like11334 +Node: Learn about the latest changes11693 +Node: Installation12081 +Node: Install manually from source13007 +Node: Install from the archives13830 +Node: Install on GNU/Linux14429 +Node: Debian 11 Bullseye14920 +Node: GNU Guix15328 +Node: Dealing with byte compilation errors15611 +Node: Enable and load16769 +Node: The require-theme for built-in Emacs themes20713 +Node: Sample configuration with and without use-package21833 +Node: Differences between loading and enabling24679 +Node: Customization options26802 +Node: Custom reload theme30673 +Node: Disable other themes31593 +Node: Bold constructs32835 +Node: Italic constructs33707 +Node: Option for which themes to toggle34535 +Node: Mixed fonts35310 +Node: Command prompts36364 +Node: Completion UIs38205 +Node: Org mode blocks41054 +Node: Heading styles41697 +Node: UI typeface46123 +Node: Palette overrides47096 +Node: Palette extension51482 +Node: Preview theme colors53958 +Node: Use colors from the Modus themes palette55761 +Node: Get a single color from the palette with modus-themes-get-color-value56625 +Node: Use theme colors in code with modus-themes-with-colors58985 +Node: Advanced customization61239 +Node: DIY Palette override presets62960 +Node: DIY Stylistic variants using palette overrides65807 +Node: DIY Make the mode line borderless67861 +Node: DIY Make the active mode line colorful69236 +Node: DIY Make the tab bar more or less colorful71454 +Node: DIY Make the fringe invisible or another color73391 +Node: DIY Make links use subtle or no underlines74588 +Node: DIY Make prompts more or less colorful75706 +Node: DIY Make completion matches more or less colorful77029 +Node: DIY Make comments yellow and strings green80588 +Node: DIY Make code syntax use the old alt-syntax style82295 +Node: DIY Make use of alternative styles for code syntax85408 +Node: DIY Make matching parenthesis more or less intense88870 +Node: DIY Make box buttons more or less gray90242 +Node: DIY Make TODO and DONE more or less intense91255 +Node: DIY Make headings more or less colorful92756 +Node: DIY Make Org block colors more or less colorful94873 +Node: DIY Make Org agenda more or less colorful99245 +Node: DIY Make inline code in prose use alternative styles102420 +Node: DIY Make mail citations and headers more or less colorful104660 +Node: DIY Make the region preserve text colors plus other styles107060 +Node: DIY Make mouse highlights more or less colorful108616 +Node: DIY Make language underlines less colorful109629 +Node: DIY Make line numbers use alternative styles110781 +Node: DIY Make diffs use only a foreground112424 +Node: DIY Make deuteranopia diffs red and blue instead of yellow and blue115311 +Node: DIY More accurate colors in terminal emulators117783 +Node: DIY Range of color with terminal emulators119091 +Node: DIY Per-theme customization settings121878 +Node: DIY Do not extend the region background123311 +Node: DIY Add padding to the mode line124113 +Node: DIY Remap face with local value127041 +Node: DIY Font configurations for Org and others129580 +Ref: DIY Font configurations for Org and others-Footnote-1132561 +Node: DIY Configure bold and italic faces132748 +Node: DIY Custom Org todo keyword and priority faces137370 +Node: DIY Custom Org emphasis faces141111 +Node: DIY Use colored Org source blocks per language145988 +Node: DIY Measure color contrast150628 +Node: DIY Load theme depending on time of day153345 +Node: DIY Backdrop for pdf-tools154373 +Node: DIY Toggle themes without reloading them157534 +Node: DIY Use more spacious margins or padding in Emacs frames158843 +Node: DIY Custom hl-todo colors163080 +Node: DIY Add support for solaire-mode164897 +Node: DIY Add support for meow-mode167995 +Node: DIY Add support for combobulate169775 +Node: DIY Use a hook at the post-load-theme phase173398 +Node: DIY A theme-agnostic hook for theme loading175519 +Node: Face coverage178150 +Node: Supported packages178602 +Node: Indirectly covered packages184346 +Node: Notes on individual packages185702 +Node: Note on calendarel weekday and weekend colors186802 +Node: Note on git-gutter in Doom Emacs187950 +Node: Note on php-mode multiline comments190450 +Node: Note on underlines in compilation buffers191210 +Node: Note on inline Latex in Org buffers192082 +Node: Note on dimmerel192692 +Node: Note on display-fill-column-indicator-mode194177 +Node: Note on highlight-parenthesesel195628 +Node: Note on mmm-modeel background colors201705 +Node: Note for prism204057 +Node: Note on company-mode overlay pop-up207269 +Ref: Note on company-mode overlay pop-up-Footnote-1207997 +Ref: Note on company-mode overlay pop-up-Footnote-2208064 +Node: Note on ERC escaped color sequences208119 +Ref: Note on ERC escaped color sequences-Footnote-1209547 +Node: Note on powerline or spaceline209657 +Node: Note on SHR colors210071 +Node: Note on SHR fonts210491 +Node: Note on Ement colors and fonts211178 +Node: Note on pdf-tools link hints212682 +Node: Note on the Notmuch logo215138 +Node: Note on goto-address-mode faces215670 +Node: Frequently Asked Questions216788 +Node: Is the contrast ratio about adjacent colors?217419 +Node: What does it mean to avoid exaggerations?218928 +Node: Why are colors mostly variants of blue magenta cyan?220778 +Node: What is the best setup for legibility?225112 +Node: Are these color schemes?227754 +Node: Port the Modus themes to other platforms?231408 +Node: Contributing234242 +Node: Sources of the themes234641 +Node: Issues you can help with235537 +Node: Patches require copyright assignment to the FSF236929 +Node: Acknowledgements239151 +Node: GNU Free Documentation License243412 +Node: Indices268575 +Node: Function index268754 +Node: Variable index270052 +Node: Concept index273403 End Tag Table diff --git a/doc/modus-themes.org b/doc/modus-themes.org index 404bb553b0..f539602e74 100644 --- a/doc/modus-themes.org +++ b/doc/modus-themes.org @@ -3879,6 +3879,57 @@ styles to use. The following is but a basic attempt to get started. [[#h:d87673fe-2ce1-4c80-a4b8-be36ca9f2d24][Using a hook at the post-load-theme phase]]. +** DIY Add support for combobulate +:PROPERTIES: +:CUSTOM_ID: h:e94bdd17-1c2d-41b5-86c5-83462bd8f30c +:END: + +The ~combobulate~ package provides the means to operate on text that +is underpinned by the ~tree-sitter~ program. Because this is a +specialized case that requires intimate knowledge of the +technicalities, I am not adding support for this package directly at +the theme level. Users can try this instead: + +#+begin_src emacs-lisp +(defun my-modus-themes-custom-faces (&rest _) + (modus-themes-with-colors + (custom-set-faces + `(combobulate-active-indicator-face ((,c :foreground ,fg-main))) + `(combobulate-dimmed-indicator-face ((,c :inherit shadow))) + `(combobulate-error-indicator-face ((,c :inherit error))) + `(combobulate-query-highlight-fiery-flames-face ((,c :inherit modus-themes-intense-red))) + `(combobulate-query-highlight-gleaming-gold-face ((,c :inherit modus-themes-intense-yellow))) + `(combobulate-query-highlight-majestic-mercury-face ((,c :inherit modus-themes-intense-cyan))) + `(combobulate-query-highlight-mysterious-mauve-face ((,c :inherit modus-themes-intense-magenta))) + `(combobulate-query-highlight-radiant-rind-face ((,c :inherit modus-themes-subtle-red))) + `(combobulate-query-highlight-regal-ripples-face ((,c :inherit modus-themes-intense-blue))) + `(combobulate-query-highlight-serene-shade-face ((,c :inherit modus-themes-subtle-green))) + `(combobulate-query-highlight-silver-shadows-face ((,c :background ,bg-active :foreground ,fg-main))) + `(combobulate-query-highlight-vibrant-veggie-face ((,c :inherit modus-themes-intense-green))) + `(combobulate-query-query-anonymous-face ((,c :inherit modus-themes-bold :foreground ,fg-alt))) + `(combobulate-query-query-builtin-face ((,c :inherit font-lock-builtin-face))) + `(combobulate-query-query-constant-face ((,c :inherit font-lock-constant-face))) + `(combobulate-query-query-doc-markup-face ((,c :inherit font-lock-doc-markup-face))) + `(combobulate-query-query-keyword-face ((,c :inherit font-lock-keyword-face))) + `(combobulate-query-query-predicate-builtin-face ((,c :inherit bold))) + `(combobulate-query-query-string-face ((,c :inherit font-lock-string-face))) + `(combobulate-refactor-choice-face ((,c :inherit modus-themes-slant :foreground ,info))) + `(combobulate-refactor-cursor-face ((,c :foreground ,cursor))) + `(combobulate-refactor-field-face ((,c :background ,bg-inactive :foreground ,fg-main :extend nil))) + `(combobulate-refactor-highlight-face ((,c :inherit highlight))) + `(combobulate-refactor-inactive-choice-face ((,c :inherit modus-themes-slant :foreground ,fg-dim))) + `(combobulate-refactor-inactive-field-face ((,c :background ,bg-dim :foreground ,fg-dim :extend nil))) + `(combobulate-refactor-label-face ((,c :inherit modus-themes-search-replace))) + `(combobulate-tree-branch-face ((,c :inherit shadow))) + `(combobulate-tree-highlighted-node-face ((,c :inherit success))) + `(combobulate-tree-normal-node-face ((,c :foreground ,fg-main))) + `(combobulate-tree-pulse-node-face ((,c :background ,bg-blue-intense :extend t)))))) + +(add-hook 'enable-theme-functions #'my-modus-themes-custom-faces) +#+end_src + +[[#h:d87673fe-2ce1-4c80-a4b8-be36ca9f2d24][Using a hook at the post-load-theme phase]]. + ** DIY Use a hook at the post-load-theme phase :PROPERTIES: :CUSTOM_ID: h:d87673fe-2ce1-4c80-a4b8-be36ca9f2d24