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)
),這樣會讓我感覺還是有希望的……这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.