neovim/runtime/lua/vim
phanium 888a803755
fix(lsp): vim.lsp.start fails if existing client has no workspace_folders #31608
Problem:
regression since https://github.com/neovim/neovim/pull/31340

`nvim -l repro.lua`:
```lua
vim.lsp.start { cmd = { 'lua-language-server' }, name = 'lua_ls' }
vim.lsp.start { cmd = { 'lua-language-server' }, name = 'lua_ls', root_dir = 'foo' }

-- swapped case will be ok:
-- vim.lsp.start { cmd = { 'lua-language-server' }, name = 'lua_ls', root_dir = 'foo' }
-- vim.lsp.start { cmd = { 'lua-language-server' }, name = 'lua_ls' }
```

Failure:
```
E5113: Error while calling lua chunk: /…/lua/vim/lsp.lua:214: bad argument #1 to
'ipairs' (table expected, got nil)
stack traceback:
        [C]: in function 'ipairs'
        /…/lua/vim/lsp.lua:214: in function 'reuse_client'
        /…/lua/vim/lsp.lua:629: in function 'start'
        repro.lua:34: in main chunk
```
2024-12-18 06:37:12 -08:00
..
_meta feat(terminal)!: cursor shape and blink (#31562) 2024-12-17 07:11:41 -06:00
deprecated refactor(lua): use tuple syntax everywhere #29111 2024-06-04 06:06:02 -07:00
filetype vim-patch:9.1.0886: filetype: debian control file not detected 2024-11-25 00:05:12 +01:00
func feat(vim.validate): improve fast form and deprecate spec form 2024-10-21 11:32:06 +01:00
health fix(health): check more "old" files #30421 2024-09-19 06:34:23 -07:00
lsp feat(lsp): show server version in :checkhealth #31611 2024-12-18 06:31:25 -08:00
provider docs: misc 2024-10-23 14:13:42 +02:00
treesitter fix(treesitter): #trim! range for nodes ending at col 0 #31488 2024-12-07 03:01:59 -08:00
ui/clipboard fix(osc52): use nvim_chan_send() to stderr for copying (#26690) 2023-12-21 11:47:04 +08:00
_buf.lua feat(defaults): dot-repeat [<Space> #31186 2024-11-17 13:31:24 -08:00
_comment.lua fix(treesitter): suppress get_parser warnings via opts.error 2024-09-28 00:31:45 +02:00
_defaults.lua feat(defaults): disable 'foldcolumn' in terminal buffers (#31480) 2024-12-06 10:19:24 -06:00
_editor.lua fix(messages): proper multiline Lua print() messages #31205 2024-11-17 10:21:50 -08:00
_init_packages.lua refactor(types): more fixes 2024-03-06 10:45:22 +00:00
_inspector.lua refactor: add vim._resolve_bufnr 2024-12-07 16:58:40 +00:00
_meta.lua refactor: rename vim.highlight => vim.hl 2024-10-21 00:54:43 +02:00
_options.lua docs(lua): "vim.bo" is always equivalent to :setlocal (#30733) 2024-10-09 11:31:14 +00:00
_system.lua fix(vim.system): close pipe handles after process handle 2024-12-04 14:44:40 +00:00
_watch.lua feat(vim.validate): improve fast form and deprecate spec form 2024-10-21 11:32:06 +01:00
diagnostic.lua fix(diagnostic): vim.diagnostic.setqflist() opens loclist on first call #31585 2024-12-16 06:38:57 -08:00
F.lua fix(diagnostic): typing 2024-01-16 09:33:10 +00:00
filetype.lua vim-patch:9.1.0929: filetype: lalrpop files are not recognized 2024-12-16 00:19:16 +01:00
fs.lua docs: add tag vim.fs.exists() and document suggested replacement 2024-11-27 19:56:08 +01:00
func.lua fix(treesitter): return correct match table in iter_captures() 2024-03-27 10:39:46 +00:00
glob.lua fix: another round of type annotation fixes 2024-10-31 11:55:23 +00:00
health.lua feat(health): highlight headings #30525 2024-09-26 07:45:03 -07:00
hl.lua feat(vim.validate): improve fast form and deprecate spec form 2024-10-21 11:32:06 +01:00
inspect.lua fix(inspect): escape identifiers that are lua keywords (#19898) 2022-08-23 13:02:55 +02:00
iter.lua docs: misc #28970 2024-09-01 13:01:24 -07:00
keymap.lua feat(vim.validate): improve fast form and deprecate spec form 2024-10-21 11:32:06 +01:00
loader.lua misc: keep deprecated vim.loader.disable stub (#31450) 2024-12-04 10:17:46 -06:00
lsp.lua fix(lsp): vim.lsp.start fails if existing client has no workspace_folders #31608 2024-12-18 06:37:12 -08:00
provider.lua refactor: create function for deferred loading 2024-02-03 16:53:41 +01:00
re.lua docs: auto-generate docs for vim.lpeg and vim.re 2024-01-14 11:08:33 +00:00
secure.lua feat(vim.validate): improve fast form and deprecate spec form 2024-10-21 11:32:06 +01:00
shared.lua feat(lsp): add vim.lsp.config and vim.lsp.enable 2024-12-10 17:16:01 +00:00
snippet.lua fix(snippet): modify base indentation when there's actually whitespace (#29670) 2024-07-16 19:30:22 +02:00
termcap.lua fix: another round of type annotation fixes 2024-10-31 11:55:23 +00:00
text.lua perf(vim.text): use lookup table implementation for hex encoding (#30080) 2024-11-26 13:56:01 -06:00
treesitter.lua feat(treesitter): include capture id in return value of get_captures_at_pos() #30559 2024-12-11 04:34:24 -08:00
ui.lua fix: another round of type annotation fixes 2024-10-31 11:55:23 +00:00
uri.lua fix(uri): uri_encode encodes brackets incorrectly for RFC2732 #31284 2024-12-11 05:48:17 -08:00
version.lua docs: render @since versions, 0 means experimental #30649 2024-10-04 02:13:31 -07:00
vimhelp.lua fix(treesitter): suppress get_parser warnings via opts.error 2024-09-28 00:31:45 +02:00