From 2ce96aef2ebbc14b8c0e89df20b3b2f7781447b3 Mon Sep 17 00:00:00 2001 From: Martin Duhem Date: Tue, 22 May 2018 11:11:09 +0200 Subject: [PATCH] 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. --- vscode-dotty/src/extension.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vscode-dotty/src/extension.ts b/vscode-dotty/src/extension.ts index d3c1dbfb89d7..a117194c3f44 100644 --- a/vscode-dotty/src/extension.ts +++ b/vscode-dotty/src/extension.ts @@ -89,8 +89,8 @@ function fetchAndRun(artifact: string) { function run(serverOptions: ServerOptions) { const clientOptions: LanguageClientOptions = { documentSelector: [ - { language: 'scala', scheme: 'file' }, - { language: 'scala', scheme: 'untitled' } + { language: 'scala', scheme: 'file', pattern: '**/*.scala' }, + { language: 'scala', scheme: 'untitled', pattern: '**/*.scala' } ], synchronize: { configurationSection: 'dotty'