Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

textDocument/documentSymbol should handle a non-fully initialized server #173

Merged
merged 1 commit into from
Mar 31, 2020
Merged

textDocument/documentSymbol should handle a non-fully initialized server #173

merged 1 commit into from
Mar 31, 2020

Conversation

axelson
Copy link
Member

@axelson axelson commented Mar 31, 2020

Sometimes requests will be processed when the server has not been initialized with client capabilities yet, this should not result in an error. Was previously:

[Error - 6:07:18 AM] Request textDocument/documentSymbol failed.
  Message: an exception was raised:
    ** (BadMapError) expected a map, got: nil
        (elixir 1.10.2) lib/map.ex:450: Map.get(nil, "textDocument", %{})
        (language_server 0.3.0) lib/language_server/server.ex:398: anonymous fn/2 in ElixirLS.LanguageServer.Server.handle_request/2
        (language_server 0.3.0) lib/language_server/server.ex:485: anonymous fn/3 in ElixirLS.LanguageServer.Server.handle_request_async/2
  Code: -32000

Fixes #172

Sometimes requests will be processed when the server has not been initialized
with client capabilities yet, this should not result in an error. Was
previously:
```
[Error - 6:07:18 AM] Request textDocument/documentSymbol failed.
  Message: an exception was raised:
    ** (BadMapError) expected a map, got: nil
        (elixir 1.10.2) lib/map.ex:450: Map.get(nil, "textDocument", %{})
        (language_server 0.3.0) lib/language_server/server.ex:398: anonymous fn/2 in ElixirLS.LanguageServer.Server.handle_request/2
        (language_server 0.3.0) lib/language_server/server.ex:485: anonymous fn/3 in ElixirLS.LanguageServer.Server.handle_request_async/2
  Code: -32000
```

Fixes #172
@axelson axelson merged commit 94b802e into elixir-lsp:master Mar 31, 2020
@axelson axelson deleted the document-symbols-handle-partial-initiation branch March 31, 2020 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document symbol config error
1 participant