mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-23 14:03:44 -05:00
Fix /* and /** expansion in various languages
Also adds +web-continue-block-comments option to control: /* * */ vs /* */ Has a known issue where the indentation for the closing delimiter is off by one when +web-continue-block-comments is disabled. Will have to look into that later.
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
;;; lang/web/+css.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; An improved newline+continue comment function
|
||||
(setq-hook! css-mode
|
||||
comment-indent-function #'+css/comment-indent-new-line)
|
||||
(defvar +web-continue-block-comments t
|
||||
"If non-nil, newlines in block comments are continued with a leading *.
|
||||
|
||||
(after! (:any css-mode sass-mode)
|
||||
(set-docsets! '(css-mode scss-mode sass-mode)
|
||||
"CSS" "HTML" "Bourbon" "Compass"
|
||||
["Sass" (memq major-mode '(scss-mode sass-mode))]))
|
||||
This also indirectly means the asterisks in the opening /* and closing */ will
|
||||
be aligned.
|
||||
|
||||
If set to `nil', disable all the above behaviors.")
|
||||
|
||||
(after! projectile
|
||||
(pushnew! projectile-other-file-alist
|
||||
@@ -21,6 +20,15 @@
|
||||
;;
|
||||
;;; Major modes
|
||||
|
||||
(setq-hook! 'css-mode-hook
|
||||
;; Correctly continue /* and // comments on newline-and-indent
|
||||
comment-line-break-function #'+css/comment-indent-new-line)
|
||||
|
||||
(after! (:any css-mode sass-mode)
|
||||
(set-docsets! '(css-mode scss-mode sass-mode)
|
||||
"CSS" "HTML" "Bourbon" "Compass"
|
||||
["Sass" (memq major-mode '(scss-mode sass-mode))]))
|
||||
|
||||
(add-hook! '(css-mode-hook sass-mode-hook stylus-mode-hook)
|
||||
#'rainbow-mode)
|
||||
|
||||
|
Reference in New Issue
Block a user