Replace :xref-backend setting with :jump
Which takes :definitions, :references, :documentation and :xref-backend. Each accepts a function that will jump to definitions, references, and documentation respectively. If a major-mode has an :xref-backend, you don't need :definitions or :references.
This commit is contained in:
parent
928812da8a
commit
bc3aee2a4f
6 changed files with 102 additions and 56 deletions
|
@ -11,6 +11,10 @@
|
|||
(add-hook! 'js2-mode-hook
|
||||
#'(flycheck-mode highlight-indentation-mode rainbow-delimiters-mode))
|
||||
|
||||
(set! :repl 'js2-mode '+javascript/repl)
|
||||
(set! :electric 'js2-mode :chars '(?\} ?\) ?.))
|
||||
(set! :jump 'js2-mode :xref-backend #'xref-js2-xref-backend)
|
||||
|
||||
;; Conform switch-case indentation to editorconfig's config
|
||||
(set! :editorconfig :add '(js2-mode js2-basic-offset js-switch-indent-offset))
|
||||
|
||||
|
@ -23,10 +27,6 @@
|
|||
(setq-local flycheck-javascript-eslint-executable eslint))))
|
||||
(add-hook 'flycheck-mode-hook #'+javascript|init-flycheck-elint)
|
||||
|
||||
(set! :repl 'js2-mode '+javascript/repl)
|
||||
(set! :electric 'js2-mode :chars '(?\} ?\) ?.))
|
||||
(set! :xref-backend 'js2-mode 'xref-js2-xref-backend)
|
||||
|
||||
(sp-with-modes '(js2-mode rjsx-mode)
|
||||
(sp-local-pair "/* " " */" :post-handlers '(("| " "SPC"))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue