diff --git a/core/plugins.vim b/core/plugins.vim index e2e1809..75dafe5 100644 --- a/core/plugins.vim +++ b/core/plugins.vim @@ -356,6 +356,9 @@ local on_attach = function(client, bufnr) augroup END ]], false) end + + local msg = string.format('Language server %s started!' , client.name) + vim.api.nvim_echo({{msg, 'MoreMsg'}, }, false, {}) end local lspconfig = require("lspconfig") @@ -377,13 +380,15 @@ lspconfig.pyls.setup { } -- set up ccls, see https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#ccls -lspconfig.ccls.setup { - on_attach = on_attach, - root_dir = lspconfig.util.root_pattern("compile_commands.json", ".ccls", ".git"), - init_options = { - highlight = { lsRanges = true } +if vim.fn.executable('ccls') then + lspconfig.ccls.setup { + on_attach = on_attach, + root_dir = lspconfig.util.root_pattern("compile_commands.json", ".ccls", ".git"), + init_options = { + highlight = { lsRanges = true } + } } -} +end -- set up vim-language-server lspconfig.vimls.setup{ on_attach = on_attach }