diff options
author | Guangxiong Lin <[email protected]> | 2024-01-23 23:41:11 +0800 |
---|---|---|
committer | Guangxiong Lin <[email protected]> | 2024-01-23 23:41:11 +0800 |
commit | a0991d38a37a118955b7e84b4fcfc2571058924c (patch) | |
tree | 70499b9bdee8cc57a04beffde71e6a44a2efa02e | |
parent | c18109ba364e6e5e5a3ad048c1e8642b3d71c54b (diff) | |
download | dotfiles-a0991d38a37a118955b7e84b4fcfc2571058924c.tar.gz dotfiles-a0991d38a37a118955b7e84b4fcfc2571058924c.tar.bz2 dotfiles-a0991d38a37a118955b7e84b4fcfc2571058924c.zip |
Update configuration
-rw-r--r-- | .gitconfig | 4 | ||||
-rw-r--r-- | .vim/after/plugin/yegappan-lsp.vim | 39 |
2 files changed, 23 insertions, 20 deletions
@@ -26,8 +26,8 @@ co = checkout st = status stsb = status --short --branch - df = diff --color-words - dfc = diff --color-words --cached + df = diff + dfc = diff --cached dt = difftool mt = mergetool diff --git a/.vim/after/plugin/yegappan-lsp.vim b/.vim/after/plugin/yegappan-lsp.vim index 1f1ef45..3c1a9dc 100644 --- a/.vim/after/plugin/yegappan-lsp.vim +++ b/.vim/after/plugin/yegappan-lsp.vim @@ -1,23 +1,26 @@ packadd yegappan-lsp -" Go language server -call LspAddServer([#{ - \ name: 'golang', - \ filetype: ['go', 'gomod'], - \ omnicompl: v:true, - \ path: exepath('gopls'), - \ args: ['serve'], - \ syncInit: v:true - \ }]) - -call LspAddServer([#{ - \ name: 'ruby', - \ filetype: ['ruby'], - \ omnicompl: v:true, - \ path: exepath('solargraph'), - \ args: ['stdio'], - \ syncInit: v:true - \ }]) +if executable('gopls') + call LspAddServer([#{ + \ name: 'golang', + \ filetype: ['go', 'gomod'], + \ omnicompl: v:true, + \ path: exepath('gopls'), + \ args: ['serve'], + \ syncInit: v:true + \ }]) +endif + +if executable('solargraph') + call LspAddServer([#{ + \ name: 'ruby', + \ filetype: ['ruby'], + \ omnicompl: v:true, + \ path: exepath('solargraph'), + \ args: ['stdio'], + \ syncInit: v:true + \ }]) +endif call LspOptionsSet(#{ \ aleSupport: v:true, |