Skip to content

Commit

Permalink
fix: use server_capabilities instead of resolved_capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
ouuan committed May 2, 2022
1 parent 7c65ec6 commit d0066dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lua/aerial/backends/lsp/callbacks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ M.on_publish_diagnostics = function(_err, result, ctx, _config)
not bufnr
or not backends.is_backend_attached(bufnr, "lsp")
or not config.lsp.diagnostics_trigger_update
or not client.resolved_capabilities.document_symbol
or not client.server_capabilities.documentSymbol
then
return
end
Expand Down
4 changes: 2 additions & 2 deletions lua/aerial/backends/lsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ M.is_supported = function(bufnr)
end
if not is_lsp_attached(bufnr) then
for _, client in pairs(vim.lsp.buf_get_clients(bufnr)) do
if client.resolved_capabilities.document_symbol then
if client.server_capabilities.documentSymbol then
return false, "LSP client not attached (did you call aerial.on_attach?)"
end
end
Expand All @@ -107,7 +107,7 @@ M.on_attach = function(client, bufnr, opts)
bufnr = 0
end
opts = opts or {}
if client.resolved_capabilities.document_symbol then
if client.server_capabilities.documentSymbol then
hook_handlers(opts.preserve_callback)
mark_lsp_attached(bufnr)
backends.attach(bufnr, true)
Expand Down

0 comments on commit d0066dd

Please sign in to comment.