Skip to content

Commit 004c8d5

Browse files
committed
Add sourcepath to IDE setup
This allows the compiler to succeed even if the project is not fully built. It also gives navigation capability into directly dependent files.
1 parent 7058f69 commit 004c8d5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ 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 settings = defaultFlags ++ config.compilerArguments.toList ++ classpathFlags
68+
val sourcepathFlags = List("-sourcepath", config.sourceDirectories.mkString(File.pathSeparator))
69+
val settings = defaultFlags ++ config.compilerArguments.toList ++ classpathFlags ++ sourcepathFlags
6970
myDrivers.put(config, new InteractiveDriver(settings))
7071
}
7172
}

0 commit comments

Comments
 (0)