diff options
| author | Reiner Herrmann <reiner@reiner-h.de> | 2023-11-02 19:24:02 +0100 |
|---|---|---|
| committer | Reiner Herrmann <reiner@reiner-h.de> | 2023-11-02 19:24:02 +0100 |
| commit | f5726db8b66264dc3888050cf66c32ebbad1eff8 (patch) | |
| tree | 586ddd1cafc376e573fc80c027fc058dedcc362a | |
| parent | b193e74556f23c26fca8963e974863a7b9e19227 (diff) | |
vim: add LSP servers only if lsp binaries are available
| -rw-r--r-- | vimrc | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -152,12 +152,17 @@ call LspOptionsSet(#{ \ showDiagWithVirtualText: v:true, \ usePopupInCodeAction: v:true, \ }) + +if executable("clangd") call LspAddServer([#{ \ name: 'clangd', \ filetype: ['c', 'cpp'], \ path: 'clangd', \ args: ['--background-index'] \ }]) +endif + +if executable("rust-analyzer") call LspAddServer([#{ \ name: 'rust-analyzer', \ filetype: ['rust'], @@ -175,5 +180,6 @@ call LspAddServer([#{ \ }, \ } \ }]) +endif " vim: set et:sw=4:sts=4 |
