Problem:
Users may be unaware that setting `g:clipboard` after providers are
initialized has no effect, and that `has('clipboard')` initializes
providers, as in #13062.
Solution:
Note the restriction and link to workarounds in FAQ for discoverability.
(cherry picked from commit 2a906bfad6)
Problem:
`on_list` is supposed to replace the default list-handler. With the current order of these `if` statements `on_list` won't be called if `loclist` is true.
Solution:
Change the order of the relevant blocks.
(cherry picked from commit 0501c5fd09)
Problem: when option value is false, it's treated as invalid
then trigger FileType event again
Solution: use cached false value
(cherry picked from commit babdab2f70)
Problem:
Two cases lsp.enable() won't work in the first FileType event
1. lsp.enable luals inside FileType or ftplugin/lua.lua, then:
```
nvim a.lua
```
2. lsp.enable luals inside FileType or ftplugin/lua.lua, then:
```
nvim -> :edit a.lua -> :mksession! | restart +qa! so Session.vim
```
Solution:
Currently `v:vim_did_enter` is used to detected two cases:
1. "maunally enabled" (lsp.enable() or `:lsp enable`)
2. "inside FileType event"
To detect 2. correctly we use did_filetype().
(cherry picked from commit fd45bc8cab)
Following is a list of fix/feature commits in this release.
See `:help news` in Nvim for release notes.
FEATURES
--------------------------------------------------------------------------------
- b92e92b20d lsp: support auto-force escalation in client stop #36430
- 808d973fb0 lsp: warn about unknown filetype #36910
FIXES
--------------------------------------------------------------------------------
- 5e7af0ba01 :ls: check for finished terminal properly (#37303)
- 6ce7b9b851 api: autocmds mess up nvim_get_option_value's dummy buffer
- c124594b22 api: buffer overflow in nvim_buf_get_extmarks overlap #37184
- 7f51431c12 api: crash when moving curwin to other tabpage #35679
- 7896fe2dea api: do not allow opening float to closing buffer
- 91ebbc6c4e api: ignore split_disallowed when opening a float
- 10a1df2789 api: nvim_get_option_value dummy buffer crashes
- da825e5541 api: on_bytes gets stale data on :substitute #36487
- a9ffdca528 api: open_win leak from naughty autocommands
- 92849eacff api: parse_expression crash with ident and curly
- 1db945b584 api: parse_expression crash with unopened ] and node
- 79b67ce331 appimage: wrong $ARCH used by linuxdeploy #36712
- 46011a4e87 autocmd: fire TabClosed after freeing tab page
- a512d43716 autocmd: heap UAF with :bwipe in Syntax autocmd
- bea500dbeb autocmd: parsing of comma-separated buflocal patterns
- 648cf4e586 autocmd: skip empty comma-separated patterns properly
- fa24e045e9 buffer: defer w_buffer clearing to prevent dict watcher crash #36748
- 9fb49aacde buffer: don't allow changedtick watcher to delete buffer (#36764)
- cae3c838a7 buffer: don't reuse 1-line terminal buffer (#37261)
- 6f84ea7c66 buffer: switching buffer should respect jumpoptions+=view (#36969)
- 16ca7ceaed build: disable problematic marktree assert in RelWithDebInfo builds
- c469cba162 channel: unreference list after callback finishes (#37358)
- 43f5297fe3 clipboard: tmux clipboard data may be stale #36787
- 0358f37e3d clipboard: use tmux only in a tmux session (#36603)
- 7e99466a89 eval: 0 should mean current tabpage in gettabvar() (#36891)
- 656ff4c438 events: crash on WinScrolled #35995
- 63c5a101af install: only install "tee" on Windows #36629
- e8c21a8b51 langmap: assert failure on mapping to char >= 256 (#37291)
- 890c257194 lsp: check `nvim.lsp.enable` before `doautoall` #36518
- 275c769f01 lua: don't remove first char of non-file stacktrace source (#37008)
- 83c589d95f lua: relax `vim.wait()` timeout validation (#36907)
- bd2317f17f lua: separate vim.{g,b,w,t} types #37081
- f21c169a02 lua: vim._with() doesn't save boolean options properly (#37354)
- 9acbf5102f lua: vim.wait(math.huge) fails #36885
- 5143419e22 man.lua: :Man slow/hangs if MANPAGER is set #36689
- df9452ea9e man.lua: show_toc condition may cause infinite loop #36979
- 124c18261c marks: wrong line('w$', win) with conceal_lines (#37047)
- 6ef1b655fe normal: assertion failure with "gk" in narrow window (#37444)
- 5ca2eb5e48 remote: remote-ui connect timeout on slow networks #36800
- 2a3cd8dc80 rpc: don't overwrite already received results on error (#37339)
- e0fdfd3d4b scripts: release.sh
- ba600c495f session: window sizes not stored with float windows (#37344)
- 53090ab6a8 statusline: scope truncation bookkeeping
- 800118e204 terminal: :edit should respect 'bufhidden' with exited job (#37301)
- 4b41c284ed terminal: <Ignore> should be no-op (#37494)
- 074d342f63 terminal: avoid multiple terminals writing to same buffer (#37219)
- 2cc78732fc terminal: crash when TermClose deletes other buffers
- ea871923eb terminal: crash when TermClose switches back to terminal buffer
- ceed171485 terminal: crash with race between buffer close and OSC 2 (#37225)
- acc46e1dd7 terminal: handle closing terminal with pending TermRequest (#37227)
- bb31e7b345 terminal: inconsistent mode change when switching buffer (#37215)
- 40c974e689 terminal: restore options properly when switching buffer (#37485)
- 46f569a890 treesitter: use metadata in :EditQuery captures #37116
- 076f7994be trust: :trust command on Windows #36509
- d997c8e344 tutor: escape tutor filename #36539
- fcd0517dee ui.open: use "start" instead of deprecated "rundll32" #36731
- 6a507bad18 vim.fs: abspath(".") returns "/…/." (#36584)
- d974c684da vim.fs: root() should always return absolute path #36466
- 91fd4d127e vim.loader: randomized AppImage path pollutes luac cache #35636
- 45cda1bcf4 vim.loader: randomized AppImage path pollutes luac cache #36944
- d9631c7678 window: crash closing only non-float if autocmds :tabonly (#37218)
- f7e2554bfb window: crash closing split if autocmds close other splits (#37233)
- 7a9bced071 window: disallow closing autocmd window in other tabpage
- 88619e1aaf window: handle closing the only non-float in other tabpage
- d38ba7e2b8 window: restore b_nwindows if win_close_othertab keeps window
- 6338d2d54b window: win_move_after UAF from naughty autocmds (#37065)
- fac7c10eb8 windows: set manifest resource ID to 1 in nvim.rc for MinGW (#36611)
BUILD
--------------------------------------------------------------------------------
- d0ed06dcea haiku os support #36639
- a94647bb08 build(windows): restore "tee" on Windows #36627
- 1f93acc293 build(windows): vendor xxd.c (#36755)
REVERTED CHANGES
--------------------------------------------------------------------------------
- ae25f6942e fix: vim.lsp.omnifunc should not throw away other items
VIM PATCHES
--------------------------------------------------------------------------------
- b3eab00e55 229f79c: runtime(yaml): fix wrong order of undo_ftplugin suboptions
- 89f8e97099 3a324c8: runtime(doc): Fix typo in syntax.txt (#37522)
- d1cd79a4b6 64799a5: runtime(doc): clarify the behavior of CTRL-Z
- 0978d83c6e 7bc9880: runtime(make): do not automatically indent after a special target
- 781da755e8 8.1.0753: printf format not checked for semsg() (#37248)
- 44eae48b75 9.1.0893: No test that undofile format does not regress (#37193)
- 9a50420461 9.1.1872: Cmdline history not updated when mapping <Up> and <CR> (#36334)
- d1604e0f38 9.1.1969: Wrong cursor position after formatting with long 'formatprg' (#36918)
- fda8d2c717 9.1.2028: [security]: Buffer-overflow with incomplete multi-byte chars (#37133)
- f96e401b7e 9.1.2055: Division by zero in :file after failing to wipe buffer (#37268)
- f8961c3878 9.1.2058: b_locked_split is not checked for :sbuffer
- 9f2b991331 9.1.2066: :wqall! doesn't close a terminal like :qall! does (#37314)
- b1fa8f1430 9.1.2068: :bd/bw may try to switch to a closing buffer
- 600d9f35a4 9.1.2086: Memory leak when skipping invalid literal dict
- 0cc15be15d 9.1.2087: Crash when using :tabonly in BufUnload
- d052d22979 9.1.2090: Last buffer not freed with EXITFREE
- 537e8d69f8 9.1.2095: :wqall! doesn't quit when using :quit in BufWritePost
- 0b1f5a1d60 9.1.2105: tests: not enough tests for using plain_vgetc() (#37521)
- 0da1e4b1c5 9.1.2107: :normal may change cmdline history (#37523)
- a66fce6fab 98a0cbf: patch 9.1.1971: crash with invalid positional argument 0 in printf() (#36919)
- 85404d18fe eb732ed: runtime(doc): Wrap overlength lines in uganda.txt (#36550)
- a93b5a7104 fe8c8b1: runtime(doc): fix outdated :function help
- 0706c55ab1 partial:9.1.1955: sort() does not handle large numbers correctly (#36840)
Problem: Cmdline history not updated when mapping both <Up> and <CR>.
Solution: Consider the command typed when in Cmdline mode and there is
no pending input (zeertzjq).
Although the existing behavior technically does match documentation, the
"completely come from mappings" part is a bit ambiguous, because one may
argue that the command doesn't completely come from mappings as long as
the user has typed a key in Cmdline mode. I'm not entirely sure if this
change will cause problems, but it seems unlikely.
fixes: vim/vim#2771
related: neovim/neovim#36256closes: vim/vim#1860797b6e8b424
(cherry picked from commit 2407833ba1)
Problem:
When the `#offset!` directive is used with `:EditQuery`, the query does not take the offset into consideration when creating the extmark to preview the capture.
Solution:
Use the capture metadata to modify the node range before creating the extmark.
Problem:
When `vim.g.foo = 1`, `vim.b.foo` also appears as
a completion candidate (when use emmylua_ls).
Solution:
Define separate types.
(cherry picked from commit 1aa26f5d55)
Problem:
When using the Nvim appimage, `~/.cache/nvim/luac` directory can grow to
250,000+ files.
Example of 2 identical files in `./luac/`:
%2ftmp%2f.mount_nvim.a65Rja0%2fusr%2fshare%2fnvim%2fruntime%2flua%2fvim%2ftreesitter.luac
%2ftmp%2f.mount_nvim.aNpxXgo%2fusr%2fshare%2fnvim%2fruntime%2flua%2fvim%2ftreesitter.luac
Analysis:
The `nvim.appimage` mounts nvim at a different temporary path each time
it is invoked. The naming scheme of these cache files is random, which
defats the purpose of the cache creates N new files on every launch of
nvim.
Steps to reproduce:
1. install `nvim.appimage`
2. `mv ~/.cache/nvim/luac ~/.cache/nvim/luac.backup`
3. `nvim`
4. Observe contents of `~/.cache/nvim/luac/`
5. Close nvim and run `nvim` again
6. Observe contents of `~/.cache/nvim/luac/` and see that new identical
files have been added with a different mount prefix
Solution:
When running from an appimage, trim the random part of the filepaths.
(cherry picked from commit 78bbe53f76)
fix(lua): relax `vim.wait()` timeout validation #36900
Problem:
After bc0635a9fc `vim.wait()` rejects floats
and NaN values.
Solution:
Restore the prior behavior, while still supporting `math.huge`. Update
tests to cover float case.
(cherry picked from commit b87bdef2a8)
Problem:
Current options for powershell and pwsh had mistakes and rationale
behind them was not clear.
Solution:
Update the suggested options by splitting up powershell and pwsh, as
well as ensuring that all options work and rationale is documented and
discussed.
(cherry picked from commit d2e445e1bd)
This commit fixes the following error message:
```
Compiler not supported: make inc< sw< sts<
```
1. orginal value: `setl com< cms< et< fo<| compiler make inc< sw< sts<`
2. correct value: `setl com< cms< et< fo< inc< sw< sts< | compiler make`
While at it, let's also document the g:yaml_recommended_style variable.
closes: vim/vim#17179229f79c168
Co-authored-by: Vincent Law <vlaw@users.noreply.github.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
(cherry picked from commit 8d68dbf906)
Problem:
The rundll32 utility is a leftover from Windows 95, and it has
been deprecated since at least Windows Vista.
Solution:
Use the start command through Command Prompt instead.
(cherry picked from commit c87d92c3b4)
Problem:
When `MANPAGER` is set to something like 'nvim +Man!',
`vim.system({ 'nvim' })` call waits forever for input and times out
after 10 seconds in `system()` and the assert on `stdout` being not
`nil` fails.
Solution:
Set `MANPAGER=cat` when calling `system()`
(cherry picked from commit 87bd16e470)
build(windows): restore "tee" on Windows
Problem:
Neovim no longer ships with a tee binary on Windows, which breaks
functionality for the :grep and :make commands.
nvim --clean
:grep foo or :make
"tee is not recognized as an internal or external command"
Solution:
Include a simple, no-dependency tee.c source file in the src/ directory.
Update CMakeLists.txt to build a tee executable alongside neovim during
the build process, and ensure the tee.exe program appears alongside the
neovim executable in the bin/ directory so that it is accessible for
:grep and :make.
tee.c was obtained from the vim codebase:
https://github.com/vim/vim/blob/master/src/tee/tee.c
And we modified it to fix performance issues.
Testing:
nvim --clean
:grep foo or :make, after setting a file to the makeprg option.
Verify that :grep results and error output from a compiler appear in the message pane.
ref https://github.com/neovim/neovim/issues/32431
fix https://github.com/neovim/neovim/issues/32504
Other tee options:
- [tee-win32](https://github.com/dEajL3kA/tee-win32): MIT. However,
I couldn't get it to build on my machine even after updating its
makefile to call my install of MSVC. It's also super optimized and
uses some processor intrinsics for multithreading.
- [gnu coreutils tee](https://gnuwin32.sourceforge.net/packages/coreutils.htm):
(Windows coreutils contains a tee.c. Last updated 2005. Did not build
immediately on my machine; we'd have to determine which definitions
from elsewhere in coreutils tee.c needs and incorporate them somehow.
- [WinTee](https://github.com/mpderbec/WinTee): Has no license. Last
updated 11 years ago. Relies on Visual Studio to build.
Co-authored-by: friendlyman23 <ams5661@gmail.com>
docs(diagnostic): diagnostic.Opts.Float extend open_floating_preview.Opts #30058
Problem: the opts table also is param of util.open_floating_preview,
vim.diagnostic.Opts.Float missing some fields of open_floating_preview.
Solution: diagnostic.Opts.Float extend util.open_floating_preview.Opts
Fix#29267
Co-authored-by: glepnir <glephunter@gmail.com>
backport #36407
This reverts 2495e7e. That past change meant that we would modify the
buffer contents of a tmux session if it exists, even if the current Nvim
process wasn't running inside of it. Depending on the tmux
configuration, this could even affect the clipboard of an actually
attached tmux client, since tmux itself uses OSC 52 to forward buffer
writes to attached clients.
While autodetection is usually a trade-off and can rarely make everybody
happy, this behavior goes counter the principle of least surprise. If
really desired, it can be brought back by explicit configuration.
Co-authored-by: Daniel Danner <dnnr@users.noreply.github.com>
Since NeoVim is installed in `Program Files` directory by default, path
to tutor filename must be quoted before passing to `:drop`.
(cherry picked from commit 4143bcbd37)
`:trust` command calculated SHA-256 on file content reading it as a
text. While it doesn't matter on Unices, on Windows hash was calculated
incorectly. SHA-256 for buffer content was calculated fine though.
After this fix hashes in `%LOCALAPPDATA%/nvim-data/trust` are the same
as in output of `sha256sum -t`.
(cherry picked from commit b15b22fc73)
Following is a list of commits (fixes/features only) in this release.
See `:help news` in Nvim for release notes.
FEATURES
--------------------------------------------------------------------------------
- 693772100e help: gx opens help tag in web browser (#35784)
- f9cad88d5a vimscript: log function name in "fast" message #32616
PERFORMANCE
--------------------------------------------------------------------------------
- 4c8486e1f2 scheduler priority clamping on macOS #35488
- 0f6a180bcc api: reduce redundant `win_find_tabpage` calls (#35643)
FIXES
--------------------------------------------------------------------------------
- 4e4428dee8 vim.lsp.omnifunc should not throw away other items #35346
- f2fb46ef9e api: nvim_open_win default to half-size for splits (#36088)
- 479bb9cbab api: nvim_open_win respects requested split window size (#35601)
- 5aa6257e8c api: win_set_config error message for splitting from a float #35650
- 66b8018b06 channel: closing socket with pending writes leaks memory (#36400)
- 3237f634fa cjson: fix `strbuf_set_length` incorrectness #35565
- 95cc67538b clipboard: avoid using stale register width (#36178)
- d31953d532 diagnostics: extend conversion support from/to quickfix format (#34006)
- 7304fc275e excmd: :trust executed even when inside false condition (#36032)
- 0e1c83fae2 filetype: handle invalid `bufnr` in _getlines(), _getline() #36272
- 86b2c0f201 float: crash from nasty :fclose autocmds (#36137)
- d8a7c86e73 health: errors in :checkhealth with pyenv-virtualenv #35865
- 8e00534b1e health: hard fail on invalid "python-*" bin #35382
- 2668a46902 lsp: "attempt to index nil config" #36189
- 21540d21ca lsp: _get_workspace_folders does not handle root_dir() function (#36141)
- 14e74d98fd lsp: misleading logs in non-applicable filetypes #35749
- a7eb110098 lsp: noisy log message when enabling server without config #36264
- eb4837206a lsp: restore Client:stop() force-stopping behavior (#35800)
- 556d8d0002 lsp: treat 2-triggers-at-once as "last char wins" #35435
- 7b1ac2080d lua: don't leak handle when vim._watch.watch() fails (#35768)
- c84ba83cf1 options: increase t_Co buffer size (#35859)
- 7aea000343 paste: don't use :echo immediately before :redraw (#35773)
- 47f6f21998 plines: count 'showbreak' in EOL inline virt_text in line size (#35921)
- 4338eea269 rpc: handle more cases when identifying loopback #36100
- d399ed310e socket: avoid stack-use-after-return after timeout (#36405)
- 4cc060bf44 statusline: redraw if Visual selection other end changes (#36281)
- 7f5427b857 terminal: add various missing redraws
- d78d5cf1aa terminal: adjust marks when deleting scrollback lines (#36294)
- f3f6705075 terminal: avoid events messing up topline of focused terminal
- 8c5bc4920a terminal: avoid tailed cursor in focused terminal in events
- 934d28558d terminal: check size when creating new tabpage
- e67fec1541 terminal: deleting from wrong buffer (#36289)
- e4db5edb8a terminal: don't trigger TextChangedT for unrelated redraws
- 854b319060 terminal: handle OSC 8 split into multiple fragments
- a6d8f40b64 terminal: keep last cursor if it's on the last row
- 46d68e5290 terminal: patch various autocommand-related holes
- 5ee9e3f258 terminal: possibly wrong wrow/wcol in active terminal
- b21ec366b9 terminal: remove condition that buf is curbuf (#33721)
- 2eea65fe68 terminal: update winopts and focus when switching terminals
- 169dc60a44 terminal: wrong row in TermRequest with full scrollback (#36298)
- 8f05fdbfb3 tests: ignore vector math types
- 924a8e4238 tui: don't wait for DA1 response when stdin is closed (#35745)
- 07184aa973 tui: handle sequence larger than entire buffer
- 1c8805e3b2 vim.json: fix truncation of decoded numbers outside lua_Integer's range #35702
- 8c311386c3 window: don't add a hsep when out of room if global stl is off
VIM PATCHES
--------------------------------------------------------------------------------
- dd79bc8360 014c731: runtime(doc): make :h virtcol() more accurate (#35976)
- c2a3838ab2 8.1.0636: line2byte() gives wrong values with text properties
- a0dac399d0 8.1.1681: insert stray "{" when listener gets buffer line
- d573ffcfc7 8.1.1700: listener callback called for the wrong buffer
- 7159a0192b 8.1.1711: listener callback called at the wrong moment
- b6dd8bbca0 8.1.2008: error for invalid range when using listener and undo
- 03f9df8117 8.2.0115: byte2line() does not work correctly with text properties
- d1a0d0889b 8.2.0844: text properties crossing lines not handled correctly
- 9b5545103e 8.2.0853: ml_delete() often called with FALSE argument
- c8912d7329 8.2.3348: line2byte() returns wrong value after adding textprop
- b0ed4a3cb8 8.2.3795: too many #ifdefs
- e4bbe09dcc 8.2.4379: an empty change is reported to a listener
- 5c6ea43da8 80981e1: runtime(doc): mention 'findfunc' at :h :find (#35697)
- 8634a46165 9.1.0689: [security]: buffer-overflow in do_search() with 'rightleft'
- a839200c0a 9.1.0695: tests: test_crash leaves Untitled file around
- 61aab4cfe0 9.1.0698: tests: "Untitled" file not removed when running Test_crash1_3 alone
- 85e4503f18 9.1.1754: :helptags doesn't skip examples with syntax
- 77fe01f200 9.1.1773: Crash in BufLeave after BufUnload closes other windows (#35830)
- 7e724dfa2f 9.1.1780: mbyte contains overlapping list of utf_classes table (#35869)
- 4db62d96bc 9.1.1798: Wrong display with 'sms' and long wrapped virt text at EOL (#35930)
- 9c09983068 9.1.1802: 'nowrap' in a modeline may hide malicious code (#35946)
- 67688ab616 9.1.1807: :set doesn't clear local insecure flag like :setlocal does
- 6dda8e9572 9.1.1808: Option insecure flags not copied when splitting window
- ac48d9c3c9 9.1.1823: diff: w_topline may be invalidated (#36018)
- e1fe0ed2df 9.1.1831: stray vseps in right-most 'winfixwidth' window
- d21c23b8c9 9.1.1836: 'culopt' "screenline" not redrawn with line("w0") and :retab
- aab8134f87 9.1.1839: Window may have wrong height if resized from another tabpage (#36093)
- ad172eb762 9.1.1858: v:register not reset after Visual mode command (#36215)
- a4319015ee 9.1.1868: v:register is wrong in v_: command (#36238)
- 8928ede8af 9.1.1870: :Tutor may not work as expected (#36343)
- 1b27d8f428 9.1.1871: Wrong 'showcmd' in the cmdwin (#36320)
- a2d4a0fda9 9.1.1885: Wrong restored cursor pos when re-entering buffer after changes
- 7790dca2eb 9.1.1891: g<End> does not move to last non-blank in visual mode (#36354)
- 88ff561dcc 9.1.1893: ICCF charity will dissolve (#36427)
- 19d58cb2cc a0f37db: runtime(doc): use a single pattern in :h 'incsearch' example (#35721)
- 8ed1ef1377 partial:9.0.0323: using common name in tests leads to flaky tests
CI
--------------------------------------------------------------------------------
- e415fae42e Windows arm64 packages #35345
Problem: In visual mode, g<End> does not move to the last non-blank
character when the end of a line is on the same line as the
cursor (after v9.0.1753)
Solution: Move the cursor back by one position if it lands after the
line (varsidry)
fixes: vim/vim#18657closes: vim/vim#18658adc85151f3
(cherry picked from commit b92b95e2c2)
**Problem:**
`vim.filetype.match({ filename = 'a.sh' })` returns `nil` because
an invalid buffer ID is passed to `vim.api.nvim_buf_get_lines()`.
For filetypes like `csh`, `txt`, or any other extensions that call
`_getlines()` or `_getline()` to detect their filetypes, the same
issue occurs.
When only the `filename` argument is passed, an error is raised
inside a `pcall()` that wraps the filetype detection function,
causing it to return no value without showing any error message.
**Solution:**
Validate the `bufnr` value in `_getlines()` and `_getline()`.
(cherry picked from commit 095b9f98f3)
Problem: Wrong row in TermRequest with full scrollback.
Solution: Subtract by the number of lines deleted from scrollback.
(cherry picked from commit 67832710a5)
This warning doesn't really make sense, since the `enable()` call is
meant to be run before the `lsp.config` calls. It will be logged many
times (once for each enabled LSP) at startup.
This is especially annoying because calling `enable()` after
configuration causes the first opened buffer not to have its filetype
set in some situations. This is a separate bug which really needs to be
fixed, and makes this superfluous logging more likely.
(cherry picked from commit 3c4acc0f1a)
Problem:
If a client doesn't have a config then an error may be thrown.
Probably caused by: 2f78ff816b
Lua callback: …/lsp.lua:442: attempt to index local 'config' (a nil value)
stack traceback:
…/lsp.lua:442: in function 'can_start'
…/lsp.lua:479: in function 'lsp_enable_callback'
…/lsp.lua:566: in function <…/lsp.lua:565>
Solution:
Not all clients necessarily have configs.
- Handle `config=nil` in `can_start`.
- If user "enables" an invalid name that happens to match a *client*
name, don't auto-detach the client.
(cherry picked from commit bf4710d8c3)