go-language-server / protocol

Package protocol implements Language Server Protocol specification in Go
https://pkg.go.dev/go.lsp.dev/protocol
BSD 3-Clause "New" or "Revised" License
97 stars 15 forks source link

client: Fix response type for workspace/applyEdit #36

Closed ja-he closed 2 years ago

ja-he commented 2 years ago

The response type for workspace/applyEdit is ApplyWorkspaceEditResult (which contains a bool and two optionals to indicate failure reason).

This type already existed, but was not used as ApplyEdit()'s result. Instead the result was bool, and unmarshaling the jsonrcp2 response ({"applied":true}) to a bool failed. This PR fixes that.

codecov[bot] commented 2 years ago

Codecov Report

Merging #36 (d6b9de0) into main (da30f9a) will not change coverage. The diff coverage is 0.0%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main     #36   +/-   ##
=====================================
  Coverage   16.1%   16.1%           
=====================================
  Files         17      17           
  Lines       1760    1760           
=====================================
  Hits         285     285           
  Misses      1474    1474           
  Partials       1       1           
Impacted Files Coverage Δ
client.go 0.0% <0.0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update da30f9a...d6b9de0. Read the comment docs.

zchee commented 2 years ago

@ja-he LGTM, thanks for PR!