Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix for issue 1042 - Gauge comment syntax highlighter conflicted with default comment highlighter for other langauges. #1044

Merged
merged 1 commit into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"description": "Gauge support for VScode.",
"author": "ThoughtWorks",
"license": "MIT",
"version": "0.1.8",
"version": "0.1.9",
"publisher": "getgauge",
"engines": {
"vscode": "^1.71.0"
Expand Down
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"tagValue": { "foreground": colors.tagValue },
"specification": { "foreground": colors.specification },
"scenario": { "foreground": colors.scenario },
"comment": { "foreground": colors.comment },
"gaugeComment": { "foreground": colors.comment },
"disabledStep": { "foreground": colors.disabledStep }
};

Expand Down
4 changes: 2 additions & 2 deletions src/semanticTokensProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const tokenTypes = [
'tagKeyword', // For the literal "tags:" at the beginning of a tag line
'tagValue', // For the remainder of a tag line after "tags:"
'disabledStep', // For lines starting with "//" (used to disable a step)
'comment' // For lines that do not match any of the above (fallback comment lines)
'gaugeComment' // For lines that do not match any of the above (fallback comment lines)
];
const tokenModifiers: string[] = [];
export const legend = new vscode.SemanticTokensLegend(tokenTypes, tokenModifiers);
Expand Down Expand Up @@ -175,7 +175,7 @@ export class GaugeSemanticTokensProvider implements vscode.DocumentSemanticToken
else {
// For any other non-empty line, mark it as a comment.
if (trimmedLine.length > 0) {
builder.push(i, 0, line.length, tokenTypes.indexOf('comment'), 0);
builder.push(i, 0, line.length, tokenTypes.indexOf('gaugeComment'), 0);
}
i++;
}
Expand Down
Loading