]> git.eshelyaron.com Git - emacs.git/commitdiff
Fontify markdown source code blocks by default
authorJoão Távora <joaotavora@gmail.com>
Sun, 3 May 2020 00:00:04 +0000 (01:00 +0100)
committerJoão Távora <joaotavora@gmail.com>
Sun, 3 May 2020 00:00:04 +0000 (01:00 +0100)
* eglot.el (eglot--format-markup): Set
markdown-fontify-code-blocks-natively to t locally.

GitHub-reference: per https://github.com/joaotavora/eglot/issues/408

lisp/progmodes/eglot.el

index 596a82d6a8031fd4a2193517e0a7f62a4cfd2412..22a8aefa3110fffdd5b26bf0611d512e48d1c113 100644 (file)
@@ -72,7 +72,9 @@
 (require 'filenotify)
 (require 'ert)
 (require 'array)
-(defvar company-backends) ; forward-declare, but don't require company
+;; forward-declare, but don't require (Emacs 28 doesn't seem to care)
+(defvar markdown-fontify-code-blocks-natively)
+(defvar company-backends) 
 (defvar company-tooltip-align-annotations)
 
 
@@ -1149,6 +1151,7 @@ Doubles as an indicator of snippet support."
                          ("plaintext" 'text-mode)
                          (_ major-mode))))))
     (with-temp-buffer
+      (setq-local markdown-fontify-code-blocks-natively t)
       (insert (string-trim string))
       (ignore-errors (delay-mode-hooks (funcall mode)))
       (font-lock-ensure)