Skip to content

Commit ef85d51

Browse files
committed
Fix #5242: Don't run all Scala files as worksheets
When initializing the `WorksheetRunFeature`, we were specifying that the feature should apply to all files where the `document selector` matches that of the Dotty plugin, or files in the Scala language whose name ends in `.sc`. Unfortunately, this matches all `.scala` files, and these were run as worksheets. This commit changes the document selector for the `WorksheetRunFeature` so that Scala files are not run as if they were worksheets.
1 parent 97c63aa commit ef85d51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vscode-dotty/src/features.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class WorksheetRunFeature extends TextDocumentFeature<TextDocumentRegistr
4848
return
4949
}
5050

51-
const selector: DocumentSelector = documentSelector || [ { language: 'scala', pattern: '**/*.sc' } ]
51+
const selector: DocumentSelector = [ { language: 'scala', pattern: '**/*.sc' } ]
5252
this.register(this.messages, {
5353
id: generateUuid(),
5454
registerOptions: { documentSelector: selector }

0 commit comments

Comments
 (0)