neovim/test/functional
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
..
api feat(terminal)!: cursor shape and blink (#31562) 2024-12-17 07:11:41 -06:00
autocmd feat(terminal)!: cursor shape and blink (#31562) 2024-12-17 07:11:41 -06:00
core feat(terminal)!: cursor shape and blink (#31562) 2024-12-17 07:11:41 -06:00
editor fix(completion): avoid deleting text when completion leader changes #31448 2024-12-06 04:07:52 -08:00
ex_cmds fix(tests): needing two calls to setup a screen is cringe 2024-11-14 12:40:57 +01:00
fixtures fix(lsp): retrigger diagnostics request on server cancellation (#31345) 2024-11-25 11:48:11 -06:00
legacy feat(terminal)!: cursor shape and blink (#31562) 2024-12-17 07:11:41 -06:00
lua feat(terminal)!: cursor shape and blink (#31562) 2024-12-17 07:11:41 -06:00
options fix(api): not using TRY_WRAP, generic error messages #31595 2024-12-16 04:00:20 -08:00
plugin fix(lsp): vim.lsp.start fails if existing client has no workspace_folders #31608 2024-12-18 06:37:12 -08:00
provider docs: misc (#31138) 2024-11-21 06:50:30 +08:00
script refactor(lsp): rename offset_encoding to position_encoding #31286 2024-11-25 08:06:05 -08:00
shada refactor(api)!: rename Dictionary => Dict 2024-09-23 14:42:57 +02:00
terminal feat(terminal)!: cursor shape and blink (#31562) 2024-12-17 07:11:41 -06:00
testnvim test: move exec_lua logic to separate module 2024-11-21 11:35:16 +00:00
treesitter feat(treesitter): include capture id in return value of get_captures_at_pos() #30559 2024-12-11 04:34:24 -08:00
ui vim-patch:9.1.0940: Wrong cursor shape with "gq" and 'indentexpr' executes :normal (#31616) 2024-12-18 09:04:32 +08:00
vimscript fix(messages)!: vim.ui_attach message callbacks are unsafe 2024-11-14 13:23:11 +01:00
example_spec.lua fix(tests): needing two calls to setup a screen is cringe 2024-11-14 12:40:57 +01:00
preload.lua test: improve test conventions 2024-04-23 18:17:04 +02:00
testnvim.lua test: move exec_lua logic to separate module 2024-11-21 11:35:16 +00:00
testterm.lua feat(terminal)!: cursor shape and blink (#31562) 2024-12-17 07:11:41 -06:00