diff options
| author | beardedsakimonkey <54521218+beardedsakimonkey@users.noreply.github.com> | 2020-07-19 16:12:55 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-19 16:12:55 -0700 |
| commit | 54e1755b93c69cc20dfe1fd05dbde7df91b514bc (patch) | |
| tree | 9ac752d6a26a50bb88d29f701599acc26d2d0fc5 /lua | |
| parent | Merge pull request #297 from kdheepak/kd/add-pr-template (diff) | |
| download | nvim-lspconfig-54e1755b93c69cc20dfe1fd05dbde7df91b514bc.tar nvim-lspconfig-54e1755b93c69cc20dfe1fd05dbde7df91b514bc.tar.gz nvim-lspconfig-54e1755b93c69cc20dfe1fd05dbde7df91b514bc.tar.bz2 nvim-lspconfig-54e1755b93c69cc20dfe1fd05dbde7df91b514bc.tar.lz nvim-lspconfig-54e1755b93c69cc20dfe1fd05dbde7df91b514bc.tar.xz nvim-lspconfig-54e1755b93c69cc20dfe1fd05dbde7df91b514bc.tar.zst nvim-lspconfig-54e1755b93c69cc20dfe1fd05dbde7df91b514bc.zip | |
[RFC] don't start up LSP for 'nofile' buffers
high level goal is to allow users some way to set filetype for a buffer in cases where they don't want to start up an LSP server, e.g. in a fuzzy finder preview
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 |
