Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ccls.el
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,10 @@ DIRECTION can be \"D\", \"L\", \"R\" or \"U\"."
ccls-root-files))
(expand-file-name dir))))

(cl-defmethod lsp-execute-command
((_server (eql ccls)) (command (eql ccls.xref)) arguments)
(lsp-defun ccls--show-xrefs ((&Command :command :arguments?))
(when-let ((xrefs (lsp--locations-to-xref-items
(lsp--send-execute-command command arguments))))
(xref--show-xrefs xrefs nil)))
(lsp--send-execute-command command arguments?))))
(lsp-show-xrefs xrefs nil t)))

(advice-add 'lsp--suggest-project-root :before-until #'ccls--suggest-project-root)

Expand All @@ -162,6 +161,7 @@ DIRECTION can be \"D\", \"L\", \"R\" or \"U\"."
:notification-handlers
(lsp-ht ("$ccls/publishSkippedRanges" #'ccls--publish-skipped-ranges)
("$ccls/publishSemanticHighlight" #'ccls--publish-semantic-highlight))
:action-handlers (lsp-ht ("ccls.xref" #'ccls--show-xrefs))
:initialization-options (lambda () ccls-initialization-options)
:library-folders-fn ccls-library-folders-fn))

Expand Down