// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Since this is an async void method, exceptions here will crash the host VS. We catch exceptions here to make sure that we don't crash the host since
// the worst outcome here is that guests may not see all diagnostics.
try
{
// LSP doesnt support diagnostics without a document. So if we get project level diagnostics without a document, ignore them.
if(e.DocumentId!=null&&e.Solution!=null)
{
vardocument=e.Solution.GetDocument(e.DocumentId);
if(document==null||document.FilePath==null)
{
return;
}
// Only publish document diagnostics for the languages this provider supports.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
/// Signals the extension that the language server has been successfully initialized.
/// </summary>
/// <returns>A <see cref="Task"/> which completes when actions that need to be performed when the server is ready are done.</returns>
publicTaskOnServerInitializedAsync()
{
// We don't have any tasks that need to be triggered after the server has successfully initialized.
returnTask.CompletedTask;
}
/// <summary>
/// Signals the extension that the language server failed to initialize.
/// </summary>
/// <returns>A <see cref="Task"/> which completes when additional actions that need to be performed when the server fails to initialize are done.</returns>
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Just ask the local service if we should trigger completion based on its rules since that determination is based on just looking at the current buffer.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Since this is an async void method, exceptions here will crash the host VS. We catch exceptions here to make sure that we don't crash the host since
// the worst outcome here is that guests may not see all diagnostics.
try
{
// LSP doesnt support diagnostics without a document. So if we get project level diagnostics without a document, ignore them.
if(e.DocumentId!=null&&e.Solution!=null)
{
vardocument=e.Solution.GetDocument(e.DocumentId);
if(document==null||document.FilePath==null)
{
return;
}
// Only publish document diagnostics for the languages this provider supports.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.