lang/javascript: conform to naming conventions; refactor tide config
This commit is contained in:
parent
8af94e8731
commit
cc5bfc6dc0
2 changed files with 25 additions and 25 deletions
|
@ -11,7 +11,8 @@
|
|||
js2-mode-show-parse-errors nil
|
||||
js2-mode-show-strict-warnings nil)
|
||||
|
||||
(add-hook! 'js2-mode-hook #'(flycheck-mode set-up-tide-mode add-node-modules-path rainbow-delimiters-mode))
|
||||
(add-hook! 'js2-mode-hook
|
||||
#'(flycheck-mode rainbow-delimiters-mode +javascript|add-node-modules-path))
|
||||
|
||||
(set! :repl 'js2-mode #'+javascript/repl)
|
||||
(set! :electric 'js2-mode :chars '(?\} ?\) ?.))
|
||||
|
@ -45,6 +46,17 @@
|
|||
:n "S" #'+javascript/skewer-this-buffer))
|
||||
|
||||
|
||||
(def-package! tide
|
||||
:hook (js2-mode . tide-setup)
|
||||
:config
|
||||
(set! :company 'js2-mode 'company-tide)
|
||||
(set! :lookup 'js2-mode
|
||||
:definition #'tide-jump-to-definition
|
||||
:references #'tide-references
|
||||
:documentation #'tide-documentation-at-point)
|
||||
(add-hook! 'tide-mode-hook #'(eldoc-mode tide-hl-identifier-mode)))
|
||||
|
||||
|
||||
;; A find-{definition,references} backend for js2-mode. NOTE The xref API is
|
||||
;; unstable and may break with an Emacs update.
|
||||
(def-package! xref-js2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue