aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim_lsp
diff options
context:
space:
mode:
authorHirokazu Hata <h.hata.ai.t@gmail.com>2020-08-10 15:42:57 +0900
committerGitHub <noreply@github.com>2020-08-10 15:42:57 +0900
commitfc9d94ef006e082596c2e8724eb3f1c92ff203c7 (patch)
tree09c64f5003a326d13e9168fc4b3d28b8faca9f0d /lua/nvim_lsp
parentMerge pull request #298 from erw7/fix-windows-batch (diff)
parent[RFC] don't start up LSP for 'nofile' buffers (diff)
downloadnvim-lspconfig-fc9d94ef006e082596c2e8724eb3f1c92ff203c7.tar
nvim-lspconfig-fc9d94ef006e082596c2e8724eb3f1c92ff203c7.tar.gz
nvim-lspconfig-fc9d94ef006e082596c2e8724eb3f1c92ff203c7.tar.bz2
nvim-lspconfig-fc9d94ef006e082596c2e8724eb3f1c92ff203c7.tar.lz
nvim-lspconfig-fc9d94ef006e082596c2e8724eb3f1c92ff203c7.tar.xz
nvim-lspconfig-fc9d94ef006e082596c2e8724eb3f1c92ff203c7.tar.zst
nvim-lspconfig-fc9d94ef006e082596c2e8724eb3f1c92ff203c7.zip
Merge pull request #307 from beardedsakimonkey/patch-1
[RFC] don't start up LSP for 'nofile' buffers
Diffstat (limited to 'lua/nvim_lsp')
-rw-r--r--lua/nvim_lsp/configs.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/lua/nvim_lsp/configs.lua b/lua/nvim_lsp/configs.lua
index 48b5b6ee..8bbc6082 100644
--- a/lua/nvim_lsp/configs.lua
+++ b/lua/nvim_lsp/configs.lua
@@ -171,6 +171,9 @@ function configs.__newindex(t, config_name, config_def)
end)
function manager.try_add()
+ if vim.bo.buftype == 'nofile' then
+ return
+ end
local root_dir = get_root_dir(api.nvim_buf_get_name(0), api.nvim_get_current_buf())
local id = manager.add(root_dir)
if id then