make org src-block major mode adapt with tree-sitter

This commit is contained in:
zedhugh committed 2023-05-11 02:47:14 +08:00
1 parent 4c0022d427
commit 97719f2100
1 file changed
+11 -3
+11 -3
View File
@@ -1,10 +1,18 @@
;; -*- coding: utf-8; lexical-binding: t; -*-
(require 'init-treesit)
;; customize mode for src lang
(defconst creature/org-src-lang-modes
'(("js" . js)
("ts" . typescript)
("html" . web))
(if (bound-and-true-p creature/treesit-available)
'(("js" . js)
("ts" . typescript-ts)
("tsx" . tsx-ts)
("html" . mhtml))
'(("js" . js)
("ts" . typescript)
("tsx" . typescript-tsx)
("html" . mhtml)))
"Better src lang reflex to mode.")
;; enable code block in org file