Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

C# Method Syntax format grammar recognition

Open
#146 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp
Domain
tooling

Research direction

Start by reproducing the two method-signature examples in the C# syntax grammar used for colorization and compare the scopes assigned to the method name. Trace the grammar rules that handle generic return types split across lines; done means both formatting styles recognize FetchUsers as a method name with the expected storage.type.cs scope.

Written by the indexing model from the issue text.

Description

Resolved-Duplicate

From @CCludts on January 3, 2019 5:47

The method name is only recognized as source.cs instead of storage.type.cs when formatting function signatures in certain cases.

image

public class Hello {
    // correct syntax highlighting
    public Task<(string users, string missingUserIds, string unprocessedUserIds)> FetchUsers() {
        return null;
    }

    // different formatting. breaks syntax highlighting
    public Task<(
            string users,
            string missingUserIds,
            string unprocessedUserIds)> FetchUsers() {
        return null;
    }
}

Copied from original issue: Microsoft/vscode#65951

Dominant language
TypeScript
Stars
78
Forks
43
Avg merge
34m
Merged PRs (30d)
1

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • No Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/csharp-tmLanguage

All issues in dotnet/csharp-tmLanguage

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.