final case class MetalsServerConfig(globSyntax: GlobSyntaxConfig = GlobSyntaxConfig.default, statusBar: StatusBarConfig = StatusBarConfig.default, bspStatusBar: StatusBarConfig = StatusBarConfig.bspDefault, executeClientCommand: ExecuteClientCommandConfig = ExecuteClientCommandConfig.default, snippetAutoIndent: Boolean = MetalsServerConfig.binaryOption( "metals.snippet-auto-indent", default = true, ), isExitOnShutdown: Boolean = MetalsServerConfig.binaryOption( "metals.exit-on-shutdown", default = false, ), isHttpEnabled: Boolean = MetalsServerConfig.binaryOption( "metals.http", default = false, ), isInputBoxEnabled: Boolean = MetalsServerConfig.binaryOption( "metals.input-box", default = false, ), isVerbose: Boolean = MetalsServerConfig.binaryOption( "metals.verbose", default = false, ), openFilesOnRenames: Boolean = false, renameFileThreshold: Int = 300, askToReconnect: Boolean = MetalsServerConfig.binaryOption( "metals.ask-to-reconnect", default = false, ), icons: Icons = Icons.fromString(System.getProperty("metals.icons")), statistics: StatisticsConfig = StatisticsConfig.default, compilers: PresentationCompilerConfigImpl = CompilersConfig(), allowMultilineStringFormatting: Boolean = MetalsServerConfig.binaryOption( "metals.allow-multiline-string-formatting", default = true, ), bloopPort: Option[Int] = Option(System.getProperty("metals.bloop-port")) .filter(_.forall(Character.isDigit(_))) .map(_.toInt), macOsMaxWatchRoots: Int = Option(System.getProperty("metals.macos-max-watch-roots")) .filter(_.forall(Character.isDigit(_))) .map(_.toInt) .getOrElse(32), loglevel: String = sys.props.get("metals.loglevel").map(_.toLowerCase()).getOrElse("info"), maxLogFileSize: Long = Option(System.getProperty("metals.max-logfile-size")) .withFilter(_.forall(Character.isDigit(_))) .map(_.toLong) .getOrElse(3 << 20), maxLogBackups: Int = Option(System.getProperty("metals.max-log-backups")) .withFilter(_.forall(Character.isDigit(_))) .map(_.toInt) .getOrElse(10), metalsToIdleTime: Duration = Option(System.getProperty("metals.server-to-idle-time")) .flatMap(opt => Try(Duration(opt)).toOption) .getOrElse(Duration("10m")), pingInterval: Duration = Option(System.getProperty("metals.build-server-ping-interval")) .flatMap(opt => Try(Duration(opt)).toOption) .getOrElse(Duration("1m")), worksheetTimeout: Int = Option(System.getProperty("metals.worksheet-timeout")) .filter(_.forall(Character.isDigit(_))) .map(_.toInt) .getOrElse(30)) extends Product with Serializable
Configuration parameters for the Metals language server.
While these can be used to configure Metals, it's preferable
that instead you configure Metals via InitializationOptions.
- globSyntax
pattern used for
DidChangeWatchedFilesRegistrationOptions.- statusBar
how to handle metals/status notifications with {"statusType": "metals"}.
- bspStatusBar
how to handle metals/status notifications with {"statusType": "bsp"}.
- executeClientCommand
whether client provides the ability to support the
metals/executeClientCommandcommand.- snippetAutoIndent
if the client defaults to adding the identation of the reference line that the operation started on (relevant for multiline textEdits)
- isExitOnShutdown
whether the client needs Metals to shut down manually on exit.
- isHttpEnabled
whether to start the Metals HTTP client interface. This is needed for clients with limited support for UI dialogues that don't implement window/showMessageRequest yet.
- isInputBoxEnabled
whether the client supports the
metals/inputBoxextension.- isVerbose
turn on verbose logging.
- openFilesOnRenames
whether or not file should be opened when a rename occurs in an unopened file.
- renameFileThreshold
amount of files that should be opened during a rename if the
openFilesOnRenamesis enabled.- askToReconnect
whether the user should be prompted to reconnect after a BuildServer connection is lost.
- icons
what icon set to use for messages.
- statistics
if all statistics in Metals should be enabled.
- compilers
configuration for the
PresentationCompilerConfig.- allowMultilineStringFormatting
whether or not
multilineStringFormattingshould be turned off. By default this is on, but Metals only supports a small subset of this, so it may be problematic for certain clients.- macOsMaxWatchRoots
The maximum number of root directories to watch on MacOS.
- maxLogFileSize
The maximum size of the log file before it gets backed up and truncated.
- maxLogBackups
The maximum number of backup log files.
- metalsToIdleTime
The time that needs to pass with no action to consider metals as idle.
- pingInterval
Interval in which we ping the build server.
- Alphabetic
- By Inheritance
- MetalsServerConfig
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new MetalsServerConfig(globSyntax: GlobSyntaxConfig = GlobSyntaxConfig.default, statusBar: StatusBarConfig = StatusBarConfig.default, bspStatusBar: StatusBarConfig = StatusBarConfig.bspDefault, executeClientCommand: ExecuteClientCommandConfig = ExecuteClientCommandConfig.default, snippetAutoIndent: Boolean = MetalsServerConfig.binaryOption(
"metals.snippet-auto-indent",
default = true,
), isExitOnShutdown: Boolean = MetalsServerConfig.binaryOption(
"metals.exit-on-shutdown",
default = false,
), isHttpEnabled: Boolean = MetalsServerConfig.binaryOption(
"metals.http",
default = false,
), isInputBoxEnabled: Boolean = MetalsServerConfig.binaryOption(
"metals.input-box",
default = false,
), isVerbose: Boolean = MetalsServerConfig.binaryOption(
"metals.verbose",
default = false,
), openFilesOnRenames: Boolean = false, renameFileThreshold: Int = 300, askToReconnect: Boolean = MetalsServerConfig.binaryOption(
"metals.ask-to-reconnect",
default = false,
), icons: Icons = Icons.fromString(System.getProperty("metals.icons")), statistics: StatisticsConfig = StatisticsConfig.default, compilers: PresentationCompilerConfigImpl = CompilersConfig(), allowMultilineStringFormatting: Boolean = MetalsServerConfig.binaryOption(
"metals.allow-multiline-string-formatting",
default = true,
), bloopPort: Option[Int] = Option(System.getProperty("metals.bloop-port"))
.filter(_.forall(Character.isDigit(_)))
.map(_.toInt), macOsMaxWatchRoots: Int = Option(System.getProperty("metals.macos-max-watch-roots"))
.filter(_.forall(Character.isDigit(_)))
.map(_.toInt)
.getOrElse(32), loglevel: String = sys.props.get("metals.loglevel").map(_.toLowerCase()).getOrElse("info"), maxLogFileSize: Long = Option(System.getProperty("metals.max-logfile-size"))
.withFilter(_.forall(Character.isDigit(_)))
.map(_.toLong)
.getOrElse(3 << 20), maxLogBackups: Int = Option(System.getProperty("metals.max-log-backups"))
.withFilter(_.forall(Character.isDigit(_)))
.map(_.toInt)
.getOrElse(10), metalsToIdleTime: Duration = Option(System.getProperty("metals.server-to-idle-time"))
.flatMap(opt => Try(Duration(opt)).toOption)
.getOrElse(Duration("10m")), pingInterval: Duration = Option(System.getProperty("metals.build-server-ping-interval"))
.flatMap(opt => Try(Duration(opt)).toOption)
.getOrElse(Duration("1m")), worksheetTimeout: Int = Option(System.getProperty("metals.worksheet-timeout"))
.filter(_.forall(Character.isDigit(_)))
.map(_.toInt)
.getOrElse(30))
- globSyntax
pattern used for
DidChangeWatchedFilesRegistrationOptions.- statusBar
how to handle metals/status notifications with {"statusType": "metals"}.
- bspStatusBar
how to handle metals/status notifications with {"statusType": "bsp"}.
- executeClientCommand
whether client provides the ability to support the
metals/executeClientCommandcommand.- snippetAutoIndent
if the client defaults to adding the identation of the reference line that the operation started on (relevant for multiline textEdits)
- isExitOnShutdown
whether the client needs Metals to shut down manually on exit.
- isHttpEnabled
whether to start the Metals HTTP client interface. This is needed for clients with limited support for UI dialogues that don't implement window/showMessageRequest yet.
- isInputBoxEnabled
whether the client supports the
metals/inputBoxextension.- isVerbose
turn on verbose logging.
- openFilesOnRenames
whether or not file should be opened when a rename occurs in an unopened file.
- renameFileThreshold
amount of files that should be opened during a rename if the
openFilesOnRenamesis enabled.- askToReconnect
whether the user should be prompted to reconnect after a BuildServer connection is lost.
- icons
what icon set to use for messages.
- statistics
if all statistics in Metals should be enabled.
- compilers
configuration for the
PresentationCompilerConfig.- allowMultilineStringFormatting
whether or not
multilineStringFormattingshould be turned off. By default this is on, but Metals only supports a small subset of this, so it may be problematic for certain clients.- macOsMaxWatchRoots
The maximum number of root directories to watch on MacOS.
- maxLogFileSize
The maximum size of the log file before it gets backed up and truncated.
- maxLogBackups
The maximum number of backup log files.
- metalsToIdleTime
The time that needs to pass with no action to consider metals as idle.
- pingInterval
Interval in which we ping the build server.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val allowMultilineStringFormatting: Boolean
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val askToReconnect: Boolean
- val bloopPort: Option[Int]
- val bspStatusBar: StatusBarConfig
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- val compilers: PresentationCompilerConfigImpl
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val executeClientCommand: ExecuteClientCommandConfig
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- val globSyntax: GlobSyntaxConfig
- val icons: Icons
- val isExitOnShutdown: Boolean
- val isHttpEnabled: Boolean
- val isInputBoxEnabled: Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val isVerbose: Boolean
- val loglevel: String
- val macOsMaxWatchRoots: Int
- val maxLogBackups: Int
- val maxLogFileSize: Long
- val metalsToIdleTime: Duration
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- val openFilesOnRenames: Boolean
- val pingInterval: Duration
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val renameFileThreshold: Int
- val snippetAutoIndent: Boolean
- val statistics: StatisticsConfig
- val statusBar: StatusBarConfig
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- MetalsServerConfig → AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- val worksheetTimeout: Int
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)