@@ -240,7 +240,7 @@ class DottyLanguageServer extends LanguageServer
240
240
val document = params.getTextDocument
241
241
val uri = new URI (document.getUri)
242
242
val driver = driverFor(uri)
243
- implicit val ctx = driver.currentCtx
243
+ implicit def ctx : Context = driver.currentCtx
244
244
val worksheetMode = isWorksheet(uri)
245
245
246
246
val text =
@@ -265,7 +265,7 @@ class DottyLanguageServer extends LanguageServer
265
265
checkMemory()
266
266
267
267
val driver = driverFor(uri)
268
- implicit val ctx = driver.currentCtx
268
+ implicit def ctx : Context = driver.currentCtx
269
269
270
270
val change = params.getContentChanges.get(0 )
271
271
assert(change.getRange == null , " TextDocumentSyncKind.Incremental support is not implemented" )
@@ -305,7 +305,7 @@ class DottyLanguageServer extends LanguageServer
305
305
override def completion (params : CompletionParams ) = computeAsync { cancelToken =>
306
306
val uri = new URI (params.getTextDocument.getUri)
307
307
val driver = driverFor(uri)
308
- implicit val ctx = driver.currentCtx
308
+ implicit def ctx : Context = driver.currentCtx
309
309
310
310
val pos = sourcePosition(driver, uri, params.getPosition)
311
311
val items = driver.compilationUnits.get(uri) match {
@@ -324,7 +324,7 @@ class DottyLanguageServer extends LanguageServer
324
324
override def definition (params : TextDocumentPositionParams ) = computeAsync { cancelToken =>
325
325
val uri = new URI (params.getTextDocument.getUri)
326
326
val driver = driverFor(uri)
327
- implicit val ctx = driver.currentCtx
327
+ implicit def ctx : Context = driver.currentCtx
328
328
329
329
val pos = sourcePosition(driver, uri, params.getPosition)
330
330
val path = Interactive .pathTo(driver.openedTrees(uri), pos)
@@ -347,7 +347,7 @@ class DottyLanguageServer extends LanguageServer
347
347
val pos = sourcePosition(driver, uri, params.getPosition)
348
348
349
349
val (definitions, originalSymbols) = {
350
- implicit val ctx : Context = driver.currentCtx
350
+ implicit def ctx : Context = driver.currentCtx
351
351
val path = Interactive .pathTo(driver.openedTrees(uri), pos)
352
352
val definitions = Interactive .findDefinitions(path, pos, driver)
353
353
val originalSymbols = Interactive .enclosingSourceSymbols(path, pos)
@@ -376,7 +376,7 @@ class DottyLanguageServer extends LanguageServer
376
376
override def rename (params : RenameParams ) = computeAsync { cancelToken =>
377
377
val uri = new URI (params.getTextDocument.getUri)
378
378
val driver = driverFor(uri)
379
- implicit val ctx = driver.currentCtx
379
+ implicit def ctx : Context = driver.currentCtx
380
380
381
381
val uriTrees = driver.openedTrees(uri)
382
382
val pos = sourcePosition(driver, uri, params.getPosition)
@@ -443,7 +443,7 @@ class DottyLanguageServer extends LanguageServer
443
443
override def documentHighlight (params : TextDocumentPositionParams ) = computeAsync { cancelToken =>
444
444
val uri = new URI (params.getTextDocument.getUri)
445
445
val driver = driverFor(uri)
446
- implicit val ctx = driver.currentCtx
446
+ implicit def ctx : Context = driver.currentCtx
447
447
448
448
val pos = sourcePosition(driver, uri, params.getPosition)
449
449
val uriTrees = driver.openedTrees(uri)
@@ -463,7 +463,7 @@ class DottyLanguageServer extends LanguageServer
463
463
override def hover (params : TextDocumentPositionParams ) = computeAsync { cancelToken =>
464
464
val uri = new URI (params.getTextDocument.getUri)
465
465
val driver = driverFor(uri)
466
- implicit val ctx = driver.currentCtx
466
+ implicit def ctx : Context = driver.currentCtx
467
467
468
468
val pos = sourcePosition(driver, uri, params.getPosition)
469
469
val trees = driver.openedTrees(uri)
@@ -487,7 +487,7 @@ class DottyLanguageServer extends LanguageServer
487
487
override def documentSymbol (params : DocumentSymbolParams ) = computeAsync { cancelToken =>
488
488
val uri = new URI (params.getTextDocument.getUri)
489
489
val driver = driverFor(uri)
490
- implicit val ctx = driver.currentCtx
490
+ implicit def ctx : Context = driver.currentCtx
491
491
492
492
val uriTrees = driver.openedTrees(uri)
493
493
@@ -502,7 +502,7 @@ class DottyLanguageServer extends LanguageServer
502
502
val query = params.getQuery
503
503
504
504
drivers.values.toList.flatMap { driver =>
505
- implicit val ctx = driver.currentCtx
505
+ implicit def ctx : Context = driver.currentCtx
506
506
507
507
val trees = driver.sourceTreesContaining(query)
508
508
val defs = Interactive .namedTrees(trees, Include .empty, _.name.toString.contains(query))
@@ -517,7 +517,7 @@ class DottyLanguageServer extends LanguageServer
517
517
val pos = sourcePosition(driver, uri, params.getPosition)
518
518
519
519
val (definitions, originalSymbols) = {
520
- implicit val ctx : Context = driver.currentCtx
520
+ implicit def ctx : Context = driver.currentCtx
521
521
val path = Interactive .pathTo(driver.openedTrees(uri), pos)
522
522
val originalSymbols = Interactive .enclosingSourceSymbols(path, pos)
523
523
val definitions = Interactive .findDefinitions(path, pos, driver)
@@ -545,7 +545,7 @@ class DottyLanguageServer extends LanguageServer
545
545
546
546
val uri = new URI (params.getTextDocument.getUri)
547
547
val driver = driverFor(uri)
548
- implicit val ctx = driver.currentCtx
548
+ implicit def ctx : Context = driver.currentCtx
549
549
550
550
val pos = sourcePosition(driver, uri, params.getPosition)
551
551
val trees = driver.openedTrees(uri)
0 commit comments