From 1e968dcb9c1123b1d2e6e1642139f6b49e5f7395 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Sat, 1 Oct 2022 13:47:56 -0400 Subject: [PATCH] enable markdwon mode globally ; this includes syntax highliting inside org-mode '#+begin_src markdown' blocks --- code/init.el | 26 +------------------------- common/_global.el | 27 ++++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 26 deletions(-) diff --git a/code/init.el b/code/init.el index 779d1ca..fc28844 100644 --- a/code/init.el +++ b/code/init.el @@ -60,7 +60,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; additional packages (add-to-list 'package-selected-packages - '(zoom auctex-latexmk auctex json-mode python-mode powershell rust-mode origami go-mode yaml-mode dockerfile-mode lua-mode rainbow-mode rainbow-delimiters markdown-mode) + '(zoom auctex-latexmk auctex json-mode python-mode powershell rust-mode origami go-mode yaml-mode dockerfile-mode lua-mode) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -86,33 +86,9 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; programming -; general -(add-hook 'prog-mode-hook #'rainbow-delimiters-mode) - ; code folding (require 'origami) -; markdown config -(use-package markdown-mode - :ensure t - :commands (markdown-mode gfm-mode) - :mode (("README\\.md\\'" . gfm-mode) - ("\\.md\\'" . markdown-mode) - ("\\.markdown\\'" . markdown-mode)) - :init (setq markdown-command "multimarkdown")) - -(use-package markdown-preview-mode - :ensure t - :if (boundp 'mdcommand) - :init - ;(setq markdown-preview-auto-open nil) - :custom - (markdown-preview-ws-port 9697) - (markdown-preview-http-port 9696) - (markdown-preview-host "127.0.0.1") - (markdown-preview-http-host "127.0.0.1")) -(setq markdown-preview-stylesheets (list "https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/3.0.1/github-markdown.min.css")) - ; lua (autoload 'lua-mode "lua-mode" "Lua editing mode." t) (add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode)) diff --git a/common/_global.el b/common/_global.el index 5f80ff7..0e89dab 100644 --- a/common/_global.el +++ b/common/_global.el @@ -8,7 +8,7 @@ (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) ; this goes in chemacs2 init -- DO NOT UNCOMMENT (package-initialize) ; this goes in chemacs2 init -- DO NOT UNCOMMENT (add-to-list 'package-selected-packages - '(devdocs devdocs-browser focus zoom popwin dired-single diredfl xclip doominhibitinhibit-modeline magit helpful helm helm-org helm-ls-git projectile helm-projectile dired-rainbow dired-rainbow-listing dired-single dash s origami persp-mode persp-mode-projectile-bridge modus-themes transpose-frame use-package) + '(rainbow-mode rainbow-delimiters markdown-mode devdocs devdocs-browser focus zoom popwin dired-single diredfl xclip doominhibitinhibit-modeline magit helpful helm helm-org helm-ls-git projectile helm-projectile dired-rainbow dired-rainbow-listing dired-single dash s origami persp-mode persp-mode-projectile-bridge modus-themes transpose-frame use-package) ) (require 'use-package) @@ -97,6 +97,31 @@ :init (diredfl-global-mode)) +; coding general (in case its ever on) +(add-hook 'prog-mode-hook #'rainbow-delimiters-mode) + +; markdown config (used by kmn all over everything) +(use-package markdown-mode + :ensure t + :commands (markdown-mode gfm-mode) + :mode (("README\\.md\\'" . gfm-mode) + ("\\.md\\'" . markdown-mode) + ("\\.markdown\\'" . markdown-mode)) + :init (setq markdown-command "multimarkdown")) + +(use-package markdown-preview-mode + :ensure t + :if (boundp 'mdcommand) + :init + ;(setq markdown-preview-auto-open nil) + :custom + (markdown-preview-ws-port 9697) + (markdown-preview-http-port 9696) + (markdown-preview-host "127.0.0.1") + (markdown-preview-http-host "127.0.0.1")) +(setq markdown-preview-stylesheets (list "https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/3.0.1/github-markdown.min.css")) + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; origami config (use-package origami