Syntax highlighting breaks when opening bracket of a method is placed in a new line
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start by reproducing the reported highlighting failure with the C# sample, comparing it with the version where the opening parenthesis stays on the declaration line. Then inspect the syntax grammar's handling of method and constructor declarations across that newline; done means the remaining parameters, method body, and following interface are highlighted correctly.
Written by the indexing model from the issue text.
Description
From @zeroskyx on May 17, 2017 18:46
The following code placed in a class breaks syntax highlighting:
public void Routine
(
IInterface Interface0,
IInterface Interface1,
IInterface Interface2
)
{
string One = "";
string Two = "";
string Three = "";
}
interface IInterface
{
}
Beginning with the second instance of IInterface and after the method body, everything is white -- in more complex projects, somewhere it works again later in the file.
Screenshot:
Removing the newline after public void Routine does not cause the issue:
I am aware that this appears to be a "strange" coding style; it makes reading constructors with loads of dependency injections much cleaner though (issue happens with both methods and constructors).
Copied from original issue: OmniSharp/omnisharp-vscode#1489
- Dominant language
- TypeScript
- Stars
- 78
- Forks
- 43
- Avg merge
- 34m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/csharp-tmLanguage
-
C# syntax highlighting broken with collection expressions and string interpolation in method calls Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
dotnet/csharp-tmLanguage#332 · 7 comments · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
dotnet/csharp-tmLanguage#336 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
dotnet/csharp-tmLanguage#306 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
dotnet/csharp-tmLanguage#304 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
dotnet/csharp-tmLanguage#303 ·
All issues in dotnet/csharp-tmLanguage
Similar issues
-
Browser Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
getsentry/sentry-javascript#24577 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agilepathway/label-checker#640 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
agentic-workflows
Difficulty 1/5 Under an hour Newbie friendliness 85/100
githubnext/rig#534 ·
-
automation missing-model model-sync provider:pioneer
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
anomalyco/models.dev#7701 ·