Packages

c

scala.meta.internal.metals

MetalsLspService

class MetalsLspService extends Folder with Cancelable with TextDocumentService

Metals implementation of the Scala Language Service.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MetalsLspService
  2. TextDocumentService
  3. Cancelable
  4. Folder
  5. AnyRef
  6. 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, statusBar: StatusBar, focusedDocument: () => Option[io.AbsolutePath], shellRunner: ShellRunner, timerProvider: TimerProvider, initTreeView: () => Unit, folder: io.AbsolutePath, folderVisibleName: Option[String], headDoctor: HeadDoctor, bspStatus: BspStatus, workDoneProgress: WorkDoneProgress, maxScalaCliServers: Int)

    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 behavior 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. val buildClient: ForwardingMetalsBuildClient
  12. var buildServerPromise: Promise[Unit]
  13. val buildTargets: BuildTargets
  14. def callHierarchyIncomingCalls(params: CallHierarchyIncomingCallsParams): CompletableFuture[java.util.List[CallHierarchyIncomingCall]]
  15. def callHierarchyOutgoingCalls(params: CallHierarchyOutgoingCallsParams): CompletableFuture[java.util.List[CallHierarchyOutgoingCall]]
  16. def cancel(): Unit
    Definition Classes
    MetalsLspServiceCancelable
  17. def cancelCompile(): Future[Unit]
  18. def cascadeCompile(): Future[Unit]
  19. def chooseClass(uri: String, granurality: ClassFinderGranularity): Future[DecoderResponse]
  20. def cleanCompile(): Future[Unit]
  21. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  22. def codeAction(params: CodeActionParams): CompletableFuture[java.util.List[CodeAction]]
  23. def codeLens(params: CodeLensParams): CompletableFuture[java.util.List[CodeLens]]
  24. val compilations: Compilations
  25. def completion(params: CompletionParams): CompletableFuture[CompletionList]
  26. def completionItemResolve(item: CompletionItem): CompletableFuture[CompletionItem]
  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): Future[DebugSession]
  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 definition location or reference locations of a symbol at a given text document position.

    Returns 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 findTextInDependencyJars(params: FindTextInDependencyJarsRequest): Future[List[Location]]
  53. val folderReportsZippper: FolderReportsZippper
  54. def foldingRange(params: FoldingRangeRequestParams): CompletableFuture[java.util.List[FoldingRange]]
  55. def formatting(params: DocumentFormattingParams): CompletableFuture[java.util.List[TextEdit]]
  56. def fullConnect(): Future[Unit]
  57. def generateBspConfig(): Future[Unit]
  58. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  59. def getLocationForSymbol(symbol: String): Option[Location]
  60. def getTastyForURI(uri: URI): Future[Either[String, String]]
  61. def getVisibleName: String
  62. val gitHubIssueFolderInfo: GitHubIssueFolderInfo
  63. def gotoSupermethod(textDocumentPositionParams: TextDocumentPositionParams): CompletableFuture[AnyRef]
  64. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  65. def hover(params: HoverExtParams): CompletableFuture[Hover]
  66. def implementation(position: TextDocumentPositionParams): CompletableFuture[java.util.List[Location]]
  67. def indexSources(): Future[Unit]
  68. var indexingPromise: Promise[Unit]
  69. def initialized(): Future[Unit]
  70. def inlayHintResolve(inlayHint: InlayHint): CompletableFuture[InlayHint]
  71. def inlayHints(params: InlayHintParams): CompletableFuture[java.util.List[InlayHint]]
  72. def interactivePopupChoiceReset(): Future[Unit]
  73. val isCancelled: AtomicBoolean
  74. def isCompatibleVersion(buildTool: BuildTool): Verified
  75. val isConnecting: AtomicBoolean
  76. val isImportInProcess: AtomicBoolean
  77. val isInitialized: AtomicBoolean
  78. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  79. lazy val isMetalsProject: Boolean
    Definition Classes
    Folder
  80. def javaHome: Option[String]
  81. def loadedPresentationCompilerCount(): Int
  82. def mainClassSearch(params: DebugUnresolvedMainClassParams): MainClassSearch
  83. def maybeImportScript(path: io.AbsolutePath): Option[Future[Unit]]
  84. 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.

  85. def nameOrUri: String
    Definition Classes
    Folder
  86. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  87. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  88. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  89. def onShutdown(): Unit
  90. def onTypeFormatting(params: DocumentOnTypeFormattingParams): CompletableFuture[java.util.List[TextEdit]]
  91. def onUserConfigUpdate(newConfig: UserConfiguration): Future[Unit]
  92. lazy val optDelegatePath: Option[io.AbsolutePath]

    A workspace folder might be a project reference for an other project.

    A workspace folder might be a project reference for an other project. In that case all its commands will be delegated to the main project's service. We keep the path to main project's root in a dedicated setting, so even before the main project is imported, this folder is known to be a reference.

    Definition Classes
    Folder
  93. def optProjectRoot(): Option[io.AbsolutePath]
  94. val parseTrees: BatchedFunction[io.AbsolutePath, Unit]
  95. def parseTreesAndPublishDiags(paths: Seq[io.AbsolutePath]): Future[Unit]
  96. val path: io.AbsolutePath
    Definition Classes
    Folder
  97. def pause(): Unit
  98. val pauseables: Pauseable
  99. def prepareCallHierarchy(params: CallHierarchyPrepareParams): CompletableFuture[java.util.List[CallHierarchyItem]]
  100. def prepareRename(params: TextDocumentPositionParams): CompletableFuture[org.eclipse.lsp4j.Range]
  101. def quickConnectToBuildServer(): Future[BuildChange]
  102. def rangeFormatting(params: DocumentRangeFormattingParams): CompletableFuture[java.util.List[TextEdit]]
  103. def references(params: ReferenceParams): CompletableFuture[java.util.List[Location]]
  104. def referencesResult(params: ReferenceParams): List[ReferencesResult]
  105. def register[T <: Cancelable](cancelable: T): T
  106. def rename(params: RenameParams): CompletableFuture[WorkspaceEdit]
  107. implicit val reports: StdReportContext
  108. def resetNotifications(): Future[Unit]
  109. def resetPopupChoice(value: String): Future[Unit]
  110. def resetWorkspace(): Future[Unit]
  111. def restartBspServer(): Future[Boolean]
  112. def restartCompiler(): Future[Unit]
  113. def runDoctorCheck(): Unit
  114. def runScalafix(uri: String): Future[ApplyWorkspaceEditResponse]
  115. def runScalafixRules(uri: String, rules: List[String]): Future[ApplyWorkspaceEditResponse]
  116. val scalaCli: ScalaCliServers
  117. def selectionRange(params: SelectionRangeParams): CompletableFuture[java.util.List[SelectionRange]]
  118. 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
  119. def setUserConfig(newConfig: UserConfiguration): UserConfiguration
  120. def signatureHelp(params: TextDocumentPositionParams): CompletableFuture[SignatureHelp]
  121. def slowConnectToBuildServer(forceImport: Boolean): Future[BuildChange]
  122. val stacktraceAnalyzer: StacktraceAnalyzer
  123. def startDebugProvider(params: DebugSessionParams): Future[DebugSession]
  124. def startScalaCli(path: io.AbsolutePath): Future[Unit]
  125. def startTestSuite(target: BuildTarget, params: ScalaTestSuitesDebugRequest): Future[DebugSession]
  126. def stopScalaCli(): Future[Unit]
  127. def superMethodHierarchy(textDocumentPositionParams: TextDocumentPositionParams): CompletableFuture[AnyRef]
  128. def supportedBuildTool(): Future[Option[Found]]
  129. def supportsBuildTarget(target: BuildTargetIdentifier): Option[BuildTarget]
  130. def switchBspServer(): Future[Unit]
  131. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  132. val tables: Tables
  133. def testClassSearch(params: DebugUnresolvedTestClassParams): TestClassSearch
  134. def toString(): String
    Definition Classes
    AnyRef → Any
  135. val treeView: FolderTreeViewProvider
  136. def typeDefinition(position: TextDocumentPositionParams): CompletableFuture[java.util.List[Location]]
  137. def unpause(): Unit
  138. val visibleName: Option[String]
    Definition Classes
    Folder
  139. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  140. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  141. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  142. val wasInitialized: AtomicBoolean
  143. val willGenerateBspConfig: AtomicReference[Set[UUID]]
  144. def willRenameFile(oldPath: io.AbsolutePath, newPath: io.AbsolutePath): Future[WorkspaceEdit]
  145. def withWillGenerateBspConfig[T](body: => Future[T]): Future[T]
  146. val worksheetProvider: WorksheetProvider
  147. def workspaceSymbol(query: String): Seq[SymbolInformation]
  148. 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

    (Since version 9)

Inherited from TextDocumentService

Inherited from Cancelable

Inherited from Folder

Inherited from AnyRef

Inherited from Any

Ungrouped