From c8efef647e2705665a8e3b9de3eedccc209fc981 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Sun, 3 May 2020 01:00:04 +0100 Subject: [PATCH] Fontify markdown source code blocks by default * 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 596a82d6a80..22a8aefa311 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -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) -- 2.39.2