Skip to content

Commit

Permalink
Merge pull request #416 from julia-vscode/fix-configitem-bug
Browse files Browse the repository at this point in the history
Fix a bug how missing values in ConfigurationItem are handled
  • Loading branch information
davidanthoff authored Dec 2, 2019
2 parents 5478c10 + d9772fb commit 0e35b77
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions src/protocol/configuration.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ end
end

@json_read mutable struct CompletionItemKindCapabilities
valueSet::Union{Nothing,Vector{Int}}
valueSet::Union{Nothing,Vector{Int}}
end

@json_read mutable struct CompletionCapabilities
Expand All @@ -43,7 +43,7 @@ end
end

@json_read mutable struct HoverCapabilities
dynamicRegistration::Union{Nothing,Bool}
dynamicRegistration::Union{Nothing,Bool}
contentFormat::Union{Nothing,Vector{String}}
end

Expand Down Expand Up @@ -129,7 +129,7 @@ end


# Server Response
mutable struct CompletionOptions
mutable struct CompletionOptions
resolveProvider::Bool
triggerCharacters::Vector{String}
end
Expand Down Expand Up @@ -234,11 +234,25 @@ mutable struct DidChangeConfiguration
settings::Any
end

mutable struct ConfigurationItem
scopeUri::Union{Nothing,String}
@json_read mutable struct ConfigurationItem
scopeUri::Union{Nothing,String}
section::Union{Nothing,String}
end

function JSON.lower(a::ConfigurationItem)
d = Dict{String, Any}()

if a.scopeUri!==nothing
d["scopeUri"] = a.scopeUri
end

if a.section!==nothing
d["section"] = a.section
end

return d
end

mutable struct ConfigurationParams
items::Vector{ConfigurationItem}
end

0 comments on commit 0e35b77

Please sign in to comment.