mirror of
https://github.com/skuro/plantuml-mode.git
synced 2024-06-20 06:46:45 +02:00
- give user some control to override in comments level of indentation
Signed-off-by: Michael Steiner <michael.steiner@intel.com>
This commit is contained in:
parent
80b554e871
commit
cbd7fa4c6b
|
@ -494,6 +494,12 @@ Uses prefix (as PREFIX) to choose where to display it:
|
|||
;; following limitations
|
||||
;; - commands commented out by /' ... '/ will _not_ be ignored
|
||||
;; and potentially lead to miss-indentation
|
||||
;; - you can though somewhat correct mis-indentation by adding in '-comment lines
|
||||
;; PLANTUML_MODE_INDENT_INCREASE and/or PLANTUML_MODE_INDENT_DECREASE
|
||||
;; to increase and/or decrease the level of indentation
|
||||
;; (Note: the line with the comment should not contain any text matching other indent
|
||||
;; regexp or this user-control instruction will be ignored; also at most will count
|
||||
;; per line ...)
|
||||
(defvar plantuml-indent-regexp-block-start "^.*{\s*$"
|
||||
"Indentation regex for all plantuml elements that might define a {} block.
|
||||
Plantuml elements like skinparam, rectangle, sprite, package, etc.
|
||||
|
@ -513,6 +519,7 @@ or it is followed by line end.")
|
|||
(defvar plantuml-indent-regexp-legend-start "^\s*\\(?:legend\\|legend\s+\\(?:bottom\\|top\\)\\|legend\s+\\(?:center\\|left\\|right\\)\\|legend\s+\\(?:bottom\\|top\\)\s+\\(?:center\\|left\\|right\\)\\)\s*\\('.*\\)?$")
|
||||
(defvar plantuml-indent-regexp-oldif-start "^.*if\s+\".*\"\s+then\s*\\('.*\\)?$" "used in current activity diagram, sometimes already mentioned as deprecated")
|
||||
(defvar plantuml-indent-regexp-macro-start "^\s*!definelong.*$")
|
||||
(defvar plantuml-indent-regexp-user-control-start "^.*'.*\s*PLANTUML_MODE_INDENT_INCREASE\s*.*$")
|
||||
(defvar plantuml-indent-regexp-start (list plantuml-indent-regexp-block-start
|
||||
plantuml-indent-regexp-group-start
|
||||
plantuml-indent-regexp-activate-start
|
||||
|
@ -525,7 +532,8 @@ or it is followed by line end.")
|
|||
plantuml-indent-regexp-header-start
|
||||
plantuml-indent-regexp-footer-start
|
||||
plantuml-indent-regexp-macro-start
|
||||
plantuml-indent-regexp-oldif-start))
|
||||
plantuml-indent-regexp-oldif-start
|
||||
plantuml-indent-regexp-user-control-start))
|
||||
(defvar plantuml-indent-regexp-block-end "^\s*\\(?:}\\|endif\\|else\s*.*\\|end\\)\s*\\('.*\\)?$")
|
||||
(defvar plantuml-indent-regexp-note-end "^\s*\\(end\s+note\\|end[rh]note\\)\s*\\('.*\\)?$")
|
||||
(defvar plantuml-indent-regexp-group-end "^\s*end\s*\\('.*\\)?$")
|
||||
|
@ -538,6 +546,7 @@ or it is followed by line end.")
|
|||
(defvar plantuml-indent-regexp-legend-end "^\s*endlegend\s*\\('.*\\)?$")
|
||||
(defvar plantuml-indent-regexp-oldif-end "^\s*\\(endif\\|else\\)\s*\\('.*\\)?$")
|
||||
(defvar plantuml-indent-regexp-macro-end "^\s*!enddefinelong\s*\\('.*\\)?$")
|
||||
(defvar plantuml-indent-regexp-user-control-end "^.*'.*\s*PLANTUML_MODE_INDENT_DECREASE\s*.*$")
|
||||
(defvar plantuml-indent-regexp-end (list plantuml-indent-regexp-block-end
|
||||
plantuml-indent-regexp-group-end
|
||||
plantuml-indent-regexp-activate-end
|
||||
|
@ -550,7 +559,8 @@ or it is followed by line end.")
|
|||
plantuml-indent-regexp-header-end
|
||||
plantuml-indent-regexp-footer-end
|
||||
plantuml-indent-regexp-macro-end
|
||||
plantuml-indent-regexp-oldif-end))
|
||||
plantuml-indent-regexp-oldif-end
|
||||
plantuml-indent-regexp-user-control-end))
|
||||
(setq plantuml-font-lock-keywords
|
||||
`(
|
||||
(,plantuml-types-regexp . font-lock-type-face)
|
||||
|
|
Loading…
Reference in New Issue
Block a user