Function: hcl-mode
hcl-mode is an interactive and natively compiled function defined in
hcl-mode.el.
Signature
(hcl-mode)
Documentation
Major mode for editing hcl configuration file
In addition to any hooks its parent mode prog-mode might have run,
this mode runs the hook hcl-mode-hook, as the final or penultimate
step during initialization.
C-M-a hcl-beginning-of-defun
C-M-e hcl-end-of-defun
Key Bindings
This command is not in any keymaps.
Source Code
;; Defined in /nix/store/2sgzhgfr3sxpjh5dpyjjiqacrm3016bl-emacs-packages-deps/share/emacs/site-lisp/elpa/hcl-mode-20240220.1534/hcl-mode.el
;;;###autoload
(define-derived-mode hcl-mode prog-mode "HCL"
"Major mode for editing hcl configuration file"
(setq font-lock-defaults '((hcl-font-lock-keywords)))
(setq-local comment-start "#")
(setq-local comment-use-syntax t)
(setq-local comment-start-skip "\\(//+\\|/\\*+\\)\\s *")
;; indentation
(make-local-variable 'hcl-indent-level)
(setq-local indent-line-function 'hcl-indent-line)
(setq-local beginning-of-defun-function #'hcl-beginning-of-defun)
(setq-local end-of-defun-function #'hcl-end-of-defun)
(setq-local syntax-propertize-function #'hcl--syntax-propertize-function)
;; electric-mode
(setq-local electric-indent-chars (append "{}[]" electric-indent-chars)))