C/C++/ObjC language server ccls 0.20181225 release - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
请不要在回答技术问题时复制粘贴 AI 生成的内容
MaskRay
V2EX    程序员

C/C++/ObjC language server ccls 0.20181225 release

  •  
  •   MaskRay
    MaskRay 2018-12-27 16:07:01 +08:00 2653 次点击
    这是一个创建于 2483 天前的主题,其中的信息可能已经有所发展或是发生改变。

    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 parsing
    • fuzzy_match: when the completion filter begins with a letter, builtin macros prefixed with an underscore will not be returned
    • Support textDocument/declaration and LocationLink[] return types.
    • Properly handle "exit" #159
    • Support signatureHelp.signatureInformationparameterInformation.labelOffsetSupport cf. https://github.com/Microsoft/language-server-protocol/issues/640
    • codeAction: fixed an incompatibility issue with VSCode

    Completion

    • More precise diagnostics/completion: an included file that has been changed does not need to be saved to take effect.
    • Decreased Content-Length: from 32K to 25K for some cases
    • On clang < 8, fixed #include < completion for -I dir
    • Macros are categorized as Text, instead of Interface
    • Refactor and rename (clang_complete.cc -> sema_manager.cc)
    • C++17 deduction guide #173

    Others

    • Support multiple -init=: "initializationOptions" from client are applied first, then -init=. Scalar options will be overridden while arrays will get concatenated

    重是

    • 更加精的 diagnostics/completion(#include 中的依 unsaved buffers),之前 cquery/ccls 的做法都不好
    • 案除、重命名:之前案都不清理掉除的案 #170
    • #159 是之前 LSP exit exit(0)(中一正在 cache 的 indexer thread 下次可能不出,但非常罕)
    • 全的其他大大小小改
    • 如果一 textDocument 的索引未被加,request (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)
    • .cclscompile_commands.json的作, Paul Smith 的分析https://github.com/MaskRay/ccls/issues/115#issuecomment-449455357

    其他

    • ccls/wiki/Emacs 拆分成wiki/lsp-modewiki/egot,後者比陋(迎)
    • eglot 支援workspace/didChangeWatchedFiles,lsp-mode 尚未
    • 我 lsp-mode 加了LocationLink支援,targetSelectRange可以指向名字,而targetRange指向廓。mouse hover 可以有可效果(於 Emacs 用途不大)
    • xref.el 的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)))) 
    4 条回复    2018-12-29 00:52:04 +08:00
    mxi1
        1
    mxi1  
       2018-12-27 16:13:14 +08:00
    一直没时间试, 等把 emacs 的 ccls 环境搭好,再来咨询.哈哈
        2
    zivyou  
       2018-12-27 18:51:56 +08:00
    mark
    visylar
        3
    visylar  
       2018-12-28 02:27:57 +08:00
    ccls for vscode is great! Thank you
    saintaugustinus
        4
    saintaugustinus  
       2018-12-29 00:52:04 +08:00
    支持支持
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     2438 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 28ms UTC 15:51 PVG 23:51 LAX 08:51 JFK 11:51
    Do have faith in what you're doing.
    ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86