@@ -65,7 +65,7 @@ class DottyLanguageServer extends LanguageServer
6565 private [this ] var myDependentProjects : mutable.Map [ProjectConfig , mutable.Set [ProjectConfig ]] = _
6666
6767 def drivers : Map [ProjectConfig , InteractiveDriver ] = thisServer.synchronized {
68- if myDrivers == null
68+ if myDrivers == null then
6969 assert(rootUri != null , " `drivers` cannot be called before `initialize`" )
7070 val configFile = new File (new URI (rootUri + '/' + IDE_CONFIG_FILE ))
7171 val configs : List [ProjectConfig ] = (new ObjectMapper ).readValue(configFile, classOf [Array [ProjectConfig ]]).toList
@@ -102,12 +102,12 @@ class DottyLanguageServer extends LanguageServer
102102 System .gc()
103103 for ((_, driver, opened) <- driverConfigs; (uri, source) <- opened)
104104 driver.run(uri, source)
105- if Memory .isCritical()
105+ if Memory .isCritical() then
106106 println(s " WARNING: Insufficient memory to run Scala language server on these projects. " )
107107 }
108108
109109 private def checkMemory () =
110- if Memory .isCritical()
110+ if Memory .isCritical() then
111111 CompletableFutures .computeAsync { _ => restart() }
112112
113113 /** The configuration of the project that owns `uri`. */
@@ -149,7 +149,7 @@ class DottyLanguageServer extends LanguageServer
149149
150150 /** A mapping from project `p` to the set of projects that transitively depend on `p`. */
151151 def dependentProjects : Map [ProjectConfig , Set [ProjectConfig ]] = thisServer.synchronized {
152- if myDependentProjects == null
152+ if myDependentProjects == null then
153153 val idToConfig = drivers.keys.map(k => k.id -> k).toMap
154154 val allProjects = drivers.keySet
155155
@@ -192,7 +192,7 @@ class DottyLanguageServer extends LanguageServer
192192 throw ex
193193 }
194194 }
195- if synchronize
195+ if synchronize then
196196 thisServer.synchronized { computation() }
197197 else
198198 computation()
@@ -829,15 +829,15 @@ object DottyLanguageServer {
829829 def completionItemKind (sym : Symbol )(implicit ctx : Context ): lsp4j.CompletionItemKind = {
830830 import lsp4j .{CompletionItemKind => CIK }
831831
832- if sym.is(Package ) || sym.is(Module )
832+ if sym.is(Package ) || sym.is(Module ) then
833833 CIK .Module // No CompletionItemKind.Package (https://github.com/Microsoft/language-server-protocol/issues/155)
834- else if sym.isConstructor
834+ else if sym.isConstructor then
835835 CIK .Constructor
836- else if sym.isClass
836+ else if sym.isClass then
837837 CIK .Class
838- else if sym.is(Mutable )
838+ else if sym.is(Mutable ) then
839839 CIK .Variable
840- else if sym.is(Method )
840+ else if sym.is(Method ) then
841841 CIK .Method
842842 else
843843 CIK .Field
@@ -861,7 +861,7 @@ object DottyLanguageServer {
861861 }
862862
863863 def markupContent (content : String ): lsp4j.MarkupContent = {
864- if content.isEmpty
864+ if content.isEmpty then
865865 null
866866 else {
867867 val markup = new lsp4j.MarkupContent
0 commit comments