From 1fe4ab347626732c1d4f56f4f7255bc979abec1c Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Sun, 15 Dec 2019 23:17:22 +0900 Subject: Add clangd --- plugin/lsp_setup.vim | 3 ++- setting.json | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/plugin/lsp_setup.vim b/plugin/lsp_setup.vim index 074de49..c21626b 100644 --- a/plugin/lsp_setup.vim +++ b/plugin/lsp_setup.vim @@ -4,7 +4,7 @@ let s:setting = json_decode(join(readfile(expand(':h:h').'/setting.json') function! s:executable(cmd) abort if executable(a:cmd) - return a:cmd + return 1 endif let l:paths = get(g:, 'lsp_settings_extra_paths', '') if type(l:paths) == type([]) @@ -79,6 +79,7 @@ function! s:vimlsp_setting() abort continue endif for l:server in s:setting[l:ft] + echomsg l:server.command if s:executable(l:server.command) exe 'source' printf('%s/%s.vim', s:setting_dir, l:server.command) let l:found += 1 diff --git a/setting.json b/setting.json index 0eceab6..59cdf8c 100644 --- a/setting.json +++ b/setting.json @@ -1,4 +1,16 @@ { + "c": [ + { + "command": "clangd", + "requires": [] + } + ], + "cpp": [ + { + "command": "clangd", + "requires": [] + } + ], "typescript": [ { "command": "typescript-language-server", -- cgit v1.2.3-54-g00ecf