Ligatures only work after mode switching

What happened?

Ligatures only work after switching mode.

What did you expect to happen?

They should work after opening a file.

Steps to reproduce

  1. yay emacs ttf-cascadia-code ttf-fira-code ttf-firacode-nerd
  2. git clone --depth 1 GitHub - doomemacs/doomemacs: An Emacs framework for the stubborn martian hacker ~/.emacs.d && ~/.emacs.d/bin/doom install → y, y
  3. .doom.d/init.el → uncomment ligature support
  4. ~/.emacs.d/bin/doom sync
  5. config.el → (setq doom-font (font-spec :family “Fira Code” :size 14 :weight 'medium))
  6. emacs test.sh → enter a != b → no ligature is shown
  7. M-x python-mode → ligatures appear
  8. Now ligatures work on new text, and after switching back to sh mode as well.
  9. I also tried it with Cascadia and FiraCode Nerd Font, tried in text, python and Ruby mode, tried +fira flag in config.el, no change.

Am I missing something, or can this be a bug?

System information


Loading data dump...

Huh, could be a bug?

What if you open emacs first, then open the test.sh file after it’s opened? Do you get the same behavior?

I do have the same bug as well.


generated  sept. 06, 2023 19:25:20
system     NixOS 23.11.20230902.e569908 (Tapir) Linux 6.1.49 x86_64 x
emacs      28.2 ~/.emacs.d/
doom       3.0.0-pre PROFILE=_@0 HEAD -> master 7a750304 2023-08-21 18:17:05 +0200
           ~/.config/doom/
shell      /run/current-system/sw/bin/fish
features   CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON
           LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY
           INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11
           XDBE XIM XPM XWIDGETS GTK3 ZLIB
traits     gui server-running envvar-file custom-file
custom     magit-todos-insert-after org-agenda-files custom-safe-themes
modules    :config use-package :completion company (vertico +icons) :ui deft doom
           doom-dashboard (emoji +unicode +github) hl-todo indent-guides (ligatures
           +extra) modeline ophints (popup +defaults) (treemacs +lsp) vc-gutter
           vi-tilde-fringe window-select workspaces zen :editor (evil +everywhere)
           file-templates fold (format +onsave) multiple-cursors snippets :emacs
           (dired +icons +ranger) electric ibuffer undo vc :term vterm :checkers
           syntax (spell +everywhere +aspell +hunspell +flyspell) grammar :tools
           (debugger +lsp) direnv docker editorconfig (eval +overlay) (lookup +docsets
           +dictionary +offline) (lsp +peek) (magit +forge) make pdf rgb (terraform
           +lsp) tree-sitter :lang (cc +lsp +tree-sitter) data emacs-lisp (go +lsp
           +tree-sitter) json lua markdown nix (org +pandoc +journal +brain +noter
           +pretty +contact +roam2 +dragndrop) (python +lsp +pyright +tree-sitter)
           (rust +lsp +tree-sitter) sh yaml :config (default +bindings +smartparens)
packages   (messages-are-flowing) (protobuf-mode :recipe (:host github :repo
           emacsmirror/protobuf-mode :files (:defaults *))) (mermaid-mode)
           (ob-mermaid)
unpin      doom-themes
elpa       vterm sqlite emacsql

The ligatures module was rewritten in feat(ligatures): use ligature.el for Emacs28+ by gagbo · Pull Request #5082 · doomemacs/doomemacs · GitHub. Is this still an issue?

This topic was automatically closed after 360 days. New replies are no longer allowed.