Scaladoc can determine the relative source path for a symbol if -sourcepath is defined and use that to link to the source. However, -sourcepath has unintended side effects and can break compilation. (See this thread.) Scaladoc should instead use its own -doc-sourcepath option. Alternatively, what is currently called -sourcepath should be renamed and hidden behind -X as suggested in the thread.