https://maskray.me/blog/2018-12-25-ccls-release
聖誕發佈新版https://github.com/MaskRay/ccls/releases/tag/0.20181225
workspace/didChangeWatchedFiles
works (tested on VSCode and coc.nvim) and file deletion will remove index symbols.ccls
enhancement #171 added new directives %compile_commands.json
%h
%hpp
%objective-c
%objective-cpp
-v=1
dumps command line options of files for parsingtextDocument/declaration
and LocationLink[]
return types."exit"
#159signatureHelp.signatureInformationparameterInformation.labelOffsetSupport
cf. https://github.com/Microsoft/language-server-protocol/issues/640Content-Length:
from 32K to 25K for some cases#include <
completion for -I dir
Text
, instead of Interface
clang_complete.cc
-> sema_manager.cc
)-init=
: "initializationOptions" from client are applied first, then -init=
. Scalar options will be overridden while arrays will get concatenated重點是
exit(0)
(中斷一個正在寫 cache 的 indexer thread 下次可能讀不出來,但非常罕見)textDocument/documentHighlight
textDocument/hover
等)會報告not indexed
,顯示在 echo area,比較惱人。我在pipeline.cc
引入了一個 backlog 解決這一問題,詳見https://github.com/MaskRay/ccls/pull/176。code lens 可以用(add-hook 'lsp-after-open-hook #'ccls-code-lens-mode)
而不需要(run-at-time 0.5 nil #'ccls-code-lens-mode)
了.ccls
和compile_commands.json
的協作,詳見 Paul Smith 的分析https://github.com/MaskRay/ccls/issues/115#issuecomment-449455357workspace/didChangeWatchedFiles
,lsp-mode 尚未LocationLink
支援,targetSelectRange
可以指向名字,而targetRange
指向輪廓。mouse hover 時可以有可視效果(對於 Emacs 用途不大)xref-file-location
並非表示interface Range
的良好選擇,因爲僅能表示點(line column),不能表示區間。lsp-ui-peek 裏需要區間信息 highlight 文本,無法良好地用 xref 表達,在 lsp-ui-peek 裏的實現有點噁心(希望有人能改好);; 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))))
(gethash "range" xx)
)都改成 plists + keyword keys ((plist-get xx :range)
),這樣會讓我感覺還是有希望的…… 1
mxi1 2018-12-27 16:13:14 +08:00
一直没时间试, 等把 emacs 的 ccls 环境搭好,再来咨询.哈哈
|
2
zivyou 2018-12-27 18:51:56 +08:00
mark
|
3
visylar 2018-12-28 02:27:57 +08:00
ccls for vscode is great! Thank you
|
4
saintaugustinus 2018-12-29 00:52:04 +08:00
支持支持
|