Minor refactor & revision across the board
This commit is contained in:
parent
fd8f8c5108
commit
0cf9d1f2f2
7 changed files with 19 additions and 19 deletions
|
@ -77,14 +77,15 @@
|
|||
:config
|
||||
(set-electric! 'rjsx-mode :chars '(?\} ?\) ?. ?>))
|
||||
(set-docsets! 'rjsx-mode +javascript-docsets)
|
||||
(add-hook! 'rjsx-mode-hook
|
||||
;; jshint doesn't know how to deal with jsx
|
||||
(push 'javascript-jshint flycheck-disabled-checkers))
|
||||
(when (featurep! :feature syntax-checker)
|
||||
(add-hook! 'rjsx-mode-hook
|
||||
;; jshint doesn't know how to deal with jsx
|
||||
(push 'javascript-jshint flycheck-disabled-checkers)))
|
||||
|
||||
;; `rjsx-electric-gt' relies on js2's parser to tell it when the cursor is in
|
||||
;; a self-closing tag, so that it can insert a matching ending tag at point.
|
||||
;; However, the parser doesn't run immediately, so a fast typist can outrun
|
||||
;; it, causing tags to stay unclosed, so force it to parse.
|
||||
;; it, causing tags to stay unclosed, so we force it to parse.
|
||||
(defun +javascript|reparse (n)
|
||||
;; if n != 1, rjsx-electric-gt calls rjsx-maybe-reparse itself
|
||||
(if (= n 1) (rjsx-maybe-reparse)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue