Skip to content

Commit 745a80f

Browse files
committed
Turn -scansource on for IDE
Strangely, it seems that at least for simple dependencies, the IDE already knows about classes even if class name != source file name. @smarter Do you have an idea why?
1 parent 004c8d5 commit 745a80f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

language-server/src/dotty/tools/languageserver/DottyLanguageServer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class DottyLanguageServer extends LanguageServer
6565
myDrivers = new mutable.HashMap
6666
for (config <- configs) {
6767
val classpathFlags = List("-classpath", (config.classDirectory +: config.dependencyClasspath).mkString(File.pathSeparator))
68-
val sourcepathFlags = List("-sourcepath", config.sourceDirectories.mkString(File.pathSeparator))
68+
val sourcepathFlags = List("-sourcepath", config.sourceDirectories.mkString(File.pathSeparator), "-scansource")
6969
val settings = defaultFlags ++ config.compilerArguments.toList ++ classpathFlags ++ sourcepathFlags
7070
myDrivers.put(config, new InteractiveDriver(settings))
7171
}

0 commit comments

Comments
 (0)