diff --git a/server/common/diagnostics.go b/server/common/diagnostics.go index fbd5fdb..5ebd92d 100644 --- a/server/common/diagnostics.go +++ b/server/common/diagnostics.go @@ -6,7 +6,10 @@ import ( ) func ClearDiagnostics(context *glsp.Context, uri protocol.DocumentUri) { - go context.Notify( + // Diagnostics are sent synchronously, as sending them async + // could result in a race condition when we send diagnostics + // to the client. + context.Notify( protocol.ServerTextDocumentPublishDiagnostics, protocol.PublishDiagnosticsParams{ URI: uri, diff --git a/server/fetch_tags.js b/server/fetch_tags.js new file mode 100644 index 0000000..fa11764 --- /dev/null +++ b/server/fetch_tags.js @@ -0,0 +1,27 @@ +// Creates a JSON object in the form of: +// { +// [