~gpanders/dotfiles

1e3d13c0aa34c1d87b518c19c66edcc975f7944d — Gregory Anders a month ago af27400
vim: add guards in vim-lsc configuration
1 files changed, 17 insertions(+), 7 deletions(-)

M .vim/plugin/lsc.vim
M .vim/plugin/lsc.vim => .vim/plugin/lsc.vim +17 -7
@@ 14,11 14,21 @@ let g:lsc_auto_map = {
let g:lsc_enable_diagnostics = v:false

" Configure LSP servers
let g:lsc_server_commands = {
            \ 'python': {'command': 'pyls', 'suppress_stderr': v:true},
            \ 'c': {'command': 'clangd', 'suppress_stderr': v:true},
            \ 'go': {'command': 'gopls serve', 'log_level': -1, 'suppress_stderr': v:true},
            \ 'rust': {'command': 'rls', 'suppress_stderr': v:true},
            \ }
let g:lsc_server_commands = {}

if executable('pyls')
    let g:lsc_server_commands.python = {'command': 'pyls', 'suppress_stderr': v:true}
endif

if executable('clangd')
    let g:lsc_server_commands.c = {'command': 'clangd', 'suppress_stderr': v:true}
    let g:lsc_server_commands.cpp = g:lsc_server_commands.c
endif

if executable('gopls')
    let g:lsc_server_commands.go = {'command': 'gopls serve', 'log_level': -1, 'suppress_stderr': v:true}
endif

let g:lsc_server_commands.cpp = g:lsc_server_commands.c
if executable('rls')
    let g:lsc_server_commands.rust = {'command': 'rls', 'suppress_stderr': v:true}
endif