ccls 0.20181225 release
2018-12-25 01:00:00 Author: maskray.me(查看原文) 阅读量:136 收藏

;; xref.el

(defclass xref-file-location (xref-location)

((file :type string :initarg :file)

(line :type fixnum :initarg :line :reader xref-location-line)

(column :type fixnum :initarg :column :reader xref-file-location-column))

:documentation "A file location is a file/line/column triple.

Line numbers start from 1 and columns from 0.")

;; lsp-ui-peek.el

(-if-let (uri (gethash "uri" x))

(-let (((&hash "start" (&hash "line" "character")) (gethash "range" x)))

(lsp-ui-peek--goto-xref `(:file ,(lsp--uri-to-path uri) :line ,line :column ,character)))

(-let (((&hash "start" (&hash "line" "character")) (or (gethash "targetSelectionRange" x) (gethash "targetRange" x))))

(lsp-ui-peek--goto-xref `(:file ,(lsp--uri-to-path (gethash "targetUri" x)) :line ,line :column ,character))))


文章来源: http://maskray.me/blog/2018-12-24-ccls-release
如有侵权请联系:admin#unsafe.sh