Apply /* and /** pairs to more modes
Including js, ts, rjsx, rust, all C modes, php, and all css modes (scss, less, and stylus). Requested by @ar1a
This commit is contained in:
parent
c9ac30889c
commit
c78c6495f1
4 changed files with 8 additions and 12 deletions
|
@ -172,6 +172,14 @@ fundamental-mode) for performance sake."
|
||||||
(sp-local-pair '(xml-mode nxml-mode php-mode) "<!--" "-->"
|
(sp-local-pair '(xml-mode nxml-mode php-mode) "<!--" "-->"
|
||||||
:post-handlers '(("| " "SPC")))
|
:post-handlers '(("| " "SPC")))
|
||||||
|
|
||||||
|
(sp-local-pair
|
||||||
|
'(js2-mode typescript-mode rjsx-mode rust-mode
|
||||||
|
c-mode c++-mode objc-mode java-mode php-mode
|
||||||
|
css-mode scss-mode less-css-mode stylus-mode)
|
||||||
|
"/*" "*/"
|
||||||
|
:actions '(insert)
|
||||||
|
:post-handlers '(("| " "SPC") ("|\n*/[i][d-2]" "RET") ("\n* ||\n*/[i][d-2]" "*")))
|
||||||
|
|
||||||
(smartparens-global-mode +1))
|
(smartparens-global-mode +1))
|
||||||
|
|
||||||
;; Branching undo
|
;; Branching undo
|
||||||
|
|
|
@ -135,9 +135,6 @@ compilation database is present in the project.")
|
||||||
:when '(+cc-sp-point-is-template-p +cc-sp-point-after-include-p)
|
:when '(+cc-sp-point-is-template-p +cc-sp-point-after-include-p)
|
||||||
:post-handlers '(("| " "SPC"))))
|
:post-handlers '(("| " "SPC"))))
|
||||||
(sp-with-modes '(c-mode c++-mode objc-mode java-mode)
|
(sp-with-modes '(c-mode c++-mode objc-mode java-mode)
|
||||||
(sp-local-pair "/*" "*/" :post-handlers '(("||\n[i]" "RET") ("| " "SPC")))
|
|
||||||
;; Doxygen blocks
|
|
||||||
(sp-local-pair "/**" "*/" :post-handlers '(("||\n[i]" "RET") ("||\n[i]" "SPC")))
|
|
||||||
(sp-local-pair "/*!" "*/" :post-handlers '(("||\n[i]" "RET") ("[d-1]< | " "SPC")))))
|
(sp-local-pair "/*!" "*/" :post-handlers '(("||\n[i]" "RET") ("[d-1]< | " "SPC")))))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,11 +17,6 @@
|
||||||
;; Other
|
;; Other
|
||||||
:yield "import"))
|
:yield "import"))
|
||||||
|
|
||||||
(after! smartparens
|
|
||||||
(sp-with-modes '(js2-mode typescript-mode rjsx-mode)
|
|
||||||
(sp-local-pair "/**" "" :post-handlers '(("| " "SPC") ("|\n*/[i][d-2]" "RET")))
|
|
||||||
(sp-local-pair "/*" "*/" :post-handlers '(("| " "SPC") ("|\n*/[i][d-2]" "RET")))))
|
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Major modes
|
;; Major modes
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
;; An improved newline+continue comment function
|
;; An improved newline+continue comment function
|
||||||
(setq-hook! css-mode comment-indent-function #'+css/comment-indent-new-line)
|
(setq-hook! css-mode comment-indent-function #'+css/comment-indent-new-line)
|
||||||
|
|
||||||
(after! smartparens
|
|
||||||
(sp-with-modes '(css-mode scss-mode less-css-mode stylus-mode)
|
|
||||||
(sp-local-pair "/*" "*/" :post-handlers '(("||\n[i]" "RET") ("| " "SPC")))))
|
|
||||||
|
|
||||||
(map! :map* (css-mode-map scss-mode-map less-css-mode-map)
|
(map! :map* (css-mode-map scss-mode-map less-css-mode-map)
|
||||||
:localleader
|
:localleader
|
||||||
:n "rb" #'+css/toggle-inline-or-block)
|
:n "rb" #'+css/toggle-inline-or-block)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue