YouCompleteMe with JSON

step0、参考:language servers used with YCM

step1、安装依赖

安装时node.jsnpm
运行时node.js

step2、创建~/.lsp/json-language-server目录

mkdir -p ~/.lsp/json-language-server

step3、进入~/.lsp/json-language-server目录

cd ~/.lsp/json-language-server

step4、使用npm安装vscode-json-languageserver

npm install vscode-json-languageserver

step5、在~/.vimrc中加入如下的配置

let g:ycm_language_server = [
    \{  'name': 'json',
    \   'filetypes': [ 'json' ],
    \   'cmdline': [ 'node', expand( '$HOME/.lsp/json-language-server/node_modules/.bin/vscode-json-languageserver' ), '--stdio' ],
    \}
]