diff options
| author | Raphael <glepnir@neovim.pro> | 2023-06-14 21:02:33 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-14 21:02:33 +0800 |
| commit | 295c646488d5baa63c6c4da68fe61171b9257375 (patch) | |
| tree | 19961dec029841e6b3cfdcb127377db5ec6a7a09 /lua | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-295c646488d5baa63c6c4da68fe61171b9257375.tar nvim-lspconfig-295c646488d5baa63c6c4da68fe61171b9257375.tar.gz nvim-lspconfig-295c646488d5baa63c6c4da68fe61171b9257375.tar.bz2 nvim-lspconfig-295c646488d5baa63c6c4da68fe61171b9257375.tar.lz nvim-lspconfig-295c646488d5baa63c6c4da68fe61171b9257375.tar.xz nvim-lspconfig-295c646488d5baa63c6c4da68fe61171b9257375.tar.zst nvim-lspconfig-295c646488d5baa63c6c4da68fe61171b9257375.zip | |
fix(command): LspRestart should attached before buffers (#2674)
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/configs.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/lspconfig/configs.lua b/lua/lspconfig/configs.lua index e4d1c051..e74570f1 100644 --- a/lua/lspconfig/configs.lua +++ b/lua/lspconfig/configs.lua @@ -116,8 +116,8 @@ function configs.__newindex(t, config_name, config_def) local get_root_dir = config.root_dir - function M.launch() - local bufnr = api.nvim_get_current_buf() + function M.launch(bufnr) + bufnr = bufnr or api.nvim_get_current_buf() local bufname = api.nvim_buf_get_name(bufnr) if (#bufname == 0 and not config.single_file_support) or (#bufname ~= 0 and not util.bufname_valid(bufname)) then return |
