Skip to content

Commit

Permalink
Fix "add using" Razor light bulb (#4000)
Browse files Browse the repository at this point in the history
- After the LSP protocol refactor we weren't properly deserializing `SelectionRange` so we weren't understanding where a light bulb request was originating from resulting in us not providing any light bulbs.

Fixes dotnet/aspnetcore#34891
  • Loading branch information
NTaylorMullen authored Jul 30, 2021
1 parent c1fbd79 commit 9e71a62
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using Newtonsoft.Json;
using OmniSharp.Extensions.LanguageServer.Protocol.Models;
using OmniSharp.Extensions.LanguageServer.Protocol.Serialization;

Expand All @@ -9,6 +10,7 @@ namespace Microsoft.AspNetCore.Razor.LanguageServer.CodeActions.Models
internal class ExtendedCodeActionContext : CodeActionContext
{
[Optional]
[JsonProperty("_vs_selectionRange")]
public Range SelectionRange { get; set; }
}
}

0 comments on commit 9e71a62

Please sign in to comment.