mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
fix(picker.lsp_config): nil on lsp info (#2459)
## Description It will report message `error: vim/shared.lua:0: t: expected table, got nil` when execute `Snacks.picker.lsp_config()`.
This commit is contained in:
parent
c83ff8d598
commit
c5257fa690
1 changed files with 1 additions and 1 deletions
|
|
@ -274,7 +274,7 @@ function M.preview(ctx)
|
|||
lines[#lines + 1] = "- **buffers**: " .. list(vim.tbl_keys(client.attached_buffers))
|
||||
|
||||
-- server capabilities
|
||||
local methods = vim.tbl_keys(vim.lsp.protocol._request_name_to_server_capability) --[[@as string[] ]]
|
||||
local methods = vim.tbl_keys(vim.lsp.protocol._request_name_to_server_capability or {}) --[[@as string[] ]]
|
||||
table.sort(methods)
|
||||
if #methods > 0 then
|
||||
lines[#lines + 1] = "- **server capabilities**:"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue