Vim YouCompleteMe使用LSP(以dart为例)

YCM(YouCompleteMe)是Vim下大名鼎鼎的补全插件,现在YCM也支持LSP了,因此可以使用YCM来补全支持LSP的代码,再加上YCM自带的 语义补全,写起代码来如有神助。

其实配置很简单,在 vimrc 中添加如下配置(以dart为例):

let g:ycm_language_server = [
  \   {
  \     'name': 'dart',
  \     'cmdline': ['dart', '/opt/dart-sdk/bin/snapshots/analysis_server.dart.snapshot', '--lsp'],
  \     'filetypes': [ 'dart' ],
  \   },
  \ ]

然后就可以进行补全了 :-)


更多文章
  • 使用Tornado和rst来写博客
  • Haskell do notation
  • foldl 和 foldr 的变换
  • Haskell TypeClass 笔记
  • 重新捡起你那吃灰的树莓派
  • Tornado 源码阅读
  • JavaScript权威指南笔记
  • Python零碎知识汇总
  • C语言的位操作
  • 分治
  • 关于python的decorator和descriptor
  • 程序设计实践笔记
  • Thinking Recursively
  • Block I/O
  • 如何解读c的声明