aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitconfig4
-rw-r--r--.vim/after/plugin/yegappan-lsp.vim39
2 files changed, 23 insertions, 20 deletions
diff --git a/.gitconfig b/.gitconfig
index 66b9899..8090131 100644
--- a/.gitconfig
+++ b/.gitconfig
@@ -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,