Packages

c

scala.meta.internal.metals

MetalsLspService

class MetalsLspService extends Cancelable with TextDocumentService

Metals implementation of the Scala Language Service.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MetalsLspService
  2. TextDocumentService
  3. Cancelable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new MetalsLspService(ec: ExecutionContextExecutorService, sh: ScheduledExecutorService, serverInputs: MetalsServerInputs, languageClient: ConfiguredLanguageClient, initializeParams: InitializeParams, clientConfig: ClientConfiguration, userConfig: () => UserConfiguration, statusBar: StatusBar, focusedDocument: () => Option[io.AbsolutePath], shellRunner: ShellRunner, timerProvider: TimerProvider, initTreeView: () => Unit, folder: io.AbsolutePath, folderVisibleName: Option[String], headDoctor: HeadDoctor)

    ec

    Execution context used for submitting tasks. This class DO NOT manage the lifecycle of this execution context.

    sh

    Scheduled executor service used for scheduling tasks. This class DO NOT manage the lifecycle of this executor.

    serverInputs

    Collection of different parameters used by Metals for running, which main purpose is allowing for custom bahaviour in tests.

    initializeParams

    Initialization parameters send by the client in the initialize request, which is the first request sent to the server by the client.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def allActionCommandsIds: Set[String]
  5. def ammoniteStart(): Future[Unit]
  6. def ammoniteStop(): Future[Unit]
  7. def analyzeStackTrace(content: String): Option[ExecuteCommandParams]
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def autoConnectToBuildServer(): Future[BuildChange]
  10. var bspSession: Option[BspSession]
  11. var buildServerPromise: Promise[Unit]
  12. val buildTargets: BuildTargets
  13. def callHierarchyIncomingCalls(params: CallHierarchyIncomingCallsParams): CompletableFuture[java.util.List[CallHierarchyIncomingCall]]
  14. def callHierarchyOutgoingCalls(params: CallHierarchyOutgoingCallsParams): CompletableFuture[java.util.List[CallHierarchyOutgoingCall]]
  15. def cancel(): Unit
    Definition Classes
    MetalsLspServiceCancelable
  16. def cancelCompile(): Future[Unit]
  17. def cascadeCompile(): Future[Unit]
  18. def chooseClass(uri: String, granurality: ClassFinderGranularity): Future[DecoderResponse]
  19. def cleanCompile(): Future[Unit]
  20. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  21. def codeAction(params: CodeActionParams): CompletableFuture[java.util.List[CodeAction]]
  22. def codeLens(params: CodeLensParams): CompletableFuture[java.util.List[CodeLens]]
  23. val compilations: Compilations
  24. def completion(params: CompletionParams): CompletableFuture[CompletionList]
  25. def completionItemResolve(item: CompletionItem): CompletableFuture[CompletionItem]
  26. def connectTables(): Connection
  27. def copyWorksheetOutput(worksheetPath: io.AbsolutePath): CompletableFuture[AnyRef]
  28. def createDebugSession(target: BuildTargetIdentifier): Future[DebugSession]
  29. def createFile(directoryURI: Option[String], name: Option[String], fileType: Option[String], isScala: Boolean): CompletableFuture[AnyRef]
  30. def debugDiscovery(params: DebugDiscoveryParams): CompletableFuture[AnyRef]
  31. def decodeFile(uri: String): Future[DecoderResponse]
  32. def definition(position: TextDocumentPositionParams): CompletableFuture[java.util.List[Location]]
  33. def definitionOrReferences(positionParams: TextDocumentPositionParams, token: CancelToken = EmptyCancelToken, definitionOnly: Boolean = false): Future[DefinitionResult]

    Returns the the definition location or reference locations of a symbol at a given text document position.

    Returns the the definition location or reference locations of a symbol at a given text document position. If the symbol represents the definition itself, this method returns the reference locations, otherwise this returns definition location. https://github.com/scalameta/metals/issues/755

  34. def definitionResult(position: TextDocumentPositionParams, token: CancelToken = EmptyCancelToken): Future[DefinitionResult]

    Returns textDocument/definition in addition to the resolved symbol.

    Returns textDocument/definition in addition to the resolved symbol.

    The resolved symbol is used for testing purposes only.

  35. def didChange(params: DidChangeTextDocumentParams): CompletableFuture[Unit]
  36. def didChangeWatchedFiles(events: List[FileEvent]): Future[Unit]
  37. def didClose(params: DidCloseTextDocumentParams): Unit
  38. def didFocus(uri: String): CompletableFuture[DidFocusResult.Value]
  39. def didOpen(params: DidOpenTextDocumentParams): CompletableFuture[Unit]
  40. def didSave(params: DidSaveTextDocumentParams): CompletableFuture[Unit]
  41. def disconnectOldBuildServer(): Future[Unit]
  42. def discoverMainClasses(unresolvedParams: DebugDiscoveryParams): Future[DebugSessionParams]
  43. def discoverTestSuites(uri: Option[String]): Future[List[BuildTargetUpdate]]
  44. val doctor: Doctor
  45. def documentHighlights(params: TextDocumentPositionParams): CompletableFuture[java.util.List[DocumentHighlight]]
  46. def documentSymbol(params: DocumentSymbolParams): CompletableFuture[org.eclipse.lsp4j.jsonrpc.messages.Either[java.util.List[DocumentSymbol], java.util.List[SymbolInformation]]]
  47. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  48. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  49. var excludedPackageHandler: ExcludedPackagesHandler
  50. def executeCodeActionCommand(params: ExecuteCommandParams, token: CancelToken): Future[Unit]
  51. def findBuildTargetByDisplayName(target: String): Option[BuildTarget]
  52. def findMainClassAndItsBuildTarget(params: DebugUnresolvedMainClassParams): Future[List[(ScalaMainClass, BuildTarget)]]
  53. def findTestClassAndItsBuildTarget(params: DebugUnresolvedTestClassParams): Future[List[(String, BuildTarget)]]
  54. def findTextInDependencyJars(params: FindTextInDependencyJarsRequest): Future[List[Location]]
  55. val folder: io.AbsolutePath
  56. val folderReportsZippper: FolderReportsZippper
  57. def foldingRange(params: FoldingRangeRequestParams): CompletableFuture[java.util.List[FoldingRange]]
  58. def formatting(params: DocumentFormattingParams): CompletableFuture[java.util.List[TextEdit]]
  59. def generateBspConfig(): Future[Unit]
  60. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  61. def getLocationForSymbol(symbol: String): Option[Location]
  62. def getTastyForURI(uri: URI): Future[Either[String, String]]
  63. def getVisibleName: String
  64. val gitHubIssueFolderInfo: GitHubIssueFolderInfo
  65. def gotoSupermethod(textDocumentPositionParams: TextDocumentPositionParams): CompletableFuture[AnyRef]
  66. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  67. def hover(params: HoverExtParams): CompletableFuture[Hover]
  68. def implementation(position: TextDocumentPositionParams): CompletableFuture[java.util.List[Location]]
  69. def indexSources(): Future[Unit]
  70. var indexingPromise: Promise[Unit]
  71. def initialized(): Future[Unit]
  72. def interactivePopupChoiceReset(): Future[Unit]
  73. val isCancelled: AtomicBoolean
  74. val isImportInProcess: AtomicBoolean
  75. val isInitialized: AtomicBoolean
  76. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  77. def loadFingerPrints(): Unit
  78. def loadedPresentationCompilerCount(): Int
  79. def maybeImportScript(path: io.AbsolutePath): Option[Future[Unit]]
  80. def maybeSetupScalaCli(): Future[Unit]

    If there is no auto-connectable build server and no supported build tool is found we assume it's a scala-cli project.

  81. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  82. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  83. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  84. def onShutdown(): Unit
  85. def onTypeFormatting(params: DocumentOnTypeFormattingParams): CompletableFuture[java.util.List[TextEdit]]
  86. def onUserConfigUpdate(old: UserConfiguration): Future[Unit]
  87. val parseTrees: BatchedFunction[io.AbsolutePath, Unit]
  88. def parseTreesAndPublishDiags(paths: Seq[io.AbsolutePath]): Future[Unit]
  89. def pause(): Unit
  90. val pauseables: Pauseable
  91. def prepareCallHierarchy(params: CallHierarchyPrepareParams): CompletableFuture[java.util.List[CallHierarchyItem]]
  92. def prepareRename(params: TextDocumentPositionParams): CompletableFuture[org.eclipse.lsp4j.Range]
  93. def quickConnectToBuildServer(): Future[BuildChange]
  94. def rangeFormatting(params: DocumentRangeFormattingParams): CompletableFuture[java.util.List[TextEdit]]
  95. def references(params: ReferenceParams): CompletableFuture[java.util.List[Location]]
  96. def referencesResult(params: ReferenceParams): List[ReferencesResult]
  97. def register[T <: Cancelable](cancelable: T): T
  98. def registerNiceToHaveFilePatterns(): Unit
  99. def rename(params: RenameParams): CompletableFuture[WorkspaceEdit]
  100. implicit val reports: StdReportContext
  101. def resetNotifications(): Future[Unit]
  102. def resetPopupChoice(value: String): Future[Unit]
  103. def resetWorkspace(): Future[Unit]
  104. def restartBspServer(): Future[Boolean]
  105. def restartCompiler(): Future[Unit]
  106. def runDoctorCheck(): Unit
  107. def runScalafix(uri: String): Future[ApplyWorkspaceEditResponse]
  108. def runScalafixRules(uri: String, rules: List[String]): Future[ApplyWorkspaceEditResponse]
  109. val scalaCli: ScalaCli
  110. def selectionRange(params: SelectionRangeParams): CompletableFuture[java.util.List[SelectionRange]]
  111. def semanticTokensFull(params: SemanticTokensParams): CompletableFuture[SemanticTokens]

    Requesting semantic tokens for a whole file in order to highlight

    Requesting semantic tokens for a whole file in order to highlight

    Definition Classes
    MetalsLspServiceTextDocumentService
  112. def signatureHelp(params: TextDocumentPositionParams): CompletableFuture[SignatureHelp]
  113. def slowConnectToBuildServer(forceImport: Boolean): Future[BuildChange]
  114. val stacktraceAnalyzer: StacktraceAnalyzer
  115. def startDebugProvider(params: DebugSessionParams): Future[DebugSession]
  116. def startMainClass(foundClasses: List[(ScalaMainClass, BuildTarget)], params: DebugUnresolvedMainClassParams): Future[DebugSession]
  117. def startScalaCli(path: io.AbsolutePath): Future[Unit]
  118. def startTestSuite(target: BuildTarget, params: ScalaTestSuitesDebugRequest): Future[DebugSession]
  119. def startTestSuiteForResolved(targets: List[(String, BuildTarget)], params: DebugUnresolvedTestClassParams): Future[DebugSession]
  120. def stopScalaCli(): Future[Unit]
  121. def superMethodHierarchy(textDocumentPositionParams: TextDocumentPositionParams): CompletableFuture[AnyRef]
  122. def supportsBuildTarget(target: BuildTargetIdentifier): Option[BuildTarget]
  123. def switchBspServer(): Future[Unit]
  124. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  125. val tables: Tables
  126. def toString(): String
    Definition Classes
    AnyRef → Any
  127. val treeView: FolderTreeViewProvider
  128. def typeDefinition(position: TextDocumentPositionParams): CompletableFuture[java.util.List[Location]]
  129. def unpause(): Unit
  130. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  131. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  132. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  133. def willRenameFile(oldPath: io.AbsolutePath, newPath: io.AbsolutePath): Future[WorkspaceEdit]
  134. val worksheetProvider: WorksheetProvider
  135. def workspaceSymbol(query: String): Seq[SymbolInformation]
  136. def workspaceSymbol(params: WorkspaceSymbolParams, token: CancelToken): Future[List[SymbolInformation]]

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @Deprecated
    Deprecated

Inherited from TextDocumentService

Inherited from Cancelable

Inherited from AnyRef

Inherited from Any

Ungrouped