Skip to content

Commit

Permalink
Merge pull request #1004 from fredrikekre/fe/rootUri
Browse files Browse the repository at this point in the history
Fix error if rootUri is not passed correctly.
  • Loading branch information
pfitzseb authored Dec 1, 2021
2 parents db22ddf + fd5d2a6 commit f7083eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/protocol/initialize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ function InitializeParams(dict::Dict)
InitializeParams(dict["processId"],
haskey(dict, "clientInfo") ? InfoParams(dict["clientInfo"]) : missing,
!haskey(dict, "rootPath") ? missing : dict["rootPath"] === nothing ? nothing : DocumentUri(dict["rootPath"]),
dict["rootUri"] === nothing ? nothing : DocumentUri(dict["rootUri"]),
# LS specification says this key should always exist, but neovim 0.5.1 doesn't seem to
# send it (seems fixed in neovim 0.6). For now, just assume it might not exist here.
(rootUri = get(dict, "rootUri", nothing); rootUri === nothing) ? nothing : DocumentUri(rootUri),
get(dict, "initializationOptions", missing),
ClientCapabilities(dict["capabilities"]),
haskey(dict, "trace") ? String(dict["trace"]) : missing ,
Expand Down

0 comments on commit f7083eb

Please sign in to comment.