File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9292(defconst d2-font-lock-keywords
9393 `((,(regexp-opt '(" shape" " md" ) 'words ) . font-lock-keyword-face )
9494 (" ---\\ |-?->*\\ +?\\ |==>\\ |===|->" . font-lock-variable-name-face )
95+ (" #.*" . font-lock-comment-face )
9596 (" :\\ |{\\ |}\\ |\| \\ |+" . font-lock-builtin-face )
9697 (,(regexp-opt '(" go" " js" ) 'lang ) . font-lock-preprocessor-face )
9798 (,(regexp-opt '(" class" " string" ) 'words2 ) . font-lock-type-face )))
9899
99100(defvar d2-syntax-table
100101 (let ((syntax-table (make-syntax-table )))
101- ; ; Comment style "%% ..."
102+ ; ; Comment style "# ..."
102103 (modify-syntax-entry ?% " . 124" syntax-table)
103104 (modify-syntax-entry ?\n " >" syntax-table)
104105 syntax-table)
@@ -217,9 +218,9 @@ Optional argument BROWSE whether to open the browser."
217218(define-derived-mode d2-mode prog-mode " d2"
218219 :syntax-table d2-syntax-table
219220 (setq-local font-lock-defaults '(d2-font-lock-keywords))
220- (setq-local comment-start " %% " )
221+ (setq-local comment-start " # " )
221222 (setq-local comment-end " " )
222- (setq-local comment-start-skip " %%+ * " ))
223+ (setq-local comment-start-skip " # " ))
223224
224225(provide 'd2-mode )
225226
You can’t perform that action at this time.
0 commit comments