-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Issue Description
Hi, thanks for this! I'm just trying out Zed for the first time, and a spell check is essential so was very happy to find this extension. I saw that C# said it needs validation so decided to give it a try and noticed that nameof flagged as spelling errors that shouldn't be. The interesting thing is that it was only flagged when part of an interpolated string, not in "normal" usage:
I had a look around and couldn't find any other issues, nice work!
Operating System
Windows
Editor
Zed
Codebook Version
0.2.2
Configuration
I'm using the zed extension and haven't customised, I wasn't sure where to find the configSteps to Reproduce
Install the extension, open C# project
Expected Behavior
None of the nameof should be flagged as a spelling error
Actual Behavior
The nameof calls inside the string interpolation are flagged as spelling errors
Code Sample
The following C# demonstrates the issue (in the interpolated strings)
using System.Diagnostics;
// Incorrectly flagged
[DebuggerDisplay($"{{{nameof(GetDebuggerDisplay)}(),nq}}")]
internal class Program
{
private static void Main(string[] args)
{
// Incorrectly flagged
Console.WriteLine($"Hello, {nameof(Program)}!");
// Incorrectly flagged
Console.WriteLine(
$$"""
Hello {{nameof(Program)}}!
""");
}
private string GetDebuggerDisplay()
{
// OK
return nameof(Program);
}
}
Log Output
Additional Context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working