Commit 93c18aee authored by Fangrui Song's avatar Fangrui Song


parent 8345c08d
......@@ -67,7 +67,7 @@
(define-key map [mouse-1]
(lambda () (interactive)
(when-let ((xrefs (lsp--locations-to-xref-items
(lsp--execute-command command))))
(lsp--send-execute-command (gethash "command" command) (gethash "arguments" command)))))
(xref--show-xrefs xrefs nil))))
(propertize (concat lpad (gethash "title" command) rpad)
'face 'ccls-code-lens-face
......@@ -70,6 +70,7 @@
;; Other ccls-specific methods
;; ---------------------------------------------------------------------
(defun ccls-info ()
(lsp-request "$ccls/info" (make-hash-table)))
......@@ -126,6 +127,12 @@ DIRECTION can be \"D\", \"L\", \"R\" or \"U\"."
(when-let (dir (locate-dominating-file default-directory ".ccls-root"))
(expand-file-name dir))))
(cl-defmethod lsp-execute-command
((_server (eql ccls)) (command (eql ccls.xref)) arguments)
(when-let ((xrefs (lsp--locations-to-xref-items
(lsp--send-execute-command command arguments))))
(xref--show-xrefs xrefs nil)))
(advice-add 'lsp--suggest-project-root :before-until #'ccls--suggest-project-root)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment