diff options
| author | Hirokazu Hata <h.hata.ai.t@gmail.com> | 2020-08-10 15:42:57 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-10 15:42:57 +0900 |
| commit | fc9d94ef006e082596c2e8724eb3f1c92ff203c7 (patch) | |
| tree | 09c64f5003a326d13e9168fc4b3d28b8faca9f0d /lua | |
| parent | Merge pull request #298 from erw7/fix-windows-batch (diff) | |
| parent | [RFC] don't start up LSP for 'nofile' buffers (diff) | |
| download | nvim-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')
| -rw-r--r-- | lua/nvim_lsp/configs.lua | 3 |
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 |
