mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
lang/javascript: conform to naming conventions; refactor tide config
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user