Adding comments into the mode
1 files changed, 11 insertions(+), 1 deletions(-)

M structurizr-mode.el
M structurizr-mode.el +11 -1
@@ 30,7 30,7 @@ 
 (defvar structurizr-tab-width 4 "Width of a tab for Structurizr mode")
 
 (defgroup structurizr nil
-  "Major mode of Structurizr dsl"
+  "Major mode for the Structurizr dsl"
   :group 'languages)
 
 (defcustom structurizr-indent-level 4

          
@@ 98,6 98,16 @@ 
   (when structurizr-tab-width
     (setq tab-width structurizr-tab-width))
   (structurizr-mode-variables)
+
+  ;;; Comments
+  ;; Single line comment
+  (modify-syntax-entry ?# "< b" structurizr-mode-syntax-table)
+  (modify-syntax-entry ?\n "> b" structurizr-mode-syntax-table)
+  
+  (setq-local comment-start "#")
+  (setq-local comment-use-syntax t)
+  (setq-local comment-start-skip "\\(//+\\|/\\*+\\)\\s *")
+  
   (make-local-variable 'structurizr-indent-line)
   (setq-local indent-line-function 'structurizr-indent-line)
   (setq font-lock-defaults '((structurizr-font-locks))))