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
|
@ -26,10 +26,7 @@
|
|||
(flycheck-mode +1)
|
||||
(eldoc-mode +1)))
|
||||
(add-hook! (typescript-mode web-mode) #'+typescript|tide-setup)
|
||||
|
||||
(map! :map typescript-mode-map
|
||||
:m "gd" #'tide-jump-to-definition
|
||||
:localleader
|
||||
(map! :localleader
|
||||
:m "fh" #'tide-documentation-at-point))
|
||||
|
||||
|
||||
|
@ -37,6 +34,11 @@
|
|||
:after typescript-mode
|
||||
:config
|
||||
(set! :company-backend 'typescript-mode '(company-tide))
|
||||
(set! :jump 'typescript-mode
|
||||
:definition #'tide-jump-to-definition
|
||||
:references #'tide-references
|
||||
:documentation #'tide-documentation-at-point)
|
||||
|
||||
(setq tide-format-options
|
||||
'(:insertSpaceAfterFunctionKeywordForAnonymousFunctions t
|
||||
:placeOpenBraceOnNewLineForFunctions nil))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue