diff options
| author | Robert Günzler <r@gnzler.io> | 2021-12-07 13:56:19 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2021-12-07 14:00:27 +0100 |
| commit | 48ea700f760544ae029c723b1d7ff0915a3ef358 (patch) | |
| tree | 532cd4d4e8656616b267403d60dcaeeb7b47caa4 /.vim | |
| parent | 9b5f086344ac06d9926dd8ca48140f31de29330e (diff) | |
vim: stop lsp client in diff mode
Diffstat (limited to '.vim')
| -rw-r--r-- | .vim/lua/lsp.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/.vim/lua/lsp.lua b/.vim/lua/lsp.lua index 47eef75..588d31a 100644 --- a/.vim/lua/lsp.lua +++ b/.vim/lua/lsp.lua @@ -14,6 +14,12 @@ require('lspconfig/configs').zk = { } local my_attach = function(client, bufnr) + if vim.opt.diff:get() then + vim.notify('not running LSP client in diff mode') + vim.lsp.stop_client() + return + end + spinner_lsp.on_attach(client, bufnr) if client.resolved_capabilities.goto_definition then |