Skip to content

Commit 2ce96ae

Browse files
committed
Fix #4542: Enable Dotty LSP on .scala files only
Previously, the Dotty language server would try to provide services for all `.scala` and `.sbt` files, because both are associated to the Scala language . The association from filename to language is provided by the extension `daltonjorge.scala`, which associates all `.scala` and `.sbt` files to the Scala language. This commit explicitly states that the Dotty LSP should only be used for `.scala` files only. Fixes #4542.
1 parent fabd65d commit 2ce96ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vscode-dotty/src/extension.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ function fetchAndRun(artifact: string) {
8989
function run(serverOptions: ServerOptions) {
9090
const clientOptions: LanguageClientOptions = {
9191
documentSelector: [
92-
{ language: 'scala', scheme: 'file' },
93-
{ language: 'scala', scheme: 'untitled' }
92+
{ language: 'scala', scheme: 'file', pattern: '**/*.scala' },
93+
{ language: 'scala', scheme: 'untitled', pattern: '**/*.scala' }
9494
],
9595
synchronize: {
9696
configurationSection: 'dotty'

0 commit comments

Comments
 (0)