From b10a4e3302f424e3dffe244861d390f30631f3bf Mon Sep 17 00:00:00 2001
From: Docusaurus bot
Date: Mon, 18 Dec 2023 11:16:02 +0000
Subject: [PATCH] Deploy website - based on
72692d2c899bd1546cc3f368a5e3d104fbc3e9dc
---
404.html | 2 +-
assets/js/28906591.bf7a02e3.js | 1 +
assets/js/28906591.c115c0f4.js | 1 -
assets/js/49773175.1bc1e418.js | 1 -
assets/js/49773175.3ccc5da4.js | 1 +
assets/js/{8a0b8ece.b4cabaaf.js => 8a0b8ece.1f7f4ad7.js} | 2 +-
assets/js/{94015cb6.910478de.js => 94015cb6.aebd4f14.js} | 2 +-
assets/js/970a5f4e.154c41bc.js | 1 +
assets/js/970a5f4e.af88a397.js | 1 -
assets/js/9b4a23be.047090c6.js | 1 -
assets/js/9b4a23be.1a3a56c5.js | 1 +
...{runtime~main.5a984eeb.js => runtime~main.58ba9853.js} | 2 +-
blog/2018/12/06/iron/index.html | 2 +-
blog/2018/12/12/fast-goto-definition/index.html | 2 +-
blog/2018/12/14/iron/index.html | 2 +-
blog/2019/01/22/bloom-filters/index.html | 2 +-
blog/2019/01/24/tin/index.html | 2 +-
blog/2019/02/01/tin/index.html | 2 +-
blog/2019/04/12/mercury/index.html | 2 +-
blog/2019/04/26/mercury/index.html | 2 +-
blog/2019/06/11/radium/index.html | 2 +-
blog/2019/06/28/thorium/index.html | 2 +-
blog/2019/09/02/thorium/index.html | 2 +-
blog/2019/09/12/thorium/index.html | 2 +-
blog/2019/09/23/thorium/index.html | 2 +-
blog/2020/01/10/cobalt/index.html | 2 +-
blog/2020/02/26/cobalt/index.html | 2 +-
blog/2020/03/19/cobalt/index.html | 2 +-
blog/2020/04/10/cobalt/index.html | 2 +-
blog/2020/04/12/mercury/index.html | 2 +-
blog/2020/05/04/lithium/index.html | 2 +-
blog/2020/07/01/lithium/index.html | 2 +-
blog/2020/07/15/lithium/index.html | 2 +-
blog/2020/07/23/configuring-a-client/index.html | 2 +-
blog/2020/08/19/lithium/index.html | 2 +-
blog/2020/09/21/lithium/index.html | 2 +-
blog/2020/11/06/sbt-BSP-support/index.html | 2 +-
blog/2020/11/10/lithium/index.html | 2 +-
blog/2020/11/20/lithium/index.html | 2 +-
blog/2020/11/26/lithium/index.html | 2 +-
blog/2020/12/19/lithium/index.html | 2 +-
blog/2021/01/19/lithium/index.html | 2 +-
blog/2021/02/02/metals-retro-part1/index.html | 2 +-
blog/2021/02/24/tungsten/index.html | 2 +-
blog/2021/04/06/tungsten/index.html | 2 +-
blog/2021/04/20/tungsten/index.html | 2 +-
blog/2021/05/17/tungsten/index.html | 2 +-
blog/2021/05/31/tungsten/index.html | 2 +-
blog/2021/07/14/tungsten/index.html | 2 +-
blog/2021/09/06/tungsten/index.html | 2 +-
blog/2021/09/16/tungsten/index.html | 2 +-
blog/2021/10/26/tungsten/index.html | 2 +-
blog/2021/11/03/tungsten/index.html | 2 +-
blog/2022/01/12/aluminium/index.html | 2 +-
blog/2022/01/17/aluminium/index.html | 2 +-
blog/2022/02/23/towards-better-releases/index.html | 2 +-
blog/2022/03/08/aluminium/index.html | 2 +-
blog/2022/04/26/aluminium/index.html | 2 +-
blog/2022/04/27/aluminium/index.html | 2 +-
blog/2022/04/28/aluminium/index.html | 2 +-
blog/2022/06/03/aluminium/index.html | 2 +-
blog/2022/07/04/aluminium/index.html | 2 +-
blog/2022/08/10/aluminium/index.html | 2 +-
blog/2022/10/06/aluminium/index.html | 2 +-
blog/2023/01/02/aluminium/index.html | 2 +-
blog/2023/03/02/aluminium/index.html | 2 +-
blog/2023/04/21/aluminium/index.html | 2 +-
blog/2023/07/17/workspace-folders/index.html | 2 +-
blog/2023/07/19/silver/index.html | 2 +-
blog/2023/08/28/silver/index.html | 2 +-
blog/2023/10/17/silver/index.html | 2 +-
blog/2023/12/12/bismuth/index.html | 2 +-
blog/archive/index.html | 2 +-
blog/index.html | 2 +-
blog/page/10/index.html | 2 +-
blog/page/11/index.html | 2 +-
blog/page/12/index.html | 2 +-
blog/page/13/index.html | 2 +-
blog/page/14/index.html | 2 +-
blog/page/15/index.html | 2 +-
blog/page/16/index.html | 2 +-
blog/page/17/index.html | 2 +-
blog/page/18/index.html | 2 +-
blog/page/19/index.html | 2 +-
blog/page/2/index.html | 2 +-
blog/page/20/index.html | 2 +-
blog/page/21/index.html | 2 +-
blog/page/22/index.html | 2 +-
blog/page/23/index.html | 2 +-
blog/page/24/index.html | 2 +-
blog/page/25/index.html | 2 +-
blog/page/26/index.html | 2 +-
blog/page/27/index.html | 2 +-
blog/page/28/index.html | 2 +-
blog/page/29/index.html | 2 +-
blog/page/3/index.html | 2 +-
blog/page/30/index.html | 2 +-
blog/page/31/index.html | 2 +-
blog/page/32/index.html | 2 +-
blog/page/33/index.html | 2 +-
blog/page/34/index.html | 2 +-
blog/page/35/index.html | 2 +-
blog/page/36/index.html | 2 +-
blog/page/37/index.html | 2 +-
blog/page/38/index.html | 2 +-
blog/page/39/index.html | 2 +-
blog/page/4/index.html | 2 +-
blog/page/40/index.html | 2 +-
blog/page/41/index.html | 2 +-
blog/page/42/index.html | 2 +-
blog/page/43/index.html | 2 +-
blog/page/44/index.html | 2 +-
blog/page/45/index.html | 2 +-
blog/page/46/index.html | 2 +-
blog/page/47/index.html | 2 +-
blog/page/48/index.html | 2 +-
blog/page/49/index.html | 2 +-
blog/page/5/index.html | 2 +-
blog/page/50/index.html | 2 +-
blog/page/51/index.html | 2 +-
blog/page/52/index.html | 2 +-
blog/page/53/index.html | 2 +-
blog/page/54/index.html | 2 +-
blog/page/55/index.html | 2 +-
blog/page/56/index.html | 2 +-
blog/page/57/index.html | 2 +-
blog/page/58/index.html | 2 +-
blog/page/59/index.html | 2 +-
blog/page/6/index.html | 2 +-
blog/page/7/index.html | 2 +-
blog/page/8/index.html | 2 +-
blog/page/9/index.html | 2 +-
docs/acknowledgements/development/index.html | 2 +-
docs/build-tools/bloop/index.html | 2 +-
docs/build-tools/gradle/index.html | 2 +-
docs/build-tools/maven/index.html | 2 +-
docs/build-tools/mill/index.html | 2 +-
docs/build-tools/overview/index.html | 2 +-
docs/build-tools/sbt/index.html | 2 +-
docs/contributors/getting-started/index.html | 2 +-
docs/contributors/project-goals/index.html | 2 +-
docs/contributors/releasing/index.html | 2 +-
docs/contributors/updating-website/index.html | 2 +-
docs/diagrams/instruction/index.html | 2 +-
docs/editors/emacs/index.html | 6 +++---
docs/editors/online-ides/index.html | 2 +-
docs/editors/sublime/index.html | 4 ++--
docs/editors/user-configuration/index.html | 2 +-
docs/editors/vim/index.html | 8 ++++----
docs/editors/vscode/index.html | 4 ++--
docs/features/codeactions/index.html | 2 +-
docs/features/scripts/index.html | 2 +-
docs/index.html | 4 ++--
docs/integrations/debug-adapter-protocol/index.html | 2 +-
docs/integrations/decoration-protocol/index.html | 2 +-
docs/integrations/new-build-tool/index.html | 2 +-
docs/integrations/new-editor/index.html | 8 ++++----
docs/integrations/remote-language-server/index.html | 2 +-
docs/integrations/test-explorer/index.html | 2 +-
docs/integrations/tree-view-protocol/index.html | 2 +-
docs/troubleshooting/faq/index.html | 2 +-
docs/troubleshooting/proxy/index.html | 2 +-
index.html | 2 +-
latests.json | 4 ++--
search-index.json | 2 +-
search/index.html | 2 +-
166 files changed, 174 insertions(+), 174 deletions(-)
create mode 100644 assets/js/28906591.bf7a02e3.js
delete mode 100644 assets/js/28906591.c115c0f4.js
delete mode 100644 assets/js/49773175.1bc1e418.js
create mode 100644 assets/js/49773175.3ccc5da4.js
rename assets/js/{8a0b8ece.b4cabaaf.js => 8a0b8ece.1f7f4ad7.js} (63%)
rename assets/js/{94015cb6.910478de.js => 94015cb6.aebd4f14.js} (69%)
create mode 100644 assets/js/970a5f4e.154c41bc.js
delete mode 100644 assets/js/970a5f4e.af88a397.js
delete mode 100644 assets/js/9b4a23be.047090c6.js
create mode 100644 assets/js/9b4a23be.1a3a56c5.js
rename assets/js/{runtime~main.5a984eeb.js => runtime~main.58ba9853.js} (97%)
diff --git a/404.html b/404.html
index 9a08b4a11e3..3cca1a772a6 100644
--- a/404.html
+++ b/404.html
@@ -10,7 +10,7 @@
-
+
diff --git a/assets/js/28906591.bf7a02e3.js b/assets/js/28906591.bf7a02e3.js
new file mode 100644
index 00000000000..30d36a621f6
--- /dev/null
+++ b/assets/js/28906591.bf7a02e3.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1648],{8468:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>l,toc:()=>d});var i=s(5893),t=s(1151);const o={id:"new-editor",title:"Integrating a new editor"},r=void 0,l={id:"integrations/new-editor",title:"Integrating a new editor",description:"Metals is a language server implemented in Scala that communicates with a single",source:"@site/target/docs/integrations/new-editor.md",sourceDirName:"integrations",slug:"/integrations/new-editor",permalink:"/metals/docs/integrations/new-editor",draft:!1,unlisted:!1,editUrl:"https://github.com/scalameta/metals/edit/main/docs/integrations/new-editor.md",tags:[],version:"current",frontMatter:{id:"new-editor",title:"Integrating a new editor"},sidebar:"docs",previous:{title:"Integrating a new build tool",permalink:"/metals/docs/integrations/new-build-tool"},next:{title:"Test Explorer",permalink:"/metals/docs/integrations/test-explorer"}},a={},d=[{value:"Requirements",id:"requirements",level:2},{value:"Starting the server",id:"starting-the-server",level:2},{value:"Configuring the server",id:"configuring-the-server",level:2},{value:"Language Server Protocol",id:"language-server-protocol",level:2},{value:"initialize",id:"initialize",level:3},{value:"InitializationOptions",id:"initializationoptions",level:4},{value:"compilerOptions.completionCommand",id:"compileroptionscompletioncommand",level:5},{value:"compilerOptions.isCompletionItemDetailEnabled",id:"compileroptionsiscompletionitemdetailenabled",level:5},{value:"compilerOptions.isCompletionItemDocumentationEnabled",id:"compileroptionsiscompletionitemdocumentationenabled",level:5},{value:"compilerOptions.isCompletionItemResolve",id:"compileroptionsiscompletionitemresolve",level:5},{value:"compilerOptions.isHoverDocumentationEnabled",id:"compileroptionsishoverdocumentationenabled",level:5},{value:"compilerOptions.isSignatureHelpDocumentationEnabled",id:"compileroptionsissignaturehelpdocumentationenabled",level:5},{value:"compilerOptions.overrideDefFormat",id:"compileroptionsoverridedefformat",level:5},{value:"compilerOptions.parameterHintsCommand",id:"compileroptionsparameterhintscommand",level:5},{value:"compilerOptions.snippetAutoIndent",id:"compileroptionssnippetautoindent",level:5},{value:"copyWorksheetOutputProvider",id:"copyworksheetoutputprovider",level:5},{value:"debuggingProvider",id:"debuggingprovider",level:5},{value:"decorationProvider",id:"decorationprovider",level:5},{value:"didFocusProvider",id:"didfocusprovider",level:5},{value:"disableColorOutput",id:"disablecoloroutput",level:5},{value:"doctorProvider",id:"doctorprovider",level:5},{value:"executeClientCommandProvider",id:"executeclientcommandprovider",level:5},{value:"globSyntax",id:"globsyntax",level:5},{value:"inlineDecorationProvider",id:"inlinedecorationprovider",level:5},{value:"icons",id:"icons",level:5},{value:"inputBoxProvider",id:"inputboxprovider",level:5},{value:"isExitOnShutdown",id:"isexitonshutdown",level:5},{value:"isHttpEnabled",id:"ishttpenabled",level:5},{value:"openFilesOnRenameProvider",id:"openfilesonrenameprovider",level:5},{value:"openNewWindowProvider",id:"opennewwindowprovider",level:5},{value:"quickPickProvider",id:"quickpickprovider",level:5},{value:"renameFileThreshold",id:"renamefilethreshold",level:5},{value:"slowTaskProvider",id:"slowtaskprovider",level:5},{value:"statusBarProvider",id:"statusbarprovider",level:5},{value:"treeViewProvider",id:"treeviewprovider",level:5},{value:"testExplorerProvider",id:"testexplorerprovider",level:5},{value:"doctorVisibilityProvider",id:"doctorvisibilityprovider",level:5},{value:"Experimental Capabilities",id:"experimental-capabilities",level:4},{value:"initialized",id:"initialized",level:3},{value:"shutdown",id:"shutdown",level:3},{value:"exit",id:"exit",level:3},{value:"$/cancelRequest",id:"cancelrequest",level:3},{value:"client/registerCapability",id:"clientregistercapability",level:3},{value:"textDocument/didOpen",id:"textdocumentdidopen",level:3},{value:"textDocument/didChange",id:"textdocumentdidchange",level:3},{value:"textDocument/didClose",id:"textdocumentdidclose",level:3},{value:"textDocument/didSave",id:"textdocumentdidsave",level:3},{value:"textDocument/publishDiagnostics",id:"textdocumentpublishdiagnostics",level:3},{value:"textDocument/definition",id:"textdocumentdefinition",level:3},{value:"textDocument/references",id:"textdocumentreferences",level:3},{value:"textDocument/documentSymbol",id:"textdocumentdocumentsymbol",level:3},{value:"textDocument/formatting",id:"textdocumentformatting",level:3},{value:"textDocument/hover",id:"textdocumenthover",level:3},{value:"workspace/didChangeWatchedFiles",id:"workspacedidchangewatchedfiles",level:3},{value:"workspace/executeCommands",id:"workspaceexecutecommands",level:3},{value:"workspace/didChangeConfiguration",id:"workspacedidchangeconfiguration",level:3},{value:"window/logMessage",id:"windowlogmessage",level:3},{value:"window/showMessage",id:"windowshowmessage",level:3},{value:"window/showMessageRequest",id:"windowshowmessagerequest",level:3},{value:"Metals server properties",id:"metals-server-properties",level:2},{value:"-Dmetals.verbose",id:"-dmetalsverbose",level:3},{value:"-Dmetals.statistics",id:"-dmetalsstatistics",level:3},{value:"-Dmetals.h2.auto-server",id:"-dmetalsh2auto-server",level:3},{value:"-Dmetals.pc.debug",id:"-dmetalspcdebug",level:3},{value:"-Dbloop.sbt.version",id:"-dbloopsbtversion",level:3},{value:"-Dmetals.bloop-port",id:"-dmetalsbloop-port",level:3},{value:"Metals user configuration",id:"metals-user-configuration",level:2},{value:"Java Home directory",id:"java-home-directory",level:3},{value:"sbt script",id:"sbt-script",level:3},{value:"Gradle script",id:"gradle-script",level:3},{value:"Maven script",id:"maven-script",level:3},{value:"Mill script",id:"mill-script",level:3},{value:"Scalafmt config path",id:"scalafmt-config-path",level:3},{value:"Scalafix config path",id:"scalafix-config-path",level:3},{value:"Ammonite JVM Properties",id:"ammonite-jvm-properties",level:3},{value:"Excluded Packages",id:"excluded-packages",level:3},{value:"Don't generate Bloop plugin file for sbt",id:"dont-generate-bloop-plugin-file-for-sbt",level:3},{value:"Version of Bloop",id:"version-of-bloop",level:3},{value:"Bloop JVM Properties",id:"bloop-jvm-properties",level:3},{value:"Should display lenses with links to super methods",id:"should-display-lenses-with-links-to-super-methods",level:3},{value:"Should display type annotations for inferred types",id:"should-display-type-annotations-for-inferred-types",level:3},{value:"Should display implicit parameter at usage sites",id:"should-display-implicit-parameter-at-usage-sites",level:3},{value:"Should display implicit conversion at usage sites",id:"should-display-implicit-conversion-at-usage-sites",level:3},{value:"Use semantic tokens highlight",id:"use-semantic-tokens-highlight",level:3},{value:"Indent snippets when pasted.",id:"indent-snippets-when-pasted",level:3},{value:"Remote language server",id:"remote-language-server",level:3},{value:"Default fallback Scala version",id:"default-fallback-scala-version",level:3},{value:"Test UI used for tests and test suites",id:"test-ui-used-for-tests-and-test-suites",level:3},{value:"Eclipse Java formatter config path",id:"eclipse-java-formatter-config-path",level:3},{value:"Eclipse Java formatting profile",id:"eclipse-java-formatting-profile",level:3},{value:"Scala CLI launcher",id:"scala-cli-launcher",level:3},{value:"Custom project root",id:"custom-project-root",level:3},{value:"Show all compilation debugging information",id:"show-all-compilation-debugging-information",level:3},{value:"Metals server commands",id:"metals-server-commands",level:2},{value:"Analyze stacktrace",id:"analyze-stacktrace",level:3},{value:"Switch build server",id:"switch-build-server",level:3},{value:"Connect to build server",id:"connect-to-build-server",level:3},{value:"Cancel compilation",id:"cancel-compilation",level:3},{value:"Cascade compile",id:"cascade-compile",level:3},{value:"Clean compile",id:"clean-compile",level:3},{value:"Convert positional arguments to named ones",id:"convert-positional-arguments-to-named-ones",level:3},{value:"Copy Worksheet Output",id:"copy-worksheet-output",level:3},{value:"Discover main classes to run and return the object",id:"discover-main-classes-to-run-and-return-the-object",level:3},{value:"Discover tests",id:"discover-tests",level:3},{value:"Extract member definition",id:"extract-member-definition",level:3},{value:"Generate BSP Config",id:"generate-bsp-config",level:3},{value:"Goto location for position",id:"goto-location-for-position",level:3},{value:"Go to super method/field definition",id:"go-to-super-methodfield-definition",level:3},{value:"Goto location for symbol",id:"goto-location-for-symbol",level:3},{value:"Import build",id:"import-build",level:3},{value:"Insert inferred type of a value",id:"insert-inferred-type-of-a-value",level:3},{value:"Inline value",id:"inline-value",level:3},{value:"Create new scala file",id:"create-new-scala-file",level:3},{value:"Create new java file",id:"create-new-java-file",level:3},{value:"New Scala Project",id:"new-scala-project",level:3},{value:"Restart presentation compiler",id:"restart-presentation-compiler",level:3},{value:"Reset Choice Popup",id:"reset-choice-popup",level:3},{value:"Reset notifications",id:"reset-notifications",level:3},{value:"Extract method from range",id:"extract-method-from-range",level:3},{value:"Restart build server",id:"restart-build-server",level:3},{value:"Run doctor",id:"run-doctor",level:3},{value:"Run all Scalafix Rules",id:"run-all-scalafix-rules",level:3},{value:"Run a set of Scalafix Rules",id:"run-a-set-of-scalafix-rules",level:3},{value:"Decode file",id:"decode-file",level:3},{value:"Disconnect from old build server",id:"disconnect-from-old-build-server",level:3},{value:"List build targets",id:"list-build-targets",level:3},{value:"Scan sources",id:"scan-sources",level:3},{value:"Start Ammonite build server",id:"start-ammonite-build-server",level:3},{value:"Start debug adapter",id:"start-debug-adapter",level:3},{value:"Start main class",id:"start-main-class",level:3},{value:"Start test suite",id:"start-test-suite",level:3},{value:"Start test suite",id:"start-test-suite-1",level:3},{value:"Attach to a running jvm process",id:"attach-to-a-running-jvm-process",level:3},{value:"Try to discover a test or main to run.",id:"try-to-discover-a-test-or-main-to-run",level:3},{value:"Stop Ammonite build server",id:"stop-ammonite-build-server",level:3},{value:"Go to super method/field definition in hierarchy",id:"go-to-super-methodfield-definition-in-hierarchy",level:3},{value:"Start Scala CLI server",id:"start-scala-cli-server",level:3},{value:"Stop Scala CLI server",id:"stop-scala-cli-server",level:3},{value:"Open an issue on GitHub",id:"open-an-issue-on-github",level:3},{value:"Open a feature request",id:"open-a-feature-request",level:3},{value:"Create a zip with error reports",id:"create-a-zip-with-error-reports",level:3},{value:"Clean and restart build server",id:"clean-and-restart-build-server",level:3},{value:"Metals client commands",id:"metals-client-commands",level:2},{value:"Open a specified folder either in the same or new window",id:"open-a-specified-folder-either-in-the-same-or-new-window",level:3},{value:"Run doctor",id:"run-doctor-1",level:3},{value:"Reload doctor",id:"reload-doctor",level:3},{value:"Toggle logs",id:"toggle-logs",level:3},{value:"Open problems",id:"open-problems",level:3},{value:"Goto location",id:"goto-location",level:3},{value:"Echo command",id:"echo-command",level:3},{value:"Refresh model",id:"refresh-model",level:3},{value:"Show the stacktrace in the client.",id:"show-the-stacktrace-in-the-client",level:3},{value:"Copy Worksheet Output",id:"copy-worksheet-output-1",level:3},{value:"Start run session",id:"start-run-session",level:3},{value:"Start debug session",id:"start-debug-session",level:3},{value:"Connect to build server.",id:"connect-to-build-server-1",level:3},{value:"Metals HTTP client",id:"metals-http-client",level:2},{value:"Metals LSP extensions",id:"metals-lsp-extensions",level:2},{value:"Debug Adapter Protocol",id:"debug-adapter-protocol",level:3},{value:"Tree View Protocol",id:"tree-view-protocol",level:3},{value:"Decoration Protocol",id:"decoration-protocol",level:3},{value:"metals/slowTask",id:"metalsslowtask",level:3},{value:"metals/status",id:"metalsstatus",level:3},{value:"metals/didFocusTextDocument",id:"metalsdidfocustextdocument",level:3},{value:"metals/executeClientCommand",id:"metalsexecuteclientcommand",level:3},{value:"metals/inputBox",id:"metalsinputbox",level:3},{value:"metals/quickPick",id:"metalsquickpick",level:3},{value:"metals/windowStateDidChange",id:"metalswindowstatedidchange",level:3},{value:"metals/openWindow",id:"metalsopenwindow",level:3},{value:"metals/findTextInDependencyJars",id:"metalsfindtextindependencyjars",level:3},{value:"metals/doctorVisibilityDidChange",id:"metalsdoctorvisibilitydidchange",level:3}];function c(e){const n={a:"a",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",h5:"h5",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["Metals is a language server implemented in Scala that communicates with a single\nclient over ",(0,i.jsx)(n.a,{href:"https://www.jsonrpc.org/specification",children:"JSON-RPC"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"requirements",children:"Requirements"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Java 8, 11, 17 provided by OpenJDK or Oracle"}),". Eclipse OpenJ9 is not\nsupported, please make sure the ",(0,i.jsx)(n.code,{children:"JAVA_HOME"})," environment variable\npoints to a valid Java 8, 11 or 17 installation."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"macOS, Linux or Windows"}),". Metals is developed on many operating systems and\nevery PR is tested on Ubuntu, Windows and MacOS."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 2.13, 2.12, 2.11 and Scala 3"}),". Metals supports these Scala versions:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 2.13"}),":\n2.13.12, 2.13.11, 2.13.10, 2.13.9, 2.13.8, 2.13.7, 2.13.6, 2.13.5"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 2.12"}),":\n2.12.18, 2.12.17, 2.12.16, 2.12.15, 2.12.14, 2.12.13, 2.12.12, 2.12.11"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 2.11"}),":\n2.11.12"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 3"}),":\n3.3.1, 3.3.0, 3.2.2, 3.2.1, 3.2.0, 3.1.3, 3.1.2, 3.1.1, 3.1.0"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Note that 2.11.x support is deprecated and it will be removed in future releases.\nIt's recommended to upgrade to Scala 2.12 or Scala 2.13"}),"\n",(0,i.jsx)(n.h2,{id:"starting-the-server",children:"Starting the server"}),"\n",(0,i.jsxs)(n.p,{children:["Use ",(0,i.jsx)(n.a,{href:"https://github.com/coursier/coursier",children:"Coursier"})," to obtain the JVM classpath\nof Metals:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"coursier bootstrap org.scalameta:metals_2.13:1.2.0 -o metals -f\n"})}),"\n",(0,i.jsx)(n.p,{children:"(optional) It's recommended to enable JVM string de-duplication and provide a\ngenerous stack size and memory options."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"coursier bootstrap \\\n --java-opt -XX:+UseG1GC \\\n --java-opt -XX:+UseStringDeduplication \\\n --java-opt -Xss4m \\\n --java-opt -Xms100m \\\n org.scalameta:metals_2.13:1.2.0 -o metals -f\n"})}),"\n",(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"#metals-server-properties",children:"Metals server properties"})," for additional system\nproperties that are supported by the server."]}),"\n",(0,i.jsx)(n.p,{children:"JSON-RPC communication takes place over standard input/output so the Metals\nserver doesn't print anything to the console when it starts. Instead, before\nestablishing a connection with the client, Metals logs notifications to a global\ndirectory:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"# macOS\n~/Library/Caches/org.scalameta.metals/global.log\n# Linux\n$XDG_CACHE_HOME/org.scalameta.metals/global.log\n# Linux (alternative)\n$HOME/.cache/org.scalameta.metals/global.log\n# Windows\n{FOLDERID_LocalApplicationData}\\.cache\\org.scalameta.metals\\global.log\n"})}),"\n",(0,i.jsxs)(n.p,{children:["After establishing a connection with the client, Metals redirects logs to the\n",(0,i.jsx)(n.code,{children:".metals/metals.log"})," file in the LSP workspace root directory."]}),"\n",(0,i.jsx)(n.p,{children:"Metals supports two kinds of JSON-RPC endpoints:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"#language-server-protocol",children:"Language Server Protocol"}),": for the main\nfunctionality of the server, including editor text synchronization and\nsemantic features such as goto definition."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"#metals-lsp-extensions",children:"Metals extensions"}),": for additional functionality that\nis missing in LSP but improves the user experience."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"configuring-the-server",children:"Configuring the server"}),"\n",(0,i.jsxs)(n.p,{children:["Over time the recommended way to configure Metals has shifted from heavily\nrelying on the ",(0,i.jsx)(n.a,{href:"#metals-server-properties",children:"Metals server properties"})," to being\nfully able to be configured via ",(0,i.jsx)(n.code,{children:"InitializationOptions"})," which are exchanged\nduring the\n",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specification#initialize",children:(0,i.jsx)(n.code,{children:"initialize"})}),"\nprocess. While Metals will still work being fully configured by server\nproperties, we strongly recommend that instead you rely on the\n",(0,i.jsx)(n.code,{children:"InitializationOptions"})," which are thoroughly covered below in the\n",(0,i.jsx)(n.a,{href:"#initialize",children:(0,i.jsx)(n.code,{children:"initialize"})})," section."]}),"\n",(0,i.jsx)(n.h2,{id:"language-server-protocol",children:"Language Server Protocol"}),"\n",(0,i.jsxs)(n.p,{children:["Consult the\n",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specification",children:"LSP specification"}),"\nto learn more about how LSP works. Metals uses the following endpoints from the\nspecification."]}),"\n",(0,i.jsx)(n.h3,{id:"initialize",children:(0,i.jsx)(n.code,{children:"initialize"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["the ",(0,i.jsx)(n.code,{children:"rootUri"})," field is used to configure Metals for that workspace directory.\nThe working directory for where server is started has no significant meaning."]}),"\n",(0,i.jsx)(n.li,{children:"at this point, Metals uses only full text synchronization. In the future, it\nwill be able to use incremental text synchronization."}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"didChangeWatchedFiles"})," client capability is used to determine whether to\nregister file watchers."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"initializationoptions",children:(0,i.jsx)(n.code,{children:"InitializationOptions"})}),"\n",(0,i.jsxs)(n.p,{children:["During ",(0,i.jsx)(n.code,{children:"initialize"})," we also have the ability to pass in ",(0,i.jsx)(n.code,{children:"InitializationOptions"}),'.\nThis is the primary way to configure Metals. In Metals we have a few different\n"providers". Some are LSP extensions, such as ',(0,i.jsx)(n.code,{children:"metals/inputBox"})," which you read\nabout below, and others used to be server properties that have been migrated to\n",(0,i.jsx)(n.code,{children:"InitializationOptions"}),". M"]}),"\n",(0,i.jsxs)(n.p,{children:["The currently available settings for ",(0,i.jsx)(n.code,{children:"InitializationOptions"})," are listed below."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:' interface InitializationOptions: {\n compilerOptions: {\n completionCommand?: string;\n isCompletionItemDetailEnabled?: boolean;\n isCompletionItemDocumentationEnabled?: boolean;\n isCompletionItemResolve?: boolean;\n isHoverDocumentationEnabled?: boolean;\n isSignatureHelpDocumentationEnabled?: boolean;\n overrideDefFormat?: "ascii" | "unicode";\n parameterHintsCommand?: string;\n snippetAutoIndent?: boolean;\n }\n debuggingProvider?: boolean;\n decorationProvider?: boolean;\n inlineDecorationProvider?: boolean;\n didFocusProvider?: boolean;\n doctorProvider?: "json" | "html";\n executeClientCommandProvider?: boolean;\n globSyntax?: "vscode" | "uri";\n icons?: "vscode" | "octicons" | "atom" | "unicode";\n inputBoxProvider?: boolean;\n isVirtualDocumentSupported?: boolean;\n isExitOnShutdown?: boolean;\n isHttpEnabled?: boolean;\n openFilesOnRenameProvider?: boolean;\n quickPickProvider?: boolean;\n renameFileThreshold?: number;\n slowTaskProvider?: boolean;\n statusBarProvider?: "on" | "off" | "log-message" | "show-message";\n treeViewProvider?: boolean;\n testExplorerProvider?: boolean;\n openNewWindowProvider?: boolean;\n copyWorksheetOutputProvider?: boolean;\n commandInHtmlFormat?: "vscode" | "sublime";\n doctorVisibilityProvider?: boolean;\n }\n'})}),"\n",(0,i.jsxs)(n.p,{children:["You can also always check these in the\n",(0,i.jsx)(n.a,{href:"https://github.com/scalameta/metals/blob/main/metals/src/main/scala/scala/meta/internal/metals/InitializationOptions.scala",children:(0,i.jsx)(n.code,{children:"InitializationOptions.scala"})}),"\nfile where you'll find all of the options and descriptions. Alternatively you can check out the typescript equivalent - ",(0,i.jsx)(n.a,{href:"https://github.com/scalameta/metals-languageclient/blob/main/src/interfaces/MetalsInitializationOptions.ts",children:(0,i.jsx)(n.code,{children:"MetalsInitializationOptions.ts"})})]}),"\n",(0,i.jsx)(n.h5,{id:"compileroptionscompletioncommand",children:(0,i.jsx)(n.code,{children:"compilerOptions.completionCommand"})}),"\n",(0,i.jsxs)(n.p,{children:["An optional string value for a command identifier to trigger completion\n(",(0,i.jsx)(n.code,{children:"textDocument/signatureHelp"}),") in the editor."]}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:'"editor.action.triggerSuggest"'}),": currently used by Visual Studio Code and\ncoc.nvim."]}),"\n",(0,i.jsx)(n.li,{children:"empty: for all other editors."}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"compileroptionsiscompletionitemdetailenabled",children:(0,i.jsx)(n.code,{children:"compilerOptions.isCompletionItemDetailEnabled"})}),"\n",(0,i.jsxs)(n.p,{children:["Boolean value signifying whether or not the ",(0,i.jsx)(n.code,{children:"CompletionItem.detail"})," field should\nbe populated."]}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"true"})]}),"\n",(0,i.jsx)(n.h5,{id:"compileroptionsiscompletionitemdocumentationenabled",children:(0,i.jsx)(n.code,{children:"compilerOptions.isCompletionItemDocumentationEnabled"})}),"\n",(0,i.jsxs)(n.p,{children:["Boolean value signifying whether or not the ",(0,i.jsx)(n.code,{children:"CompletionItem.documentation"})," field\nshould be populated."]}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"true"})]}),"\n",(0,i.jsx)(n.h5,{id:"compileroptionsiscompletionitemresolve",children:(0,i.jsx)(n.code,{children:"compilerOptions.isCompletionItemResolve"})}),"\n",(0,i.jsxs)(n.p,{children:["Boolean value signifying whether the client wants Metals to handle the\n",(0,i.jsx)(n.code,{children:"completionItem/resolve"})," request."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specification#completionItem_resolve",children:"https://microsoft.github.io/language-server-protocol/specification#completionItem_resolve"})}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"true"})]}),"\n",(0,i.jsx)(n.h5,{id:"compileroptionsishoverdocumentationenabled",children:(0,i.jsx)(n.code,{children:"compilerOptions.isHoverDocumentationEnabled"})}),"\n",(0,i.jsxs)(n.p,{children:["Boolean value signifying whether to include docstrings in a ",(0,i.jsx)(n.code,{children:"textDocument/hover"}),"\nrequest."]}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"true"})]}),"\n",(0,i.jsx)(n.h5,{id:"compileroptionsissignaturehelpdocumentationenabled",children:(0,i.jsx)(n.code,{children:"compilerOptions.isSignatureHelpDocumentationEnabled"})}),"\n",(0,i.jsxs)(n.p,{children:["Boolean value signifying whether or not the ",(0,i.jsx)(n.code,{children:"SignatureHelp.documentation"})," field\nshould be populated."]}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"true"})]}),"\n",(0,i.jsx)(n.h5,{id:"compileroptionsoverridedefformat",children:(0,i.jsx)(n.code,{children:"compilerOptions.overrideDefFormat"})}),"\n",(0,i.jsx)(n.p,{children:"Whether or not the presentation compiler overrides should show unicode icon or\njust be in ascii format."}),"\n",(0,i.jsx)(n.p,{children:"Possible Values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:'"ascii"'})," (default)"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"unicode"}),' show the "\ud83d\udd3c" icon in overrides.']}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"compileroptionsparameterhintscommand",children:(0,i.jsx)(n.code,{children:"compilerOptions.parameterHintsCommand"})}),"\n",(0,i.jsxs)(n.p,{children:["An optional string value for a command identifier to trigger parameter hints\n(",(0,i.jsx)(n.code,{children:"textDocument/signatureHelp"}),") in the editor. Metals uses this setting to\npopulate ",(0,i.jsx)(n.code,{children:"CompletionItem.command"})," for completion items that move the cursor\ninside an argument list. For example, when completing ",(0,i.jsx)(n.code,{children:'"".stripSu@@'})," into\n",(0,i.jsx)(n.code,{children:'"".stripSuffix(@@)'}),", Metals will automatically trigger parameter hints if this\nsetting is provided by the editor."]}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:'"editor.action.triggerParameterHints"'}),": Used by Visual Studio Code and\ncoc.nvim."]}),"\n",(0,i.jsx)(n.li,{children:"empty: for all other editors."}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"compileroptionssnippetautoindent",children:(0,i.jsx)(n.code,{children:"compilerOptions.snippetAutoIndent"})}),"\n",(0,i.jsx)(n.p,{children:'Certain editors will automatically insert indentation equal to that of the\nreference line that the operation started on. This is relevant in the case of\nmultiline textEdits such as the "implement all methods" completion.'}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"on"}),": (default): the client automatically adds in the indentation. This is the\ncase for VS Code, Sublime, and coc.nvim."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"off"}),": the client does not add any indentation when receiving a multi-line\ntextEdit"]}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"copyworksheetoutputprovider",children:(0,i.jsx)(n.code,{children:"copyWorksheetOutputProvider"})}),"\n",(0,i.jsx)(n.p,{children:"Boolean value signifying whether or not the client supports running\nCopyWorksheetOutput server command and copying its results into the local\nbuffer."}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"false"})]}),"\n",(0,i.jsx)(n.h5,{id:"debuggingprovider",children:(0,i.jsx)(n.code,{children:"debuggingProvider"})}),"\n",(0,i.jsxs)(n.p,{children:["Boolean value to signify that the client supports the\n",(0,i.jsx)(n.a,{href:"/metals/docs/integrations/debug-adapter-protocol",children:"Debug Adapter Protocol"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"false"})]}),"\n",(0,i.jsx)(n.h5,{id:"decorationprovider",children:(0,i.jsx)(n.code,{children:"decorationProvider"})}),"\n",(0,i.jsxs)(n.p,{children:["Boolean value to signify that the client supports the\n",(0,i.jsx)(n.a,{href:"/metals/docs/integrations/decoration-protocol",children:"Decoration Protocol"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"false"})]}),"\n",(0,i.jsx)(n.h5,{id:"didfocusprovider",children:(0,i.jsx)(n.code,{children:"didFocusProvider"})}),"\n",(0,i.jsxs)(n.p,{children:["Boolean value to signify that the client supports the\n",(0,i.jsx)(n.a,{href:"#metalsdidfocustextdocument",children:(0,i.jsx)(n.code,{children:"metals/didFocusTextDocument"})})," extension."]}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"false"})]}),"\n",(0,i.jsx)(n.h5,{id:"disablecoloroutput",children:(0,i.jsx)(n.code,{children:"disableColorOutput"})}),"\n",(0,i.jsx)(n.p,{children:"Useful for certain DAP clients that are unable to handle color codes for output.\nThis will remove the color codes coming from whatever DAP server is currently\nbeing used."}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"false"})]}),"\n",(0,i.jsx)(n.h5,{id:"doctorprovider",children:(0,i.jsx)(n.code,{children:"doctorProvider"})}),"\n",(0,i.jsx)(n.p,{children:"Format that you'd like Doctor to return information in."}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"html"}),": (default): Metals will return html that can be rendered directly in\nthe browser or web view"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"json"}),": json representation of the information returned by Doctor. See the\njson format ",(0,i.jsx)(n.a,{href:"#run-doctor",children:"here"}),"."]}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"executeclientcommandprovider",children:(0,i.jsx)(n.code,{children:"executeClientCommandProvider"})}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"off"})," (default): the ",(0,i.jsx)(n.code,{children:"metals/executeClientCommand"})," notification is not\nsupported. Client commands can still be handled by enabling\n",(0,i.jsx)(n.code,{children:"-Dmetals.http=on"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"on"}),": the ",(0,i.jsx)(n.code,{children:"metals/executeClientCommand"})," notification is supported and all\n",(0,i.jsx)(n.a,{href:"#metals-client-commands",children:"Metals client commands"})," are handled."]}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"globsyntax",children:(0,i.jsx)(n.code,{children:"globSyntax"})}),"\n",(0,i.jsxs)(n.p,{children:["Controls the glob syntax for registering file watchers on absolute directories.\nRegistration happens via ",(0,i.jsx)(n.code,{children:"client/registerCapability"})," for the\n",(0,i.jsx)(n.a,{href:"#workspacedidchangewatchedfiles",children:(0,i.jsx)(n.code,{children:"workspace/didChangeWatchedFiles"})})," method, if\nthe editor client supports it."]}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"uri"})," (default): URI-encoded file paths, with forward slash ",(0,i.jsx)(n.code,{children:"/"})," for file\nseparators regardless of the operating system. Includes ",(0,i.jsx)(n.code,{children:"file://"})," prefix."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"vscode"}),": use regular Path.toString for the absolute directory parts (",(0,i.jsx)(n.code,{children:"/"})," on\nmacOS+Linux and ",(0,i.jsx)(n.code,{children:"\\"})," on Windows) and forward slashes ",(0,i.jsx)(n.code,{children:"/"})," for relative parts.\nFor example, ",(0,i.jsx)(n.code,{children:"C:\\Users\\IEUser\\workspace\\project/*.{scala,sbt,properties}"}),".\nThis mode is used by the VS Code client."]}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"inlinedecorationprovider",children:(0,i.jsx)(n.code,{children:"inlineDecorationProvider"})}),"\n",(0,i.jsxs)(n.p,{children:["If the client implements the Metals Decoration Protocol ",(0,i.jsx)(n.strong,{children:"and"})," supports\ndecorations to be shown inline and not only at the end of a line."]}),"\n",(0,i.jsxs)(n.p,{children:["Default: ",(0,i.jsx)(n.code,{children:"false"})]}),"\n",(0,i.jsx)(n.h5,{id:"icons",children:(0,i.jsx)(n.code,{children:"icons"})}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"none"})," (default): don't display icons in messages."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"vscode"}),": use ",(0,i.jsx)(n.a,{href:"https://octicons.github.com",children:"Octicons"})," such as ",(0,i.jsx)(n.code,{children:"$(rocket)"})," for\nstatus bar messages, as supported by th\n",(0,i.jsx)(n.a,{href:"https://code.visualstudio.com/docs/extensionAPI/vscode-api#StatusBarItem",children:"VS Code status bar"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"unicode"}),": use unicode emojis like \ud83d\ude80 for status bar messages."]}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"inputboxprovider",children:(0,i.jsx)(n.code,{children:"inputBoxProvider"})}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"off"})," (default): the ",(0,i.jsx)(n.code,{children:"metals/inputBox"})," request is not supported. In this case,\nMetals tries to fall back to ",(0,i.jsx)(n.code,{children:"window/showMessageRequest"})," when possible."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"on"}),": the ",(0,i.jsx)(n.code,{children:"metals/inputBox"})," request is fully supported."]}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"isexitonshutdown",children:(0,i.jsx)(n.code,{children:"isExitOnShutdown"})}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"off"})," (default): run ",(0,i.jsx)(n.code,{children:"System.exit"})," only on the ",(0,i.jsx)(n.code,{children:"exit"})," notification, as\nrequired by the LSP specification."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"on"}),": run ",(0,i.jsx)(n.code,{children:"System.exit"})," after the ",(0,i.jsx)(n.code,{children:"shutdown"})," request, going against the LSP\nspecification. This option is enabled by default for Sublime Text to prevent\nthe Metals process from staying alive after Sublime Text has quit with\n",(0,i.jsx)(n.code,{children:"Cmd+Q"}),". It's not possible for Sublime Text packages to register a callback\nwhen the editor has quit. See\n",(0,i.jsx)(n.a,{href:"https://github.com/tomv564/LSP/issues/410",children:"LSP#410"})," for more details."]}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"ishttpenabled",children:(0,i.jsx)(n.code,{children:"isHttpEnabled"})}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"off"})," (default): don't start a server with the Metals HTTP client."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"on"}),": start a server with the [Metals HTTP client] to interact with the server\nthrough a basic web UI. This option is needed for editor clients that don't\nsupport necessary requests such as ",(0,i.jsx)(n.code,{children:"window/showMessageRequest"}),"."]}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"openfilesonrenameprovider",children:(0,i.jsx)(n.code,{children:"openFilesOnRenameProvider"})}),"\n",(0,i.jsx)(n.p,{children:"Boolean value to signify whether or not the client opens files when doing a\nrename."}),"\n",(0,i.jsxs)(n.p,{children:["Default: ",(0,i.jsx)(n.code,{children:"false"})]}),"\n",(0,i.jsx)(n.h5,{id:"opennewwindowprovider",children:(0,i.jsx)(n.code,{children:"openNewWindowProvider"})}),"\n",(0,i.jsx)(n.p,{children:"Boolean value signifying whether or not the client supports opening up a new\nwindow with the newly created project. Used in conjunction with the New Project\nProvider."}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"false"})]}),"\n",(0,i.jsx)(n.h5,{id:"quickpickprovider",children:(0,i.jsx)(n.code,{children:"quickPickProvider"})}),"\n",(0,i.jsxs)(n.p,{children:["Boolean value to signify whether or not the client implements the\n",(0,i.jsx)(n.a,{href:"#metalsquickpick",children:(0,i.jsx)(n.code,{children:"metals/quickPick"})})," extensions."]}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"false"})]}),"\n",(0,i.jsx)(n.h5,{id:"renamefilethreshold",children:(0,i.jsx)(n.code,{children:"renameFileThreshold"})}),"\n",(0,i.jsxs)(n.p,{children:["The max amount of files that you would like the client to open if the client is\na ",(0,i.jsx)(n.code,{children:"openFilesOnRenameProvider"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"300"})]}),"\n",(0,i.jsx)(n.h5,{id:"slowtaskprovider",children:(0,i.jsx)(n.code,{children:"slowTaskProvider"})}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"off"})," (default): the ",(0,i.jsx)(n.code,{children:"metals/slowTask"})," request is not supported."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"on"}),": the ",(0,i.jsx)(n.code,{children:"metals/slowTask"})," request is fully supported."]}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"statusbarprovider",children:(0,i.jsx)(n.code,{children:"statusBarProvider"})}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"off"})," (default): the ",(0,i.jsx)(n.code,{children:"metals/status"})," notification is not supported."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"on"}),": the ",(0,i.jsx)(n.code,{children:"metals/status"})," notification is supported."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"log-message"}),": translate ",(0,i.jsx)(n.code,{children:"metals/status"})," notifications to ",(0,i.jsx)(n.code,{children:"window/logMessage"}),"\nnotifications."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"show-message"}),": translate ",(0,i.jsx)(n.code,{children:"metals/status"})," notifications to\n",(0,i.jsx)(n.code,{children:"window/showMessage"})," show notifications however the client displays messages\nto the user."]}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"treeviewprovider",children:(0,i.jsx)(n.code,{children:"treeViewProvider"})}),"\n",(0,i.jsxs)(n.p,{children:["Boolean value signifying whether or not the client supports the\n",(0,i.jsx)(n.a,{href:"/metals/docs/integrations/tree-view-protocol",children:"Tree View Protocol"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"false"})]}),"\n",(0,i.jsx)(n.h5,{id:"testexplorerprovider",children:(0,i.jsx)(n.code,{children:"testExplorerProvider"})}),"\n",(0,i.jsx)(n.p,{children:"Boolean value to signify whether or not the client implements the Test Explorer."}),"\n",(0,i.jsx)(n.h5,{id:"doctorvisibilityprovider",children:(0,i.jsx)(n.code,{children:"doctorVisibilityProvider"})}),"\n",(0,i.jsxs)(n.p,{children:["Boolean value to signify whether or not the client implements the ",(0,i.jsx)(n.code,{children:'"metals/doctorVisibilityDidChange"'}),".\nThis JSON notification is used to keep track of doctor state. If client implements this provider then Metals server\nwill send updates to the doctor view."]}),"\n",(0,i.jsx)(n.h4,{id:"experimental-capabilities",children:"Experimental Capabilities"}),"\n",(0,i.jsxs)(n.p,{children:["All of the features that used to be set with ",(0,i.jsx)(n.code,{children:"experimental"})," can now all be set\nvia ",(0,i.jsx)(n.code,{children:"InitializationOptions"}),". This is the preferred way to configure Metals."]}),"\n",(0,i.jsx)(n.h3,{id:"initialized",children:(0,i.jsx)(n.code,{children:"initialized"})}),"\n",(0,i.jsxs)(n.p,{children:["Triggers build server initialization and workspace indexing. The ",(0,i.jsx)(n.code,{children:"initialized"}),"\nnotification is critical for any Metals functionality to work."]}),"\n",(0,i.jsx)(n.h3,{id:"shutdown",children:(0,i.jsx)(n.code,{children:"shutdown"})}),"\n",(0,i.jsx)(n.p,{children:"It is very important that the client sends a shutdown request in order for\nMetals to clean up open resources."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["persists incremental compilation analysis files. Without a ",(0,i.jsx)(n.code,{children:"shutdown"})," hook,\nMetals will need to re-compile the entire workspace on next startup."]}),"\n",(0,i.jsxs)(n.li,{children:["stops ongoing processes such as ",(0,i.jsx)(n.code,{children:"sbt bloopInstall"})]}),"\n",(0,i.jsx)(n.li,{children:"closes database connections"}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"exit",children:(0,i.jsx)(n.code,{children:"exit"})}),"\n",(0,i.jsxs)(n.p,{children:["Kills the process using ",(0,i.jsx)(n.code,{children:"System.exit"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"cancelrequest",children:(0,i.jsx)(n.code,{children:"$/cancelRequest"})}),"\n",(0,i.jsxs)(n.p,{children:["Used by ",(0,i.jsx)(n.code,{children:"metals/slowTask"})," to notify when a long-running process has finished."]}),"\n",(0,i.jsx)(n.h3,{id:"clientregistercapability",children:(0,i.jsx)(n.code,{children:"client/registerCapability"})}),"\n",(0,i.jsxs)(n.p,{children:["If the client declares the ",(0,i.jsx)(n.code,{children:"workspace.didChangeWatchedFiles"})," capability during\nthe ",(0,i.jsx)(n.code,{children:"initialize"})," request, then Metals follows up with a\n",(0,i.jsx)(n.code,{children:"client/registerCapability"})," request to register file watchers for certain glob\npatterns."]}),"\n",(0,i.jsx)(n.h3,{id:"textdocumentdidopen",children:(0,i.jsx)(n.code,{children:"textDocument/didOpen"})}),"\n",(0,i.jsxs)(n.p,{children:["Triggers compilation in the build server for the build target containing the\nopened document. Related, see ",(0,i.jsx)(n.code,{children:"metals/didFocusTextDocument"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"textdocumentdidchange",children:(0,i.jsx)(n.code,{children:"textDocument/didChange"})}),"\n",(0,i.jsx)(n.p,{children:"Required to know the text contents of the current unsaved buffer."}),"\n",(0,i.jsx)(n.h3,{id:"textdocumentdidclose",children:(0,i.jsx)(n.code,{children:"textDocument/didClose"})}),"\n",(0,i.jsx)(n.p,{children:"Cleans up resources."}),"\n",(0,i.jsx)(n.h3,{id:"textdocumentdidsave",children:(0,i.jsx)(n.code,{children:"textDocument/didSave"})}),"\n",(0,i.jsx)(n.p,{children:"Triggers compilation in the build server and analyses if the build needs to be\nre-imported."}),"\n",(0,i.jsx)(n.h3,{id:"textdocumentpublishdiagnostics",children:(0,i.jsx)(n.code,{children:"textDocument/publishDiagnostics"})}),"\n",(0,i.jsxs)(n.p,{children:["Metals forwards diagnostics from the build server to the editor client.\nAdditionally, Metals publishes ",(0,i.jsx)(n.code,{children:"Information"})," diagnostics for unexpected\ncompilation errors when navigating external library sources."]}),"\n",(0,i.jsx)(n.h3,{id:"textdocumentdefinition",children:(0,i.jsx)(n.code,{children:"textDocument/definition"})}),"\n",(0,i.jsx)(n.p,{children:"Metals supports goto definition for workspace sources in addition to external\nlibrary sources."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Library sources live under the directory ",(0,i.jsx)(n.code,{children:".metals/readonly"})," and they are\nmarked as read-only to prevent the user from editing them."]}),"\n",(0,i.jsx)(n.li,{children:"The destination location can either be a Scala or Java source file. It is\nrecommended to have a Java language server installed to navigate Java sources."}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"textdocumentreferences",children:(0,i.jsx)(n.code,{children:"textDocument/references"})}),"\n",(0,i.jsx)(n.p,{children:"Metals finds symbol references for workspace sources but not external library\ndependencies."}),"\n",(0,i.jsxs)(n.p,{children:["LSP does not support streaming references so when project sources have not been\ncompiled at the point of a request, Metals returns immediately with potentially\nincomplete results and triggers a background cascade compilation to find new\nsymbol references. If new symbol references are discovered after the background\ncompilation completes, Metals sends a notification via ",(0,i.jsx)(n.code,{children:"metals/status"})," and\n",(0,i.jsx)(n.code,{children:"window/logMessage"}),' asking the user to run "find references" again.']}),"\n",(0,i.jsx)(n.h3,{id:"textdocumentdocumentsymbol",children:(0,i.jsx)(n.code,{children:"textDocument/documentSymbol"})}),"\n",(0,i.jsxs)(n.p,{children:["Returns ",(0,i.jsx)(n.code,{children:"DocumentSymbol[]"})," if the client declares support for hierarchical\ndocument symbol or ",(0,i.jsx)(n.code,{children:"SymbolInformation[]"})," otherwise."]}),"\n",(0,i.jsx)(n.h3,{id:"textdocumentformatting",children:(0,i.jsx)(n.code,{children:"textDocument/formatting"})}),"\n",(0,i.jsxs)(n.p,{children:["Formats the sources with the ",(0,i.jsx)(n.a,{href:"https://scalameta.org/scalafmt/",children:"Scalafmt"})," version\nthat is declared in ",(0,i.jsx)(n.code,{children:".scalafmt.conf"}),"."]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["when ",(0,i.jsx)(n.code,{children:".scalafmt.conf"})," is missing, Metals sends a ",(0,i.jsx)(n.code,{children:"window/showMessageRequest"}),"\nto create the file."]}),"\n",(0,i.jsxs)(n.li,{children:["when ",(0,i.jsx)(n.code,{children:".scalafmt.conf"})," exists but doesn't declare a ",(0,i.jsx)(n.code,{children:"version"})," setting, Metals\nsends a ",(0,i.jsx)(n.code,{children:"metals/inputBox"})," when supported (with fallback to\n",(0,i.jsx)(n.code,{children:"window/showMessageRequest"})," when unsupported) to prepend ",(0,i.jsx)(n.code,{children:"version=$VERSION"})," to\nthe ",(0,i.jsx)(n.code,{children:".scalafmt.conf"})," file."]}),"\n",(0,i.jsxs)(n.li,{children:["the first format request is usually slow because Metals needs to download\nScalafmt artifacts from Maven Central. While the download happens, Metals adds\na message in the status bar via ",(0,i.jsx)(n.code,{children:"metals/status"})," and detailed download progress\ninformation is logged to ",(0,i.jsx)(n.code,{children:".metals/metals.log"}),"."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"textdocumenthover",children:(0,i.jsx)(n.code,{children:"textDocument/hover"})}),"\n",(0,i.jsxs)(n.p,{children:["Returns ",(0,i.jsx)(n.code,{children:"Hover"})," for specified text document and position - ",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#textDocument_hover",children:"lsp spec"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"Metals also support an extended version of this method that supports hover for selection range.\nThe extended stucture of request params is the following:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"interface HoverExtParams {\n textDocument: TextDocumentIdentifier;\n /** Either `position` or `range` should be specified */\n position?: Position;\n range?: Range;\n}\n"})}),"\n",(0,i.jsx)(n.h3,{id:"workspacedidchangewatchedfiles",children:(0,i.jsx)(n.code,{children:"workspace/didChangeWatchedFiles"})}),"\n",(0,i.jsxs)(n.p,{children:["Optional. Metals uses a built-in file watcher for critical functionality such as\nGoto Definition so it is OK if an editor does not send\n",(0,i.jsx)(n.code,{children:"workspace/didChangeWatchedFiles"})," notifications."]}),"\n",(0,i.jsxs)(n.p,{children:["Metals listens to ",(0,i.jsx)(n.code,{children:"workspace/didChangeWatchedFiles"})," notifications from the\neditor for nice-to-have but non-critical file watching events. Metals\nautomatically registers for the following glob patterns if the editor supports\ndynamic registration for file watching."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "watchers": [\n {\n "globPattern": {\n "left": "file:///to/workspace/*.sbt"\n }\n },\n {\n "globPattern": {\n "left": "file:///to/workspace/pom.xml"\n }\n },\n {\n "globPattern": {\n "left": "file:///to/workspace/*.sc"\n }\n },\n {\n "globPattern": {\n "left": "file:///to/workspace/*?.gradle"\n }\n },\n {\n "globPattern": {\n "left": "file:///to/workspace/*.gradle.kts"\n }\n },\n {\n "globPattern": {\n "left": "file:///to/workspace/project/*.{scala,sbt}"\n }\n },\n {\n "globPattern": {\n "left": "file:///to/workspace/project/project/*.{scala,sbt}"\n }\n },\n {\n "globPattern": {\n "left": "file:///to/workspace/project/build.properties"\n }\n },\n {\n "globPattern": {\n "left": "file:///to/workspace/.metals/.reports/bloop/*/*"\n }\n }\n ]\n}\n'})}),"\n",(0,i.jsxs)(n.p,{children:["The editor is responsible for manually watching these file patterns if the\neditor does not support dynamic file watching registration but can still send\n",(0,i.jsx)(n.code,{children:"workspace/didChangeWatchedFiles"})," notifications."]}),"\n",(0,i.jsx)(n.h3,{id:"workspaceexecutecommands",children:(0,i.jsx)(n.code,{children:"workspace/executeCommands"})}),"\n",(0,i.jsxs)(n.p,{children:["Used to trigger a ",(0,i.jsx)(n.a,{href:"#metals-server-commands",children:"Metals server command"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"workspacedidchangeconfiguration",children:(0,i.jsx)(n.code,{children:"workspace/didChangeConfiguration"})}),"\n",(0,i.jsxs)(n.p,{children:["Used to update ",(0,i.jsx)(n.a,{href:"#metals-user-configuration",children:"Metals user configuration"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"windowlogmessage",children:(0,i.jsx)(n.code,{children:"window/logMessage"})}),"\n",(0,i.jsx)(n.p,{children:"Used to log non-critical and non-actionable information. The user is only\nexpected to use the logs for troubleshooting or finding metrics for how long\ncertain events take."}),"\n",(0,i.jsx)(n.h3,{id:"windowshowmessage",children:(0,i.jsx)(n.code,{children:"window/showMessage"})}),"\n",(0,i.jsxs)(n.p,{children:["Used to send critical but non-actionable notifications to the user. For\nnon-critical notifications, see ",(0,i.jsx)(n.code,{children:"metals/status"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"windowshowmessagerequest",children:(0,i.jsx)(n.code,{children:"window/showMessageRequest"})}),"\n",(0,i.jsxs)(n.p,{children:["Used to send critical and actionable notifications to the user. To notify the\nuser about long running tasks that can be cancelled, the extension\n",(0,i.jsx)(n.code,{children:"metals/slowTask"})," is used instead."]}),"\n",(0,i.jsx)(n.h2,{id:"metals-server-properties",children:"Metals server properties"}),"\n",(0,i.jsx)(n.p,{children:"There are various Metals server properties that can be configured through JVM\nsystem properties. A system property is passed to the server like this:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"# with `java` binary\njava -Dmetals.statistics=all ...\n# with `coursier bootstrap`\ncoursier bootstrap --java-opt -Dmetals.statistics=all ...\n"})}),"\n",(0,i.jsx)(n.p,{children:"Below are the available server properties:"}),"\n",(0,i.jsx)(n.h3,{id:"-dmetalsverbose",children:(0,i.jsx)(n.code,{children:"-Dmetals.verbose"})}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"off"})," (default): don't log unnecessary details."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"on"}),": emit very detailed logs, should only be used when debugging problems."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"-dmetalsstatistics",children:(0,i.jsx)(n.code,{children:"-Dmetals.statistics"})}),"\n",(0,i.jsx)(n.p,{children:"By default, Metals logs only the most relevant metrics like time it takes to run\nsbt and import a workspace. To enable further metrics, update this property\nwith a comma separated list of the following supported values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"memory"}),": print memory usage of the navigation index after build import."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"definition"}),": print total time to respond to ",(0,i.jsx)(n.code,{children:"textDocument/definition"}),"\nrequests."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Set the value to ",(0,i.jsx)(n.code,{children:"-Dmetals.statistics=all"})," to enable all statistics."]}),"\n",(0,i.jsx)(n.h3,{id:"-dmetalsh2auto-server",children:(0,i.jsx)(n.code,{children:"-Dmetals.h2.auto-server"})}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"on"})," (default): use\n",(0,i.jsxs)(n.a,{href:"http://www.h2database.com/html/features.html#auto_mixed_mode",children:["H2 ",(0,i.jsx)(n.code,{children:"AUTO_SERVER=TRUE"})," mode"]}),"\nto support multiple concurrent Metals servers in the same workspace. If this\noption is enabled, the Metals H2 database communicate to other concurrently\nrunning Metals servers via TCP through a free port. In case of failure to\nestablish a ",(0,i.jsx)(n.code,{children:"AUTO_SERVER=TRUE"})," connection, Metals falls back to\n",(0,i.jsx)(n.code,{children:"AUTO_SERVER=FALSE"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"off"}),": do not use ",(0,i.jsx)(n.code,{children:"AUTO_SERVER=TRUE"}),". By disabling this option, it's not\npossible to run concurrent Metals servers in the same workspace directory. For\nexample, it's not possible to have both VS Code and Vim installed with Metals\nrunning in the same directory. In case there are multiple Metals servers\nrunning in the same workspace directory, Metals falls back to using an\nin-memory database resulting in a degraded user experience."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"-dmetalspcdebug",children:(0,i.jsx)(n.code,{children:"-Dmetals.pc.debug"})}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"off"})," (default): do not log verbose debugging information for the presentation\ncompiler."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"on"}),": log verbose debugging information for the presentation compiler."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"-dbloopsbtversion",children:(0,i.jsx)(n.code,{children:"-Dbloop.sbt.version"})}),"\n",(0,i.jsxs)(n.p,{children:['Version number of the sbt-bloop plugin to use for the "Install build" command.\nDefault value is ',(0,i.jsx)(n.code,{children:"-Dbloop.sbt.version=1.5.13"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"The below properties are also available as user configuration options. It's\npreferable to set these there:"}),"\n",(0,i.jsx)(n.h3,{id:"-dmetalsbloop-port",children:(0,i.jsx)(n.code,{children:"-Dmetals.bloop-port"})}),"\n",(0,i.jsxs)(n.p,{children:["Port number of the Bloop server to connect to. Should only be used if Bloop\nserver was set up in a custom way. Default value is ",(0,i.jsx)(n.code,{children:"8212"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"Possible values are any allowed port number that the Bloop server is able to run\non."}),"\n",(0,i.jsx)(n.h2,{id:"metals-user-configuration",children:"Metals user configuration"}),"\n",(0,i.jsxs)(n.p,{children:["Users can customize the Metals server through the LSP\n",(0,i.jsx)(n.code,{children:"workspace/didChangeConfiguration"})," notification. Unlike server properties, it is\nnormal for regular Metals users to configure these options."]}),"\n",(0,i.jsxs)(n.p,{children:["User configuration options can optionally be provided via server properties\nusing the ",(0,i.jsx)(n.code,{children:"-Dmetals."})," prefix. System properties may be helpful for editor\nclients that don't support ",(0,i.jsx)(n.code,{children:"workspace/didChangeConfiguration"}),". In case user\nconfiguration is defined both via system properties and\n",(0,i.jsx)(n.code,{children:"workspace/didChangeConfiguration"}),", then ",(0,i.jsx)(n.code,{children:"workspace/didChangeConfiguration"}),"\ntakes precedence."]}),"\n",(0,i.jsx)(n.h3,{id:"java-home-directory",children:"Java Home directory"}),"\n",(0,i.jsxs)(n.p,{children:["The Java Home directory used for indexing JDK sources and locating the ",(0,i.jsx)(n.code,{children:"java"})," binary."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": ",(0,i.jsx)(n.code,{children:"JAVA_HOME"})," environment variable with fallback to ",(0,i.jsx)(n.code,{children:"user.home"})," system property."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "javaHome": "/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"sbt-script",children:"sbt script"}),"\n",(0,i.jsxs)(n.p,{children:["Optional absolute path to an ",(0,i.jsx)(n.code,{children:"sbt"})," executable to use for running ",(0,i.jsx)(n.code,{children:"sbt bloopInstall"}),".\nBy default, Metals uses ",(0,i.jsx)(n.code,{children:"java -jar sbt-launch.jar"})," with an embedded launcher while respecting\n",(0,i.jsx)(n.code,{children:".jvmopts"})," and ",(0,i.jsx)(n.code,{children:".sbtopts"}),". Update this setting if your ",(0,i.jsx)(n.code,{children:"sbt"})," script requires more customizations\nlike using environment variables."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": empty string ",(0,i.jsx)(n.code,{children:'""'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "sbtScript": "/usr/local/bin/sbt"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"gradle-script",children:"Gradle script"}),"\n",(0,i.jsxs)(n.p,{children:["Optional absolute path to a ",(0,i.jsx)(n.code,{children:"gradle"})," executable to use for running ",(0,i.jsx)(n.code,{children:"gradle bloopInstall"}),".\nBy default, Metals uses gradlew with 7.5.0 gradle version. Update this setting if your ",(0,i.jsx)(n.code,{children:"gradle"})," script requires more customizations\nlike using environment variables."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": empty string ",(0,i.jsx)(n.code,{children:'""'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "gradleScript": "/usr/local/bin/gradle"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"maven-script",children:"Maven script"}),"\n",(0,i.jsxs)(n.p,{children:["Optional absolute path to a ",(0,i.jsx)(n.code,{children:"maven"})," executable to use for generating bloop config.\nBy default, Metals uses mvnw maven wrapper with 3.6.1 maven version. Update this setting if your ",(0,i.jsx)(n.code,{children:"maven"})," script requires more customizations"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": empty string ",(0,i.jsx)(n.code,{children:'""'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "mavenScript": "/usr/local/bin/mvn"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"mill-script",children:"Mill script"}),"\n",(0,i.jsxs)(n.p,{children:["Optional absolute path to a ",(0,i.jsx)(n.code,{children:"mill"})," executable to use for running ",(0,i.jsx)(n.code,{children:"mill mill.contrib.bloop.Bloop/install"}),".\nBy default, Metals uses mill wrapper script with 0.5.0 mill version. Update this setting if your ",(0,i.jsx)(n.code,{children:"mill"})," script requires more customizations\nlike using environment variables."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": empty string ",(0,i.jsx)(n.code,{children:'""'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "millScript": "/usr/local/bin/mill"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"scalafmt-config-path",children:"Scalafmt config path"}),"\n",(0,i.jsxs)(n.p,{children:["Optional custom path to the .scalafmt.conf file.\nIt should be a path (relative or absolute - though an absolute path is recommended) and use\nforward slashes ",(0,i.jsx)(n.code,{children:"/"})," for file separators (even on Windows)."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": empty string ",(0,i.jsx)(n.code,{children:'""'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "scalafmtConfigPath": "project/.scalafmt.conf"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"scalafix-config-path",children:"Scalafix config path"}),"\n",(0,i.jsxs)(n.p,{children:["Optional custom path to the .scalafix.conf file.\nIt should be a path (relative or absolute - though an absolute path is recommended) and use\nforward slashes ",(0,i.jsx)(n.code,{children:"/"})," for file separators (even on Windows)."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": empty string ",(0,i.jsx)(n.code,{children:'""'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "scalafixConfigPath": "project/.scalafix.conf"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"ammonite-jvm-properties",children:"Ammonite JVM Properties"}),"\n",(0,i.jsxs)(n.p,{children:["Optional list of JVM properties to pass along to the Ammonite server.\nEach property needs to be a separate item.\\n\\nExample: ",(0,i.jsx)(n.code,{children:"-Xmx1G"})," or ",(0,i.jsx)(n.code,{children:"-Xms100M"}),'"']}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": ",(0,i.jsx)(n.code,{children:"[]"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "ammoniteJvmProperties": ["-Xmx1G"]\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"excluded-packages",children:"Excluded Packages"}),"\n",(0,i.jsx)(n.p,{children:"Packages that will be excluded from completions, imports, and symbol searches."}),"\n",(0,i.jsx)(n.p,{children:"Note that this is in addition to some default packages that are already excluded.\nThe default excluded packages are listed below:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:"META-INF\nimages\ntoolbarButtonGraphics\njdk\nsun\noracle\njava.awt.desktop\norg.jcp\norg.omg\norg.graalvm\ncom.oracle\ncom.sun\ncom.apple\napple\ncom.sourcegraph.shaded\n"})}),"\n",(0,i.jsxs)(n.p,{children:["If there is a need to remove one of the defaults, you are able to do so by including the\npackage in your list and prepending ",(0,i.jsx)(n.code,{children:"--"})," to it."]}),"\n",(0,i.jsx)(n.p,{children:"Example:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:'["--sun"]\n'})}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": ",(0,i.jsx)(n.code,{children:"[]"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "excludedPackages": ["akka.actor.typed.javadsl"]\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"dont-generate-bloop-plugin-file-for-sbt",children:"Don't generate Bloop plugin file for sbt"}),"\n",(0,i.jsxs)(n.p,{children:["If true, Metals will not generate ",(0,i.jsx)(n.code,{children:"metals.sbt"})," files under the assumption that sbt-bloop is already manually installed in the sbt build. Build import will fail with a 'not valid command bloopInstall' error in case Bloop is not manually installed in the build when using this option."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": false"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "bloopSbtAlreadyInstalled": false\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"version-of-bloop",children:"Version of Bloop"}),"\n",(0,i.jsx)(n.p,{children:"This version will be used for the Bloop build tool plugin, for any supported build tool,\nwhile importing in Metals as well as for running the embedded server"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": 1.5.13"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "bloopVersion": "1.4.0-RC1"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"bloop-jvm-properties",children:"Bloop JVM Properties"}),"\n",(0,i.jsxs)(n.p,{children:["Optional list of JVM properties to pass along to the Bloop server.\nPlease follow this guide for the format ",(0,i.jsx)(n.a,{href:"https://scalacenter.github.io/bloop/docs/server-reference#global-settings-for-the-server",children:"https://scalacenter.github.io/bloop/docs/server-reference#global-settings-for-the-server"}),'"']}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),': ["-Xmx1G"].']}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "bloopJvmProperties": ["-Xmx1G"]\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"should-display-lenses-with-links-to-super-methods",children:"Should display lenses with links to super methods"}),"\n",(0,i.jsx)(n.p,{children:"Super method lenses are visible above methods definition that override another methods. Clicking on a lens jumps to super method definition.\nDisabled lenses are not calculated for opened documents which might speed up document processing."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": false"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "superMethodLensesEnabled": false\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"should-display-type-annotations-for-inferred-types",children:"Should display type annotations for inferred types"}),"\n",(0,i.jsx)(n.p,{children:"When this option is enabled, each method that can have inferred types has them\ndisplayed either as additional decorations if they are supported by the editor or\nshown in the hover."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": false"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "showInferredType": false\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"should-display-implicit-parameter-at-usage-sites",children:"Should display implicit parameter at usage sites"}),"\n",(0,i.jsx)(n.p,{children:"When this option is enabled, each method that has implicit arguments has them\ndisplayed either as additional decorations if they are supported by the editor or\nshown in the hover."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": false"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "showImplicitArguments": false\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"should-display-implicit-conversion-at-usage-sites",children:"Should display implicit conversion at usage sites"}),"\n",(0,i.jsx)(n.p,{children:"When this option is enabled, each place where an implicit method or class is used has it\ndisplayed either as additional decorations if they are supported by the editor or\nshown in the hover."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": false"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "showImplicitConversionsAndClasses": false\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"use-semantic-tokens-highlight",children:"Use semantic tokens highlight"}),"\n",(0,i.jsx)(n.p,{children:"When this option is enabled, Metals will provide semantic tokens for clients that support it.\nThe feature should work within all supported files extensions aside from Java."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": true"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "enableSemanticHighlighting": false\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"indent-snippets-when-pasted",children:"Indent snippets when pasted."}),"\n",(0,i.jsx)(n.p,{children:"When this option is enabled, when a snippet is pasted into a Scala file, Metals will\ntry to adjust the indentation to that of the current cursor."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": false"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "enableIndentOnPaste": false\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"remote-language-server",children:"Remote language server"}),"\n",(0,i.jsx)(n.p,{children:"A URL pointing to an endpoint that implements a remote language server."}),"\n",(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"https://scalameta.org/metals/docs/integrations/remote-language-server",children:"https://scalameta.org/metals/docs/integrations/remote-language-server"})," for\ndocumentation on remote language servers."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": empty string ",(0,i.jsx)(n.code,{children:'""'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "remoteLanguageServer": "https://language-server.company.com/message"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"default-fallback-scala-version",children:"Default fallback Scala version"}),"\n",(0,i.jsx)(n.p,{children:"The Scala compiler version that is used as the default or fallback in case a file\ndoesn't belong to any build target or the specified Scala version isn't supported by Metals.\nThis applies to standalone Scala files, worksheets, and Ammonite scripts."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": 3.3.1"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "fallbackScalaVersion": 3.3.1\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"test-ui-used-for-tests-and-test-suites",children:"Test UI used for tests and test suites"}),"\n",(0,i.jsxs)(n.p,{children:['Default way of handling tests and test suites. The only valid values are\n"code lenses" and "test explorer". See ',(0,i.jsx)(n.a,{href:"https://scalameta.org/metals/docs/integrations/test-explorer",children:"https://scalameta.org/metals/docs/integrations/test-explorer"}),"\nfor information on how to work with the test explorer."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": Code Lenses"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "testUserInterface": test explorer\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"eclipse-java-formatter-config-path",children:"Eclipse Java formatter config path"}),"\n",(0,i.jsxs)(n.p,{children:["Optional custom path to the eclipse-formatter.xml file.\nIt should be a path (relative or absolute - though an absolute path is recommended) and use\nforward slashes ",(0,i.jsx)(n.code,{children:"/"})," for file separators (even on Windows)."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": empty string ",(0,i.jsx)(n.code,{children:'""'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "javaFormat.eclipseConfigPath": "formatters/eclipse-formatter.xml"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"eclipse-java-formatting-profile",children:"Eclipse Java formatting profile"}),"\n",(0,i.jsx)(n.p,{children:"If the Eclipse formatter file contains more than one profile, this option can be used to control which is used."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": empty string ",(0,i.jsx)(n.code,{children:'""'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "javaFormat.eclipseProfile": "GoogleStyle"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"scala-cli-launcher",children:"Scala CLI launcher"}),"\n",(0,i.jsxs)(n.p,{children:["Optional absolute path to a ",(0,i.jsx)(n.code,{children:"scala-cli"})," executable to use for running a Scala CLI BSP server.\nBy default, Metals uses the scala-cli from the PATH, or it's not found, downloads and runs Scala\nCLI on the JVM (slower than native Scala CLI). Update this if you want to use a custom Scala CLI\nlauncher, not available in PATH."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": empty string ",(0,i.jsx)(n.code,{children:'""'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "scalaCliLauncher": "/usr/local/bin/scala-cli"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"custom-project-root",children:"Custom project root"}),"\n",(0,i.jsx)(n.p,{children:'Optional relative path to your project\'s root.\nIf you want your project root to be the workspace/workspace root set it to "." .'}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": empty string ",(0,i.jsx)(n.code,{children:'""'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "customProjectRoot": "backend/scalaProject/"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"show-all-compilation-debugging-information",children:"Show all compilation debugging information"}),"\n",(0,i.jsx)(n.p,{children:"If a build server supports it (for example Bloop or Scala CLI), setting it to true\nwill make the logs contain all the possible debugging information including\nabout incremental compilation in Zinc."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": false"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "verboseCompilation": true\n }\n}\n'})}),"\n",(0,i.jsx)(n.h2,{id:"metals-server-commands",children:"Metals server commands"}),"\n",(0,i.jsxs)(n.p,{children:["The client can trigger one of the following commands through the\n",(0,i.jsx)(n.code,{children:"workspace/executeCommand"})," request."]}),"\n",(0,i.jsx)(n.h3,{id:"analyze-stacktrace",children:"Analyze stacktrace"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"analyze-stacktrace"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": [string], where the string is a stacktrace."]}),"\n",(0,i.jsx)(n.p,{children:"Converts provided stacktrace in the parameter to a format that contains links\nto locations of places where the exception was raised."}),"\n",(0,i.jsxs)(n.p,{children:["If the configuration parameter of the client ",(0,i.jsx)(n.code,{children:"commandInHtmlFormat"})," is set\nthen client is requested to display html with links\nalready pointing to proper locations in user codebase.\nOtherwise client will display simple scala file\nbut with code lenses that direct user to proper location in codebase."]}),"\n",(0,i.jsx)(n.h3,{id:"switch-build-server",children:"Switch build server"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"bsp-switch"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Prompt the user to select a new build server to connect to."}),"\n",(0,i.jsx)(n.p,{children:"This command does nothing in case there are less than two installed build\nservers on the computer. In case the user has multiple BSP servers installed\nthen Metals will prompt the user to select which server to use."}),"\n",(0,i.jsx)(n.h3,{id:"connect-to-build-server",children:"Connect to build server"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"build-connect"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Establish a new connection to the build server and reindex the workspace."}),"\n",(0,i.jsx)(n.p,{children:"This command can be helpful in scenarios when Metals feels unresponsive, for example\nwhen reopening Metals after the computer it has been sleeping."}),"\n",(0,i.jsx)(n.h3,{id:"cancel-compilation",children:"Cancel compilation"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"compile-cancel"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Cancel the currently ongoing compilation, if any."}),"\n",(0,i.jsx)(n.h3,{id:"cascade-compile",children:"Cascade compile"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"compile-cascade"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Compile the current open files along with all build targets in this workspace that depend on those files."}),"\n",(0,i.jsx)(n.p,{children:"By default, Metals compiles only the current build target and its dependencies when saving a file.\nRun the cascade compile task to additionally compile the inverse dependencies of the current build target.\nFor example, if you change the API in main sources and run cascade compile then it will also compile the\ntest sources that depend on main."}),"\n",(0,i.jsx)(n.h3,{id:"clean-compile",children:"Clean compile"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"compile-clean"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Recompile all build targets in this workspace."}),"\n",(0,i.jsx)(n.p,{children:"By default, Metals compiles the files incrementally. In case of any compile artifacts corruption\nthis command might be run to make sure everything is recompiled correctly."}),"\n",(0,i.jsx)(n.h3,{id:"convert-positional-arguments-to-named-ones",children:"Convert positional arguments to named ones"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"convert-to-named-arguments"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": Object with ",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentPositionParams",children:"TextDocumentPositionParams"})," of the target Apply and ",(0,i.jsx)(n.code,{children:"numUnnamedArgs"})," (int)"]}),"\n",(0,i.jsx)(n.p,{children:"Whenever a user chooses code action to convert to named arguments, this command is later run to\ndetermine the parameter names of all unnamed arguments and insert names at the correct locations."}),"\n",(0,i.jsx)(n.h3,{id:"copy-worksheet-output",children:"Copy Worksheet Output"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"copy-worksheet-output"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": [uri], the uri of the worksheet that you'd like to copy the contents of."]}),"\n",(0,i.jsx)(n.p,{children:"Copy the contents of a worksheet to your local buffer."}),"\n",(0,i.jsx)(n.p,{children:"Note: This command returns the contents of the worksheet, and the LSP client\nis in charge of taking that content and putting it into your local buffer."}),"\n",(0,i.jsx)(n.h3,{id:"discover-main-classes-to-run-and-return-the-object",children:"Discover main classes to run and return the object"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"discover-jvm-run-command"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": DebugUnresolvedTestClassParams object\nExample:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "path": "path/to/file.scala",\n "runType": "run"\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"Response:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "targets": ["id1"],\n "dataKind": "scala-main-class",\n "data": {\n "class": "Foo",\n "arguments": [],\n "jvmOptions": [],\n "environmentVariables": [],\n "shellCommand": "java ..."\n }\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"Gets the DebugSession object that also contains a command to run in shell based\non JVM environment including classpath, jvmOptions and environment parameters."}),"\n",(0,i.jsx)(n.h3,{id:"discover-tests",children:"Discover tests"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"discover-tests"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":\nAn object with uri, when request is meant to discover test cases for uri"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:"{\n uri: file:///home/dev/foo/Bar.scala\n}\n"})}),"\n",(0,i.jsx)(n.p,{children:"or empty object if request is meant to discover all test suites"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:"{}\n"})}),"\n",(0,i.jsx)(n.p,{children:"Discovers all tests in project or a file.\nSee ClientCommands.UpdateTestExplorer to see how response looks like."}),"\n",(0,i.jsx)(n.h3,{id:"extract-member-definition",children:"Extract member definition"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"extract-member-definition"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": This command should be sent in with the LSP ",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocumentPositionParams",children:(0,i.jsx)(n.code,{children:"TextDocumentPositionParams"})})]}),"\n",(0,i.jsx)(n.p,{children:"Whenever a user chooses a code action to extract a definition of a Class/Trait/Object/Enum this\ncommand is later ran to extract the code and create a new file with it"}),"\n",(0,i.jsx)(n.h3,{id:"generate-bsp-config",children:"Generate BSP Config"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"generate-bsp-config"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": [string], name of the build server."]}),"\n",(0,i.jsx)(n.p,{children:"Checks to see if your build tool can serve as a BSP server. If so, generate\nthe necessary BSP config to connect to the server. If there is more than one\nbuild tool for a workspace, you can then choose the desired one and that\none will be used to generate the config."}),"\n",(0,i.jsx)(n.p,{children:"After the config is generated, Metals will attempt to auto-connect to it."}),"\n",(0,i.jsx)(n.p,{children:"The build servers that Metals knows how to detect and start:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"sbt"}),"\n",(0,i.jsx)(n.li,{children:"mill-bsp"}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Note: while Metals does know how to start Bloop, Bloop will be started when you trigger a build\nimport or when you use ",(0,i.jsx)(n.code,{children:"bsp-switch"})," to switch to Bloop."]}),"\n",(0,i.jsx)(n.h3,{id:"goto-location-for-position",children:"Goto location for position"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"goto-position"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": [location], where the location is a lsp location object."]}),"\n",(0,i.jsx)(n.p,{children:"Move the cursor to the location provided in arguments.\nIt simply forwards request to client."}),"\n",(0,i.jsx)(n.h3,{id:"go-to-super-methodfield-definition",children:"Go to super method/field definition"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"goto-super-method"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": This command should be sent in with the LSP ",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocumentPositionParams",children:(0,i.jsx)(n.code,{children:"TextDocumentPositionParams"})})]}),"\n",(0,i.jsxs)(n.p,{children:["Jumps to super method/field definition of a symbol under cursor according to inheritance rules.\nWhen ",(0,i.jsx)(n.code,{children:"A {override def x()} <:< B <:< C {def x()}"})," and on method 'A.x' it will jump directly to 'C.x'\nas method x() is not overridden in B.\nIf symbol is a reference of a method it will jump to a definition.\nIf symbol under cursor is invalid or does not override anything then command is ignored."]}),"\n",(0,i.jsx)(n.h3,{id:"goto-location-for-symbol",children:"Goto location for symbol"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"goto"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": [string], where the string is a SemanticDB symbol."]}),"\n",(0,i.jsx)(n.p,{children:"Move the cursor to the definition of the argument symbol."}),"\n",(0,i.jsx)(n.h3,{id:"import-build",children:"Import build"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"build-import"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Import the latest changes from the build to for example pick up new library dependencies."}),"\n",(0,i.jsx)(n.p,{children:"By default, Metals automatically prompts you to import the build when sources of the build change.\nUse this command to manually trigger an import build instead of relying on the automatic prompt."}),"\n",(0,i.jsx)(n.h3,{id:"insert-inferred-type-of-a-value",children:"Insert inferred type of a value"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"insert-inferred-type"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": This command should be sent in with the LSP ",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocumentPositionParams",children:(0,i.jsx)(n.code,{children:"TextDocumentPositionParams"})})]}),"\n",(0,i.jsx)(n.p,{children:"Whenever a user chooses code action to insert the inferred type this command is later ran to\ncalculate the type and insert it in the correct location."}),"\n",(0,i.jsx)(n.h3,{id:"inline-value",children:"Inline value"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"inline-value"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": This command should be sent in with the LSP ",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocumentPositionParams",children:(0,i.jsx)(n.code,{children:"TextDocumentPositionParams"})})]}),"\n",(0,i.jsx)(n.p,{children:"Whenever a user chooses code action to inline a value this command is later ran to\nfind all the references to choose the correct inline version (if possible to perform)"}),"\n",(0,i.jsx)(n.h3,{id:"create-new-scala-file",children:"Create new scala file"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"new-scala-file"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": [string[]], where the first is a directory location for the new file.\nThe second and third positions correspond to the file name and file type to allow for quick\ncreation of a file if all are present."]}),"\n",(0,i.jsx)(n.p,{children:"Create and open new Scala file."}),"\n",(0,i.jsx)(n.p,{children:"The currently allowed Scala file types that can be passed in are:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"scala-file (Empty file)"}),"\n",(0,i.jsx)(n.li,{children:"scala-class (Class)"}),"\n",(0,i.jsx)(n.li,{children:"scala-case-class (Case Class)"}),"\n",(0,i.jsx)(n.li,{children:"scala-enum (Enum)"}),"\n",(0,i.jsx)(n.li,{children:"scala-object (Object)"}),"\n",(0,i.jsx)(n.li,{children:"scala-trait (Trait)"}),"\n",(0,i.jsx)(n.li,{children:"scala-package-object (Package Object)"}),"\n",(0,i.jsx)(n.li,{children:"scala-worksheet (Worksheet)"}),"\n",(0,i.jsx)(n.li,{children:"scala-script (Scala Script(Ammonite or Scala CLI))"}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Note: requires 'metals/inputBox' capability from language client."}),"\n",(0,i.jsx)(n.h3,{id:"create-new-java-file",children:"Create new java file"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"new-java-file"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": [string[]], where the first is a directory location for the new file.\nThe second and third positions correspond to the file name and file type to allow for quick\ncreation of a file if all are present."]}),"\n",(0,i.jsx)(n.p,{children:"Create and open a new Java file."}),"\n",(0,i.jsx)(n.p,{children:"The currently allowed Java file types that ca be passed in are:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"java-class (Class)"}),"\n",(0,i.jsx)(n.li,{children:"java-interface (Interface)"}),"\n",(0,i.jsx)(n.li,{children:"java-enum (Enum)"}),"\n",(0,i.jsx)(n.li,{children:"java-record (Record)"}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Note: requires 'metals/inputBox' capability from language client."}),"\n",(0,i.jsx)(n.h3,{id:"new-scala-project",children:"New Scala Project"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"new-scala-project"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsxs)(n.p,{children:["Create a new Scala project using one of the available g8 templates.\nThis includes simple projects as well as samples for most of the popular Scala frameworks.\nThe command reuses the Metals quick pick extension to work and can function with ",(0,i.jsx)(n.code,{children:"window/showMessageRequest"}),",\nhowever the experience will not be optimal in that case. Some editors might also offer to open the newly created\nproject via ",(0,i.jsx)(n.code,{children:"openNewWindowProvider"}),", but it is not necessary for the main functionality to work."]}),"\n",(0,i.jsx)(n.h3,{id:"restart-presentation-compiler",children:"Restart presentation compiler"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"presentation-compiler-restart"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Restart running presentation compiler instances."}),"\n",(0,i.jsx)(n.p,{children:"Metals automatically restarts the presentation compiler after every successful compilation\nin the build tool so this command should not be needed for normal usage. Please report\nan issue if you need to use this command."}),"\n",(0,i.jsx)(n.h3,{id:"reset-choice-popup",children:"Reset Choice Popup"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"reset-choice"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": [string?], where string is a choice value."]}),"\n",(0,i.jsx)(n.p,{children:"ResetChoicePopup command allows you to reset a decision you made about different settings.\nE.g. If you choose to import workspace with sbt you can decide to reset and change it again."}),"\n",(0,i.jsxs)(n.p,{children:["Provided string is optional but if present it must be one of defined in ",(0,i.jsx)(n.code,{children:"PopupChoiceReset.scala"}),"\nIf a choice is not provided it will execute interactive mode where user is prompt to select\nwhich choice to reset."]}),"\n",(0,i.jsx)(n.h3,{id:"reset-notifications",children:"Reset notifications"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"reset-notifications"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"ResetNotifications command allows you to reset all the dismissed notifications.\nE.g. If you choose to dismiss build import forever, this command will make the notification show up again."}),"\n",(0,i.jsx)(n.h3,{id:"extract-method-from-range",children:"Extract method from range"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"extract-method"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": LSP [",(0,i.jsx)(n.code,{children:"TextDocumentIdentifier"}),"], (",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentIdentifier",children:"https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentIdentifier"}),"),\nLSP [",(0,i.jsx)(n.code,{children:"Range"}),"], range of the code you'd like to extract as method,\nLSP [",(0,i.jsx)(n.code,{children:"Position"}),"], position where the definition of extracted method will be created."]}),"\n",(0,i.jsx)(n.p,{children:"Whenever a user chooses code action to extract method, this command is later ran to\ncalculate parameters for the newly created method and create its definition."}),"\n",(0,i.jsx)(n.h3,{id:"restart-build-server",children:"Restart build server"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"build-restart"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Unconditionally stop the current running Bloop server and start a new one using Bloop launcher"}),"\n",(0,i.jsx)(n.h3,{id:"run-doctor",children:"Run doctor"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"doctor-run"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Open the Metals doctor to troubleshoot potential problems with the build."}),"\n",(0,i.jsx)(n.p,{children:"This command can be helpful in scenarios where features are not working as expected such\nas compile errors are not appearing or completions are not correct."}),"\n",(0,i.jsx)(n.h3,{id:"run-all-scalafix-rules",children:"Run all Scalafix Rules"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"scalafix-run"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": This command should be sent in with the LSP ",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocumentPositionParams",children:(0,i.jsx)(n.code,{children:"TextDocumentPositionParams"})})]}),"\n",(0,i.jsx)(n.p,{children:"Run all the supported scalafix rules in your codebase."}),"\n",(0,i.jsxs)(n.p,{children:["If the rules are missing please add them to user configuration ",(0,i.jsx)(n.code,{children:"metals.scalafixRulesDependencies"}),".\nTheir format is the coursier one ",(0,i.jsx)(n.a,{href:"https://get-coursier.io/",children:"https://get-coursier.io/"})]}),"\n",(0,i.jsx)(n.h3,{id:"run-a-set-of-scalafix-rules",children:"Run a set of Scalafix Rules"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"scalafix-run-only"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": RunScalafixRulesParams object\nExample:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "textDocumentPositionParams": {\n "textDocument": {\n "uri": "path/to/file.scala"\n },\n "position": {\n "line": 70,\n "character": 33\n }\n },\n "rules": ["ExplicitResultTypes"]\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"Run a set of Scalafix rules in your codebase."}),"\n",(0,i.jsx)(n.p,{children:"If no rules are specified, this command will prompt the user to select one from a list\nof their project's enabled rules."}),"\n",(0,i.jsxs)(n.p,{children:["If you want to run all rules, use the ",(0,i.jsx)(n.code,{children:"scalafix-run"})," command instead."]}),"\n",(0,i.jsx)(n.h3,{id:"decode-file",children:"Decode file"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"file-decode"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": [uri], uri of the file with any parameters required for decoding.\nExamples:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["javap:","\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"metalsDecode:file:///somePath/someFile.java.javap\nmetalsDecode:file:///somePath/someFile.scala.javap\nmetalsDecode:file:///somePath/someFile.class.javap\nmetalsDecode:file:///somePath/someFile.java.javap-verbose\nmetalsDecode:file:///somePath/someFile.scala.javap-verbose\nmetalsDecode:file:///somePath/someFile.class.javap-verbose\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["semanticdb:","\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"metalsDecode:file:///somePath/someFile.java.semanticdb-compact\nmetalsDecode:file:///somePath/someFile.java.semanticdb-detailed\nmetalsDecode:file:///somePath/someFile.scala.semanticdb-compact\nmetalsDecode:file:///somePath/someFile.scala.semanticdb-detailed\nmetalsDecode:file:///somePath/someFile.java.semanticdb.semanticdb-compact\nmetalsDecode:file:///somePath/someFile.java.semanticdb.semanticdb-detailed\nmetalsDecode:file:///somePath/someFile.scala.semanticdb.semanticdb-compact\nmetalsDecode:file:///somePath/someFile.scala.semanticdb.semanticdb-detailed\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["tasty:","\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"metalsDecode:file:///somePath/someFile.scala.tasty-decoded\nmetalsDecode:file:///somePath/someFile.tasty.tasty-decoded\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["jar:","\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"metalsDecode:jar:file:///somePath/someFile-sources.jar!/somePackage/someFile.java\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["build target:","\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"metalsDecode:file:///workspacePath/buildTargetName.metals-buildtarget\n"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Response:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"interface DecoderResponse {\n requestedUri: string;\n value?: string;\n error?: string\n}\n"})}),"\n",(0,i.jsx)(n.p,{children:"Decode a file into a human readable format."}),"\n",(0,i.jsxs)(n.p,{children:["Compilation involves various binary files that can't be read directly\nin a text editor so they need to be decoded into a human readable format.\nExamples include ",(0,i.jsx)(n.code,{children:".class"})," and ",(0,i.jsx)(n.code,{children:".semanticdb"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"disconnect-from-old-build-server",children:"Disconnect from old build server"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"build-disconnect"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Unconditionally cancel existing build server connection without reconnecting"}),"\n",(0,i.jsx)(n.h3,{id:"list-build-targets",children:"List build targets"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"list-build-targets"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Retrieve a list of build targets for the workspace."}),"\n",(0,i.jsx)(n.h3,{id:"scan-sources",children:"Scan sources"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"sources-scan"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Walk all files in the workspace and index where symbols are defined."}),"\n",(0,i.jsxs)(n.p,{children:["Is automatically run once after ",(0,i.jsx)(n.code,{children:"initialized"})," notification and incrementally\nupdated on file watching events. A language client that doesn't support\nfile watching can run this manually instead. It should not be much slower\nthan walking the entire file tree and reading ",(0,i.jsx)(n.code,{children:"*.scala"})," files to string,\nindexing itself is cheap."]}),"\n",(0,i.jsx)(n.h3,{id:"start-ammonite-build-server",children:"Start Ammonite build server"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"ammonite-start"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Start Ammonite build server"}),"\n",(0,i.jsx)(n.h3,{id:"start-debug-adapter",children:"Start debug adapter"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"debug-adapter-start"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": DebugSessionParameters object\nExample:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "targets": ["mybuild://workspace/foo/?id=foo"],\n dataKind: "scala-main-class",\n data: {\n className: "com.foo.App"\n }\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"Start a new debugger session with fully specified DebugSessionParams"}),"\n",(0,i.jsx)(n.h3,{id:"start-main-class",children:"Start main class"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"debug-adapter-start"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": DebugUnresolvedMainClassParams object\nExample:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "mainClass": "path/to/file.scala",\n "buildTarget": "metals"\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"Start a new debugger session by resolving a main class by name and target"}),"\n",(0,i.jsx)(n.h3,{id:"start-test-suite",children:"Start test suite"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"debug-adapter-start"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ScalaTestSuitesDebugRequest object\nExample:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "target": "metals"\n "requestData" : {\n "suites": ["com.foo.FooSuite"],\n "jvmOptions": []],\n "environmentVariables": [],\n }\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"Start a new debugger session for a test suite, can be used to run a single test case"}),"\n",(0,i.jsx)(n.h3,{id:"start-test-suite-1",children:"Start test suite"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"debug-adapter-start"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": DebugUnresolvedTestClassParams object\nExample:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "testClass": "com.foo.FooSuite"\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"Start a new debugger session by resolving a test suite by name and possibly target."}),"\n",(0,i.jsx)(n.h3,{id:"attach-to-a-running-jvm-process",children:"Attach to a running jvm process"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"debug-adapter-start"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": DebugUnresolvedAttachRemoteParams object\nExample:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "hostName": "localhost",\n "port": 1234,\n "buildTarget": "metals",\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"Start a new debugger session by attaching to existing jvm process."}),"\n",(0,i.jsx)(n.h3,{id:"try-to-discover-a-test-or-main-to-run",children:"Try to discover a test or main to run."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"debug-adapter-start"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": DebugDiscoveryParams object\nExample:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "path": "path/to/file.scala",\n "runType": "run",\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"Start a new debugger session by running the discovered test or main class."}),"\n",(0,i.jsx)(n.h3,{id:"stop-ammonite-build-server",children:"Stop Ammonite build server"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"ammonite-stop"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Stop Ammonite build server"}),"\n",(0,i.jsx)(n.h3,{id:"go-to-super-methodfield-definition-in-hierarchy",children:"Go to super method/field definition in hierarchy"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"super-method-hierarchy"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": This command should be sent in with the LSP ",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocumentPositionParams",children:(0,i.jsx)(n.code,{children:"TextDocumentPositionParams"})})]}),"\n",(0,i.jsx)(n.p,{children:"When user executes this command it will calculate inheritance hierarchy of a class that contains given method.\nThen it will filter out classes not overriding given method and a list using 'metalsQuickPick' will be\ndisplayed to which super method user would like to go to.\nCommand has no effect on other symbols than method definition.\nQuickPick will show up only if more than one result is found."}),"\n",(0,i.jsx)(n.h3,{id:"start-scala-cli-server",children:"Start Scala CLI server"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"scala-cli-start"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Start Scala CLI server"}),"\n",(0,i.jsx)(n.h3,{id:"stop-scala-cli-server",children:"Stop Scala CLI server"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"scala-cli-stop"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Stop Scala CLI server"}),"\n",(0,i.jsx)(n.h3,{id:"open-an-issue-on-github",children:"Open an issue on GitHub"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"open-new-github-issue"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Open the Metals repository on GitHub to ask a question or report a bug."}),"\n",(0,i.jsx)(n.h3,{id:"open-a-feature-request",children:"Open a feature request"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"browser-open-url:https://github.com/scalameta/metals-feature-requests/issues/new?template=feature-request.yml"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Open the Metals repository on GitHub to open a feature request."}),"\n",(0,i.jsx)(n.h3,{id:"create-a-zip-with-error-reports",children:"Create a zip with error reports"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"zip-reports"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Creates a zip from incognito and bloop reports with additional information about build targets."}),"\n",(0,i.jsx)(n.h3,{id:"clean-and-restart-build-server",children:"Clean and restart build server"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"reset-workspace"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Clean metals cache and restart build server."}),"\n",(0,i.jsx)(n.p,{children:"When using Bloop, clears all directories in .bloop.\nThis will ensure that Bloop will have a fully reset state."}),"\n",(0,i.jsx)(n.h2,{id:"metals-client-commands",children:"Metals client commands"}),"\n",(0,i.jsxs)(n.p,{children:["The Metals server can send one of the following client commands if the client\nsupports the ",(0,i.jsx)(n.code,{children:"metals/executeClientCommand"})," notification,"]}),"\n",(0,i.jsx)(n.h3,{id:"open-a-specified-folder-either-in-the-same-or-new-window",children:"Open a specified folder either in the same or new window"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals-open-folder"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": An object with ",(0,i.jsx)(n.code,{children:"uri"})," and ",(0,i.jsx)(n.code,{children:"newWindow"})," fields.\nExample:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "uri": "file://path/to/directory",\n "newWindow": true\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"Open a new window with the specified directory."}),"\n",(0,i.jsx)(n.h3,{id:"run-doctor-1",children:"Run doctor"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals-doctor-run"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"string"}),", the HTML to display in the focused window."]}),"\n",(0,i.jsx)(n.p,{children:"Focus on a window displaying troubleshooting help from the Metals doctor."}),"\n",(0,i.jsxs)(n.p,{children:["If ",(0,i.jsx)(n.code,{children:"doctorProvider"})," is set to ",(0,i.jsx)(n.code,{children:'"json"'})," then the schema is as follows:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:"export interface DoctorOutput {\n /** Metals Doctor title */\n title: string;\n /** Version of the doctor json format, 0 if empty\n * The latest version is: 5\n */\n version: String;\n /**\n * Contains metals version and jdk info and a brief information about understanding\n * the Doctor placed in here as well. (since version 3 (replaces headerText))\n */\n header: DoctorHeader;\n /**\n * Troubleshooting help for each workspace folder.\n */\n folders: DoctorFolderResult[];\n}\n\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:"export interface DoctorFolderResult {\n /**\n * Contains decisions that were made about what build tool or build server\n * the user has chosen.\n */\n header: DoctorFolderHeader\n /**\n * If build targets are detected in your workspace, they will be listed here with\n * the status of related functionality of Metals for each build target.\n */\n targets?: DoctorBuildTarget[];\n /** Messages given if build targets cannot be found */\n messages?: DoctorRecommendation[];\n /** Explanations for the various statuses present in the doctor */\n explanations?: DoctorExplanation[];\n /** Error reports reported from Metals */\n errorReports: ErrorReportInfo[];\n}\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:"export interface DoctorHeader {\n /** java version and location information */\n jdkInfo?: string;\n /** the version of the server that is being used */\n serverInfo: string;\n /** small description on what a build target is */\n buildTargetDescription: string;\n}\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:"export interface DoctorFolderHeader {\n /** if Metals detected multiple build tools, this specifies the one the user has chosen */\n buildTool?: string;\n /** the build server that is being used */\n buildServer: string;\n /** if the user has turned the import prompt off, this will include a message on\n * how to get it back.\n */\n importBuildStatus?: string;\n}\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:"export interface DoctorBuildTarget {\n /** Name of the build target */\n buildTarget: string;\n /** Status of compilation for build this build target (since version 2) */\n compilationStatus: string;\n /** Can contain Scala version, sbt version or Java */\n targetType: string;\n /** Status of diagnostics */\n diagnostics: string;\n /** Status of completions, hovers and other interactive features*/\n interactive: string;\n /** Status of semanticdb indexes */\n semanticdb: string;\n /** Status of debugging */\n debugging: string;\n /** Status of java support */\n java: string;\n /** Any recommendations in how to fix any issues that are found above */\n recommendation: string;\n}\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:"export interface DoctorRecommendation {\n /** Title of the recommendation */\n title: string;\n /** Recommendations related to the found issue. */\n recommendations: string[]\n}\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:"export interface DoctorExplanation {\n /** Title of the explanation */\n title: string;\n /** Explanations of statuses that can be found in the doctor */\n recommendations: string[]\n}\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:"export interface ErrorReportInfo {\n /** Display name of the error */\n name: string;\n /** Timestamp of the report creation date */\n timestamp: number;\n /** Error report file uri */\n uri: string;\n /** Build target that the error is associated with */\n buildTarget?: string;\n /** Short error summary */\n shortSummary: string;\n /** The type of error -- This can be metals, metals-full, or bloop currently */\n errorReportType: string;\n}\n"})}),"\n",(0,i.jsx)(n.h3,{id:"reload-doctor",children:"Reload doctor"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals-doctor-reload"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"string"}),", the HTML to display in the focused window."]}),"\n",(0,i.jsxs)(n.p,{children:["Reload the HTML contents of an open Doctor window, if any. Should be ignored if there is no open doctor window.\nIf ",(0,i.jsx)(n.code,{children:"doctorProvider"})," is set to ",(0,i.jsx)(n.code,{children:'"json"'}),", then the schema is the same as found above in ",(0,i.jsx)(n.code,{children:'"metals-run-doctor"'})]}),"\n",(0,i.jsx)(n.h3,{id:"toggle-logs",children:"Toggle logs"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals-logs-toggle"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsxs)(n.p,{children:["Focus or remove focus on the output logs reported by the server via ",(0,i.jsx)(n.code,{children:"window/logMessage"}),"."]}),"\n",(0,i.jsx)(n.p,{children:'In VS Code, this opens the "output" channel for the Metals extension.'}),"\n",(0,i.jsx)(n.h3,{id:"open-problems",children:"Open problems"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals-diagnostics-focus"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Focus on the window that lists all published diagnostics."}),"\n",(0,i.jsx)(n.p,{children:'In VS Code, this opens the "problems" window.'}),"\n",(0,i.jsx)(n.h3,{id:"goto-location",children:"Goto location"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals-goto-location"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": First required parameter is LSP ",(0,i.jsx)(n.code,{children:"Location"})," object with ",(0,i.jsx)(n.code,{children:"uri"})," and ",(0,i.jsx)(n.code,{children:"range"})," fields.\nSecond parameter is optional and has signature ",(0,i.jsx)(n.code,{children:"otherWindow: Boolean"}),".\nIt gives a hint to client that if possible it would be good to open location in\nanother buffer/window.\nExample:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'[{\n "uri": "file://path/to/Definition.scala",\n "range": {\n "start": {"line": 194, "character": 0},\n "end": {"line": 194, "character": 1}\n },\n "otherWindow" : true\n},\n]\n'})}),"\n",(0,i.jsx)(n.p,{children:"Move the cursor focus to the provided location"}),"\n",(0,i.jsx)(n.h3,{id:"echo-command",children:"Echo command"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals-echo-command"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"string"}),", the command ID to execute on the client."]}),"\n",(0,i.jsx)(n.p,{children:"A client command that should be forwarded back to the Metals server."}),"\n",(0,i.jsx)(n.p,{children:"Metals may register commands in client UIs like tree view nodes that should be\nforwarded back to the Metals server if the client clicks on the UI elements."}),"\n",(0,i.jsx)(n.h3,{id:"refresh-model",children:"Refresh model"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals-model-refresh"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Note"}),": This request is deprecated and Metals will favor ",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specifications/specification-3-16/#codeLens_refresh",children:"Code Lens Refresh Request"})," if supported by the client."]}),"\n",(0,i.jsx)(n.p,{children:"Notifies the client that the model has been updated and it\nshould be refreshed (e.g. by resending code lens request)"}),"\n",(0,i.jsx)(n.h3,{id:"show-the-stacktrace-in-the-client",children:"Show the stacktrace in the client."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals-show-stacktrace"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": [string], the markdown representation of the stacktrace"]}),"\n",(0,i.jsx)(n.p,{children:"Show the stacktrace modified with links to specific files."}),"\n",(0,i.jsx)(n.h3,{id:"copy-worksheet-output-1",children:"Copy Worksheet Output"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals.copy-worksheet-output"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": [uri], the uri of the worksheet that you'd like to copy the contents of."]}),"\n",(0,i.jsx)(n.p,{children:"Copy the contents of a worksheet to your local buffer."}),"\n",(0,i.jsx)(n.p,{children:"Note: This command should execute the copy-worksheet-output\nserver command to get the output to copy into the buffer."}),"\n",(0,i.jsxs)(n.p,{children:["Server will attempt to create code lens with this command if ",(0,i.jsx)(n.code,{children:"copyWorksheetOutputProvider"})," option is set."]}),"\n",(0,i.jsx)(n.h3,{id:"start-run-session",children:"Start run session"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals-run-session-start"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": DebugSessionParameters object. It should be forwarded\nto the debug-adapter-start command as is."]}),"\n",(0,i.jsx)(n.p,{children:"Example:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "targets": ["mybuild://workspace/foo/?id=foo"],\n dataKind: "scala-main-class",\n data: {\n className: "com.foo.App"\n }\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"Starts a run session. The address of a new Debug Adapter can be obtained\nby using the debug-adapter-start metals server command\nwith the same arguments as provided to this command."}),"\n",(0,i.jsx)(n.h3,{id:"start-debug-session",children:"Start debug session"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals-debug-session-start"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": DebugSessionParameters object. It should be forwarded\nto the debug-adapter-start command as is."]}),"\n",(0,i.jsx)(n.p,{children:"Example:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "targets": ["mybuild://workspace/foo/?id=foo"],\n dataKind: "scala-main-class",\n data: {\n className: "com.foo.App"\n }\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"Starts a debug session. The address of a new Debug Adapter can be obtained\nby using the debug-adapter-start metals server command\nwith the same arguments as provided to this command."}),"\n",(0,i.jsx)(n.h3,{id:"connect-to-build-server-1",children:"Connect to build server."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals-build-connect"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Establish a new connection to the build server and reindex the workspace."}),"\n",(0,i.jsx)(n.p,{children:"This command can be helpful in scenarios when Metals feels unresponsive, for example\nwhen reopening Metals after the computer it has been sleeping."}),"\n",(0,i.jsx)(n.h2,{id:"metals-http-client",children:"Metals HTTP client"}),"\n",(0,i.jsx)(n.p,{children:"Metals has an optional web interface that can be used to trigger server commands\nand respond to server requests. This interface is not intended for regular\nusers, it exists only to help editor plugin authors integrate with Metals."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/t5RJ3q6.png",alt:"Metals http client"})}),"\n",(0,i.jsxs)(n.p,{children:["The server is enabled by passing the ",(0,i.jsx)(n.code,{children:"-Dmetals.http=on"})," system property. The\nserver runs by default at ",(0,i.jsx)(n.a,{href:"http://localhost:5031/",children:(0,i.jsx)(n.code,{children:"http://localhost:5031"})}),".\nWhen the port 5031 is taken the next free increment is chosen instead (5032,\n5033, ...)."]}),"\n",(0,i.jsx)(n.h2,{id:"metals-lsp-extensions",children:"Metals LSP extensions"}),"\n",(0,i.jsx)(n.p,{children:"Editor clients can opt into receiving Metals-specific JSON-RPC requests and\nnotifications. Metals extensions are not defined in LSP and are not strictly\nrequired for the Metals server to function but it is recommended to implement\nthem to improve the user experience."}),"\n",(0,i.jsxs)(n.p,{children:["To enable Metals extensions, start the main process with the system property\n",(0,i.jsx)(n.code,{children:"-Dmetals.extensions=true"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"debug-adapter-protocol",children:"Debug Adapter Protocol"}),"\n",(0,i.jsxs)(n.p,{children:["Metals implements and additional protocol for running and debugging inside the\neditor, see the\n",(0,i.jsx)(n.a,{href:"/metals/docs/integrations/debug-adapter-protocol",children:"Debug Adapter Protocol"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"tree-view-protocol",children:"Tree View Protocol"}),"\n",(0,i.jsxs)(n.p,{children:["Metals implements several custom JSON-RPC endpoints related to rendering tree\nviews in the editor client, the\n",(0,i.jsx)(n.a,{href:"/metals/docs/integrations/tree-view-protocol",children:"Tree View Protocol"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"decoration-protocol",children:"Decoration Protocol"}),"\n",(0,i.jsxs)(n.p,{children:["Metals implements an LSP extension to display non-editable text in the editor,\nsee the ",(0,i.jsx)(n.a,{href:"/metals/docs/integrations/decoration-protocol",children:"Decoration Protocol"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"metalsslowtask",children:(0,i.jsx)(n.code,{children:"metals/slowTask"})}),"\n",(0,i.jsxs)(n.p,{children:["The Metals slow task request is sent from the server to the client to notify the\nstart of a long running process with unknown estimated total time. A\n",(0,i.jsx)(n.code,{children:"cancel: true"})," response from the client cancels the task. A ",(0,i.jsx)(n.code,{children:"$/cancelRequest"}),"\nrequest from the server indicates that the task has completed."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/nsjWHWR.gif",alt:"Metals slow task"})}),"\n",(0,i.jsxs)(n.p,{children:["The difference between ",(0,i.jsx)(n.code,{children:"metals/slowTask"})," and ",(0,i.jsx)(n.code,{children:"window/showMessageRequest"})," is that\n",(0,i.jsx)(n.code,{children:"slowTask"})," is time-sensitive and the interface should display a timer for how\nlong the task has been running while ",(0,i.jsx)(n.code,{children:"showMessageRequest"})," is static."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.em,{children:"Request"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["method: ",(0,i.jsx)(n.code,{children:"metals/slowTask"})]}),"\n",(0,i.jsxs)(n.li,{children:["params: ",(0,i.jsx)(n.code,{children:"MetalsSlowTaskParams"})," defined as follows:"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:'interface MetalsSlowTaskParams {\n /** The name of this slow task */\n message: string;\n /**\n * If true, the log output from this task does not need to be displayed to the user.\n *\n * In VS Code, the Metals "Output channel" is not toggled when this flag is true.\n */\n quietLogs?: boolean;\n /** Time that has elapsed since the begging of the task. */\n secondsElapsed?: number;\n}\n'})}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.em,{children:"Response"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["result: ",(0,i.jsx)(n.code,{children:"MetalsSlowTaskResponse"})," defined as follows"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"interface MetalsSlowTaskResult {\n /**\n * If true, cancel the running task.\n * If false, the user dismissed the dialogue but want to\n * continue running the task.\n */\n cancel: boolean;\n}\n"})}),"\n",(0,i.jsx)(n.h3,{id:"metalsstatus",children:(0,i.jsx)(n.code,{children:"metals/status"})}),"\n",(0,i.jsxs)(n.p,{children:["The Metals status notification is sent from the server to the client to notify\nabout non-critical and non-actionable events that are happening in the server.\nMetals status notifications are a complement to ",(0,i.jsx)(n.code,{children:"window/showMessage"})," and\n",(0,i.jsx)(n.code,{children:"window/logMessage"}),". Unlike ",(0,i.jsx)(n.code,{children:"window/logMessage"}),", status notifications should\nalways be visible in the user interface. Unlike ",(0,i.jsx)(n.code,{children:"window/showMessage"}),", status\nnotifications are not critical meaning that they should not demand too much\nattention from the user."]}),"\n",(0,i.jsx)(n.p,{children:"In general, Metals uses status notifications to update the user about ongoing\nevents in the server such as batch compilation in the build server or when a\nsuccessful connection was established with the build server."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/XX9CLRH.gif",alt:"Metals status bar"})}),"\n",(0,i.jsxs)(n.p,{children:['The "\ud83d\ude80 Imported build" and "\ud83d\udd04 Compiling explorer" messages at the bottom of\nthe window are ',(0,i.jsx)(n.code,{children:"metals/status"})," notifications."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.em,{children:"Notification"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["method: ",(0,i.jsx)(n.code,{children:"metals/status"})]}),"\n",(0,i.jsxs)(n.li,{children:["params: ",(0,i.jsx)(n.code,{children:"MetalsStatusParams"})," defined as follows:"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"interface MetalsStatusParams {\n /** The text to display in the status bar. */\n text: string;\n /** If true, show the status bar. */\n show?: boolean;\n /** If true, hide the status bar. */\n hide?: boolean;\n /** If set, display this message when user hovers over the status bar. */\n tooltip?: string;\n /** If set, execute this command when the user clicks on the status bar item. */\n command?: string;\n}\n"})}),"\n",(0,i.jsx)(n.h3,{id:"metalsdidfocustextdocument",children:(0,i.jsx)(n.code,{children:"metals/didFocusTextDocument"})}),"\n",(0,i.jsxs)(n.p,{children:["The Metals did focus notification is sent from the client to the server when the\neditor changes focus to a new text document. Unlike ",(0,i.jsx)(n.code,{children:"textDocument/didOpen"}),", the\ndid focus notification is sent even when the text document is already open."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/XjTtAZK.gif",alt:"Metals did focus"})}),"\n",(0,i.jsxs)(n.p,{children:["Observe that the compilation error appears as soon as ",(0,i.jsx)(n.code,{children:"UserTest.scala"})," is\nfocused even if the text document was already open before. The LSP\n",(0,i.jsx)(n.code,{children:"textDocument/didOpen"})," notification is only sent the first time a document so it\nis not possible for the language server to re-trigger compilation when moves\nfocus back to ",(0,i.jsx)(n.code,{children:"UserTest.scala"})," that depends on APIs defined in ",(0,i.jsx)(n.code,{children:"User.scala"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.em,{children:"Notification"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["method: ",(0,i.jsx)(n.code,{children:"metals/didFocusTextDocument"})]}),"\n",(0,i.jsxs)(n.li,{children:["params: ",(0,i.jsx)(n.code,{children:"string"}),", the URI of the document where the focused was moved to."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"metalsexecuteclientcommand",children:(0,i.jsx)(n.code,{children:"metals/executeClientCommand"})}),"\n",(0,i.jsxs)(n.p,{children:["The Metals execute client command is sent from the server to the client to\ntrigger an action inside the editor. This notification is a copy of the\n",(0,i.jsx)(n.code,{children:"workspace/executeCommand"})," except"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"execute client command is a notification, not a request"}),"\n",(0,i.jsx)(n.li,{children:"execute client command is initiated from the server, not the client"}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"https://scalameta.org/metals/docs/integrations/new-editor#metals-client-commands",children:"Metals client\ncommands"}),"\nfor the list of supported client commands."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.em,{children:"Notification"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["method: ",(0,i.jsx)(n.code,{children:"metals/executeClientCommand"})]}),"\n",(0,i.jsxs)(n.li,{children:["params: ",(0,i.jsx)(n.code,{children:"ExecuteCommandParams"}),", as defined in LSP."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"metalsinputbox",children:(0,i.jsx)(n.code,{children:"metals/inputBox"})}),"\n",(0,i.jsxs)(n.p,{children:["The Metals input box request is sent from the server to the client to let the\nuser provide a string value for a given prompt. Unlike\n",(0,i.jsx)(n.code,{children:"window/showMessageRequest"}),", the ",(0,i.jsx)(n.code,{children:"metals/inputBox"})," request allows the user to\nprovide a custom response instead of picking a pre-selected value."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.em,{children:"Request"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["method: ",(0,i.jsx)(n.code,{children:"metals/inputBox"})]}),"\n",(0,i.jsxs)(n.li,{children:["params: ",(0,i.jsx)(n.code,{children:"MetalsInputBoxParams"})," defined as follows. Note, matches\n",(0,i.jsx)(n.a,{href:"https://code.visualstudio.com/api/references/vscode-api#InputBoxOptions",children:(0,i.jsx)(n.code,{children:"InputBoxOptions"})}),"\nin the Visual Studio Code API:"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"export interface MetalsInputBoxParams {\n /**\n * The value to prefill in the input box.\n */\n value?: string;\n /**\n * The text to display underneath the input box.\n */\n prompt?: string;\n /**\n * An optional string to show as place holder in the input box to guide the user what to type.\n */\n placeHolder?: string;\n /**\n * Set to `true` to show a password prompt that will not show the typed value.\n */\n password?: boolean;\n /**\n * Set to `true` to keep the input box open when focus moves to another part of the editor or to another window.\n */\n ignoreFocusOut?: boolean;\n}\n"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["result: ",(0,i.jsx)(n.code,{children:"MetalsInputBoxResult"})," defined as follows:"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"export interface MetalsInputBoxResult {\n value?: string;\n cancelled?: boolean;\n}\n"})}),"\n",(0,i.jsx)(n.h3,{id:"metalsquickpick",children:(0,i.jsx)(n.code,{children:"metals/quickPick"})}),"\n",(0,i.jsxs)(n.p,{children:["The Metals quick pick request is sent from the server to the client to let the\nuser provide a string value by picking one out of a number of given options. It\nis similar to ",(0,i.jsx)(n.code,{children:"window/showMessageRequest"}),", but the ",(0,i.jsx)(n.code,{children:"metals/quickPick"})," request\nhas richer parameters, that can be used to filter items to pick, like\n",(0,i.jsx)(n.code,{children:"description"})," and ",(0,i.jsx)(n.code,{children:"detail"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.em,{children:"Request"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["method: ",(0,i.jsx)(n.code,{children:"metals/quickPick"})]}),"\n",(0,i.jsxs)(n.li,{children:["params: ",(0,i.jsx)(n.code,{children:"MetalsQuickInputParams"})," defined as follows. It partially matches\n",(0,i.jsx)(n.a,{href:"https://code.visualstudio.com/api/references/vscode-api#QuickPickOptions",children:(0,i.jsx)(n.code,{children:"QuickPickOptions"})}),"\nin the Visual Studio Code API, but it also contains ",(0,i.jsx)(n.code,{children:"items"})," of\n",(0,i.jsx)(n.a,{href:"https://code.visualstudio.com/api/references/vscode-api#QuickPickItem",children:(0,i.jsx)(n.code,{children:"MetalsQuickPickItem"})}),",\nwhich, in it's turn, partially matches ",(0,i.jsx)(n.code,{children:"QuickPickItem"}),", but these interfaces\ndo not contain options for picking many items:"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"export interface MetalsQuickPickParams {\n /**\n * An array of items that can be selected from.\n */\n items: MetalsQuickPickItem[];\n /**\n * An optional flag to include the description when filtering the picks.\n */\n matchOnDescription?: boolean;\n /**\n * An optional flag to include the detail when filtering the picks.\n */\n matchOnDetail?: boolean;\n /**\n * An optional string to show as place holder in the input box to guide the user what to pick on.\n */\n placeHolder?: string;\n /**\n * Set to `true` to keep the picker open when focus moves to another part of the editor or to another window.\n */\n ignoreFocusOut?: boolean;\n}\n\nexport interface MetalsQuickPickItem {\n /**\n * An id for this items that should be return as a result of the picking.\n */\n id: string;\n /**\n * A human readable string which is rendered prominent.\n */\n label: string;\n /**\n * A human readable string which is rendered less prominent.\n */\n description?: string;\n /**\n * A human readable string which is rendered less prominent.\n */\n detail?: string;\n /**\n * Always show this item.\n */\n alwaysShow?: boolean;\n}\n"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["result: ",(0,i.jsx)(n.code,{children:"MetalsQuickPickResult"})," defined as follows:"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"export interface MetalsQuickPickResult {\n itemId?: string;\n cancelled?: boolean;\n}\n"})}),"\n",(0,i.jsx)(n.h3,{id:"metalswindowstatedidchange",children:(0,i.jsx)(n.code,{children:"metals/windowStateDidChange"})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"metals/windowStateDidChange"})," notification is sent from the client to the\nserver to indicate whether the editor application window is focused or not. When\nthe editor window is not focused, Metals tries to avoid triggering expensive\ncomputation in the background such as compilation."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.em,{children:"Notification"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["method: ",(0,i.jsx)(n.code,{children:"metals/windowStateDidChange"})]}),"\n",(0,i.jsxs)(n.li,{children:["params: ",(0,i.jsx)(n.code,{children:"WindowStateDidChangeParams"})," defined as follows:"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"interface WindowStateDidChangeParams( {\n /** If true, the editor application window is focused. False, otherwise. */\n focused: boolean;\n}\n"})}),"\n",(0,i.jsx)(n.h3,{id:"metalsopenwindow",children:(0,i.jsx)(n.code,{children:"metals/openWindow"})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"metals/openWindow"})," params are used with the New Scala Project\nfunctionality. After the new project has been created, if the editor has the\nability to open the project in a new window then these params are used with the\n",(0,i.jsx)(n.code,{children:"metals-open-folder"})," command."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"interface MetalsOpenWindowParams {\n /** Location of the newly created project. */\n uri: string;\n /** Whether or not to open the project in a new window. */\n openNewWindow: boolean;\n}\n"})}),"\n",(0,i.jsx)(n.h3,{id:"metalsfindtextindependencyjars",children:(0,i.jsx)(n.code,{children:"metals/findTextInDependencyJars"})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"FindTextInDependencyJars"})," request is sent from the client to the server to perform a search though files in the classpath\nincluding binary and sources jars. In response it returns a standard list of ",(0,i.jsx)(n.code,{children:"Location"})," from the ",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specification#location",children:"LSP spec"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["In case if this endpoint was called with empty ",(0,i.jsx)(n.code,{children:"query.pattern"})," or empty ",(0,i.jsx)(n.code,{children:"options.include"})," server sends ",(0,i.jsx)(n.a,{href:"https://scalameta.org/metals/docs/integrations/new-editor#metalsinputbox",children:(0,i.jsx)(n.code,{children:"metals/inputBox"})}),"\nrequest to the client to obtain these values."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.em,{children:"Request"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["method: ",(0,i.jsx)(n.code,{children:"metals/findTextInDependecyJars"})]}),"\n",(0,i.jsxs)(n.li,{children:["params: ",(0,i.jsx)(n.code,{children:"FindTextInDependencyJarsRequest"})," defined as follows."]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"/**\n * Currenly, only `pattern` field is used for search.\n * See: https://github.com/scalameta/metals/issues/3234\n */\ninterface TextSearchQuery {\n /**\n\t\t * The text pattern to search for.\n\t\t */\n pattern?: string;\n /**\n\t\t * Whether or not `pattern` should be interpreted as a regular expression.\n\t\t */\n isRegExp?: boolean;\n /**\n\t\t * Whether or not the search should be case-sensitive.\n\t\t */\n isCaseSensitive?: boolean;\n /**\n\t\t * Whether or not to search for whole word matches only.\n\t\t */\n isWordMatch?: boolean;\n}\n\ninterface FindTextInFilesOptions {\n /** Include file filter. Example: `*.conf` */\n include?: string;\n /** Exclude file filter. Example: `*.conf` */\n exclude?: string;\n}\n\ninterface FindTextInDependencyJarsRequest(\n options?: FindTextInFilesOptions;\n query: TextSearchQuery\n)\n"})}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.em,{children:"Response"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["result: ",(0,i.jsx)(n.code,{children:"Location[]"})]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"metalsdoctorvisibilitydidchange",children:(0,i.jsx)(n.code,{children:"metals/doctorVisibilityDidChange"})}),"\n",(0,i.jsxs)(n.p,{children:["When the client opens the doctor view, it will send in ",(0,i.jsx)(n.code,{children:"visible: true"})," to the\nserver and then ",(0,i.jsx)(n.code,{children:"visible: false"})," when the doctor view is closed. This will\nensure that the doctor checks aren't calculated on the server side when they\naren't needed to since they won't be seen by the client anyways."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.em,{children:"Notification"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["method: ",(0,i.jsx)(n.code,{children:"metals/doctorVisibilityDidChange"})]}),"\n",(0,i.jsxs)(n.li,{children:["params: ",(0,i.jsx)(n.code,{children:"DoctorVisibilityDidChangeParams"})]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"interface DoctorVisibilityDidChangeParams {\n visible: boolean;\n}\n"})})]})}function h(e={}){const{wrapper:n}={...(0,t.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},1151:(e,n,s)=>{s.d(n,{Z:()=>l,a:()=>r});var i=s(7294);const t={},o=i.createContext(t);function r(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/28906591.c115c0f4.js b/assets/js/28906591.c115c0f4.js
deleted file mode 100644
index 224308d57c3..00000000000
--- a/assets/js/28906591.c115c0f4.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1648],{8468:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>l,toc:()=>d});var i=s(5893),t=s(1151);const o={id:"new-editor",title:"Integrating a new editor"},r=void 0,l={id:"integrations/new-editor",title:"Integrating a new editor",description:"Metals is a language server implemented in Scala that communicates with a single",source:"@site/target/docs/integrations/new-editor.md",sourceDirName:"integrations",slug:"/integrations/new-editor",permalink:"/metals/docs/integrations/new-editor",draft:!1,unlisted:!1,editUrl:"https://github.com/scalameta/metals/edit/main/docs/integrations/new-editor.md",tags:[],version:"current",frontMatter:{id:"new-editor",title:"Integrating a new editor"},sidebar:"docs",previous:{title:"Integrating a new build tool",permalink:"/metals/docs/integrations/new-build-tool"},next:{title:"Test Explorer",permalink:"/metals/docs/integrations/test-explorer"}},a={},d=[{value:"Requirements",id:"requirements",level:2},{value:"Starting the server",id:"starting-the-server",level:2},{value:"Configuring the server",id:"configuring-the-server",level:2},{value:"Language Server Protocol",id:"language-server-protocol",level:2},{value:"initialize",id:"initialize",level:3},{value:"InitializationOptions",id:"initializationoptions",level:4},{value:"compilerOptions.completionCommand",id:"compileroptionscompletioncommand",level:5},{value:"compilerOptions.isCompletionItemDetailEnabled",id:"compileroptionsiscompletionitemdetailenabled",level:5},{value:"compilerOptions.isCompletionItemDocumentationEnabled",id:"compileroptionsiscompletionitemdocumentationenabled",level:5},{value:"compilerOptions.isCompletionItemResolve",id:"compileroptionsiscompletionitemresolve",level:5},{value:"compilerOptions.isHoverDocumentationEnabled",id:"compileroptionsishoverdocumentationenabled",level:5},{value:"compilerOptions.isSignatureHelpDocumentationEnabled",id:"compileroptionsissignaturehelpdocumentationenabled",level:5},{value:"compilerOptions.overrideDefFormat",id:"compileroptionsoverridedefformat",level:5},{value:"compilerOptions.parameterHintsCommand",id:"compileroptionsparameterhintscommand",level:5},{value:"compilerOptions.snippetAutoIndent",id:"compileroptionssnippetautoindent",level:5},{value:"copyWorksheetOutputProvider",id:"copyworksheetoutputprovider",level:5},{value:"debuggingProvider",id:"debuggingprovider",level:5},{value:"decorationProvider",id:"decorationprovider",level:5},{value:"didFocusProvider",id:"didfocusprovider",level:5},{value:"disableColorOutput",id:"disablecoloroutput",level:5},{value:"doctorProvider",id:"doctorprovider",level:5},{value:"executeClientCommandProvider",id:"executeclientcommandprovider",level:5},{value:"globSyntax",id:"globsyntax",level:5},{value:"inlineDecorationProvider",id:"inlinedecorationprovider",level:5},{value:"icons",id:"icons",level:5},{value:"inputBoxProvider",id:"inputboxprovider",level:5},{value:"isExitOnShutdown",id:"isexitonshutdown",level:5},{value:"isHttpEnabled",id:"ishttpenabled",level:5},{value:"openFilesOnRenameProvider",id:"openfilesonrenameprovider",level:5},{value:"openNewWindowProvider",id:"opennewwindowprovider",level:5},{value:"quickPickProvider",id:"quickpickprovider",level:5},{value:"renameFileThreshold",id:"renamefilethreshold",level:5},{value:"slowTaskProvider",id:"slowtaskprovider",level:5},{value:"statusBarProvider",id:"statusbarprovider",level:5},{value:"treeViewProvider",id:"treeviewprovider",level:5},{value:"testExplorerProvider",id:"testexplorerprovider",level:5},{value:"doctorVisibilityProvider",id:"doctorvisibilityprovider",level:5},{value:"Experimental Capabilities",id:"experimental-capabilities",level:4},{value:"initialized",id:"initialized",level:3},{value:"shutdown",id:"shutdown",level:3},{value:"exit",id:"exit",level:3},{value:"$/cancelRequest",id:"cancelrequest",level:3},{value:"client/registerCapability",id:"clientregistercapability",level:3},{value:"textDocument/didOpen",id:"textdocumentdidopen",level:3},{value:"textDocument/didChange",id:"textdocumentdidchange",level:3},{value:"textDocument/didClose",id:"textdocumentdidclose",level:3},{value:"textDocument/didSave",id:"textdocumentdidsave",level:3},{value:"textDocument/publishDiagnostics",id:"textdocumentpublishdiagnostics",level:3},{value:"textDocument/definition",id:"textdocumentdefinition",level:3},{value:"textDocument/references",id:"textdocumentreferences",level:3},{value:"textDocument/documentSymbol",id:"textdocumentdocumentsymbol",level:3},{value:"textDocument/formatting",id:"textdocumentformatting",level:3},{value:"textDocument/hover",id:"textdocumenthover",level:3},{value:"workspace/didChangeWatchedFiles",id:"workspacedidchangewatchedfiles",level:3},{value:"workspace/executeCommands",id:"workspaceexecutecommands",level:3},{value:"workspace/didChangeConfiguration",id:"workspacedidchangeconfiguration",level:3},{value:"window/logMessage",id:"windowlogmessage",level:3},{value:"window/showMessage",id:"windowshowmessage",level:3},{value:"window/showMessageRequest",id:"windowshowmessagerequest",level:3},{value:"Metals server properties",id:"metals-server-properties",level:2},{value:"-Dmetals.verbose",id:"-dmetalsverbose",level:3},{value:"-Dmetals.statistics",id:"-dmetalsstatistics",level:3},{value:"-Dmetals.h2.auto-server",id:"-dmetalsh2auto-server",level:3},{value:"-Dmetals.pc.debug",id:"-dmetalspcdebug",level:3},{value:"-Dbloop.sbt.version",id:"-dbloopsbtversion",level:3},{value:"-Dmetals.bloop-port",id:"-dmetalsbloop-port",level:3},{value:"Metals user configuration",id:"metals-user-configuration",level:2},{value:"Java Home directory",id:"java-home-directory",level:3},{value:"sbt script",id:"sbt-script",level:3},{value:"Gradle script",id:"gradle-script",level:3},{value:"Maven script",id:"maven-script",level:3},{value:"Mill script",id:"mill-script",level:3},{value:"Scalafmt config path",id:"scalafmt-config-path",level:3},{value:"Scalafix config path",id:"scalafix-config-path",level:3},{value:"Ammonite JVM Properties",id:"ammonite-jvm-properties",level:3},{value:"Excluded Packages",id:"excluded-packages",level:3},{value:"Don't generate Bloop plugin file for sbt",id:"dont-generate-bloop-plugin-file-for-sbt",level:3},{value:"Version of Bloop",id:"version-of-bloop",level:3},{value:"Bloop JVM Properties",id:"bloop-jvm-properties",level:3},{value:"Should display lenses with links to super methods",id:"should-display-lenses-with-links-to-super-methods",level:3},{value:"Should display type annotations for inferred types",id:"should-display-type-annotations-for-inferred-types",level:3},{value:"Should display implicit parameter at usage sites",id:"should-display-implicit-parameter-at-usage-sites",level:3},{value:"Should display implicit conversion at usage sites",id:"should-display-implicit-conversion-at-usage-sites",level:3},{value:"Use semantic tokens highlight",id:"use-semantic-tokens-highlight",level:3},{value:"Indent snippets when pasted.",id:"indent-snippets-when-pasted",level:3},{value:"Remote language server",id:"remote-language-server",level:3},{value:"Default fallback Scala version",id:"default-fallback-scala-version",level:3},{value:"Test UI used for tests and test suites",id:"test-ui-used-for-tests-and-test-suites",level:3},{value:"Eclipse Java formatter config path",id:"eclipse-java-formatter-config-path",level:3},{value:"Eclipse Java formatting profile",id:"eclipse-java-formatting-profile",level:3},{value:"Scala CLI launcher",id:"scala-cli-launcher",level:3},{value:"Custom project root",id:"custom-project-root",level:3},{value:"Show all compilation debugging information",id:"show-all-compilation-debugging-information",level:3},{value:"Metals server commands",id:"metals-server-commands",level:2},{value:"Analyze stacktrace",id:"analyze-stacktrace",level:3},{value:"Switch build server",id:"switch-build-server",level:3},{value:"Connect to build server",id:"connect-to-build-server",level:3},{value:"Cancel compilation",id:"cancel-compilation",level:3},{value:"Cascade compile",id:"cascade-compile",level:3},{value:"Clean compile",id:"clean-compile",level:3},{value:"Convert positional arguments to named ones",id:"convert-positional-arguments-to-named-ones",level:3},{value:"Copy Worksheet Output",id:"copy-worksheet-output",level:3},{value:"Discover main classes to run and return the object",id:"discover-main-classes-to-run-and-return-the-object",level:3},{value:"Discover tests",id:"discover-tests",level:3},{value:"Extract member definition",id:"extract-member-definition",level:3},{value:"Generate BSP Config",id:"generate-bsp-config",level:3},{value:"Goto location for position",id:"goto-location-for-position",level:3},{value:"Go to super method/field definition",id:"go-to-super-methodfield-definition",level:3},{value:"Goto location for symbol",id:"goto-location-for-symbol",level:3},{value:"Import build",id:"import-build",level:3},{value:"Insert inferred type of a value",id:"insert-inferred-type-of-a-value",level:3},{value:"Inline value",id:"inline-value",level:3},{value:"Create new scala file",id:"create-new-scala-file",level:3},{value:"Create new java file",id:"create-new-java-file",level:3},{value:"New Scala Project",id:"new-scala-project",level:3},{value:"Restart presentation compiler",id:"restart-presentation-compiler",level:3},{value:"Reset Choice Popup",id:"reset-choice-popup",level:3},{value:"Reset notifications",id:"reset-notifications",level:3},{value:"Extract method from range",id:"extract-method-from-range",level:3},{value:"Restart build server",id:"restart-build-server",level:3},{value:"Run doctor",id:"run-doctor",level:3},{value:"Run all Scalafix Rules",id:"run-all-scalafix-rules",level:3},{value:"Run a set of Scalafix Rules",id:"run-a-set-of-scalafix-rules",level:3},{value:"Decode file",id:"decode-file",level:3},{value:"Disconnect from old build server",id:"disconnect-from-old-build-server",level:3},{value:"List build targets",id:"list-build-targets",level:3},{value:"Scan sources",id:"scan-sources",level:3},{value:"Start Ammonite build server",id:"start-ammonite-build-server",level:3},{value:"Start debug adapter",id:"start-debug-adapter",level:3},{value:"Start main class",id:"start-main-class",level:3},{value:"Start test suite",id:"start-test-suite",level:3},{value:"Start test suite",id:"start-test-suite-1",level:3},{value:"Attach to a running jvm process",id:"attach-to-a-running-jvm-process",level:3},{value:"Try to discover a test or main to run.",id:"try-to-discover-a-test-or-main-to-run",level:3},{value:"Stop Ammonite build server",id:"stop-ammonite-build-server",level:3},{value:"Go to super method/field definition in hierarchy",id:"go-to-super-methodfield-definition-in-hierarchy",level:3},{value:"Start Scala CLI server",id:"start-scala-cli-server",level:3},{value:"Stop Scala CLI server",id:"stop-scala-cli-server",level:3},{value:"Open an issue on GitHub",id:"open-an-issue-on-github",level:3},{value:"Open a feature request",id:"open-a-feature-request",level:3},{value:"Create a zip with error reports",id:"create-a-zip-with-error-reports",level:3},{value:"Clean and restart build server",id:"clean-and-restart-build-server",level:3},{value:"Metals client commands",id:"metals-client-commands",level:2},{value:"Open a specified folder either in the same or new window",id:"open-a-specified-folder-either-in-the-same-or-new-window",level:3},{value:"Run doctor",id:"run-doctor-1",level:3},{value:"Reload doctor",id:"reload-doctor",level:3},{value:"Toggle logs",id:"toggle-logs",level:3},{value:"Open problems",id:"open-problems",level:3},{value:"Goto location",id:"goto-location",level:3},{value:"Echo command",id:"echo-command",level:3},{value:"Refresh model",id:"refresh-model",level:3},{value:"Show the stacktrace in the client.",id:"show-the-stacktrace-in-the-client",level:3},{value:"Copy Worksheet Output",id:"copy-worksheet-output-1",level:3},{value:"Start run session",id:"start-run-session",level:3},{value:"Start debug session",id:"start-debug-session",level:3},{value:"Connect to build server.",id:"connect-to-build-server-1",level:3},{value:"Metals HTTP client",id:"metals-http-client",level:2},{value:"Metals LSP extensions",id:"metals-lsp-extensions",level:2},{value:"Debug Adapter Protocol",id:"debug-adapter-protocol",level:3},{value:"Tree View Protocol",id:"tree-view-protocol",level:3},{value:"Decoration Protocol",id:"decoration-protocol",level:3},{value:"metals/slowTask",id:"metalsslowtask",level:3},{value:"metals/status",id:"metalsstatus",level:3},{value:"metals/didFocusTextDocument",id:"metalsdidfocustextdocument",level:3},{value:"metals/executeClientCommand",id:"metalsexecuteclientcommand",level:3},{value:"metals/inputBox",id:"metalsinputbox",level:3},{value:"metals/quickPick",id:"metalsquickpick",level:3},{value:"metals/windowStateDidChange",id:"metalswindowstatedidchange",level:3},{value:"metals/openWindow",id:"metalsopenwindow",level:3},{value:"metals/findTextInDependencyJars",id:"metalsfindtextindependencyjars",level:3},{value:"metals/doctorVisibilityDidChange",id:"metalsdoctorvisibilitydidchange",level:3}];function c(e){const n={a:"a",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",h5:"h5",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["Metals is a language server implemented in Scala that communicates with a single\nclient over ",(0,i.jsx)(n.a,{href:"https://www.jsonrpc.org/specification",children:"JSON-RPC"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"requirements",children:"Requirements"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Java 8, 11, 17 provided by OpenJDK or Oracle"}),". Eclipse OpenJ9 is not\nsupported, please make sure the ",(0,i.jsx)(n.code,{children:"JAVA_HOME"})," environment variable\npoints to a valid Java 8, 11 or 17 installation."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"macOS, Linux or Windows"}),". Metals is developed on many operating systems and\nevery PR is tested on Ubuntu, Windows and MacOS."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 2.13, 2.12, 2.11 and Scala 3"}),". Metals supports these Scala versions:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 2.13"}),":\n2.13.12, 2.13.11, 2.13.10, 2.13.9, 2.13.8, 2.13.7, 2.13.6, 2.13.5"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 2.12"}),":\n2.12.18, 2.12.17, 2.12.16, 2.12.15, 2.12.14, 2.12.13, 2.12.12, 2.12.11"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 2.11"}),":\n2.11.12"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 3"}),":\n3.3.1, 3.3.0, 3.2.2, 3.2.1, 3.2.0, 3.1.3, 3.1.2, 3.1.1, 3.1.0"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Note that 2.11.x support is deprecated and it will be removed in future releases.\nIt's recommended to upgrade to Scala 2.12 or Scala 2.13"}),"\n",(0,i.jsx)(n.h2,{id:"starting-the-server",children:"Starting the server"}),"\n",(0,i.jsxs)(n.p,{children:["Use ",(0,i.jsx)(n.a,{href:"https://github.com/coursier/coursier",children:"Coursier"})," to obtain the JVM classpath\nof Metals:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"coursier bootstrap org.scalameta:metals_2.13:1.2.0+13-615add64-SNAPSHOT -o metals -f\n"})}),"\n",(0,i.jsx)(n.p,{children:"(optional) It's recommended to enable JVM string de-duplication and provide a\ngenerous stack size and memory options."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"coursier bootstrap \\\n --java-opt -XX:+UseG1GC \\\n --java-opt -XX:+UseStringDeduplication \\\n --java-opt -Xss4m \\\n --java-opt -Xms100m \\\n org.scalameta:metals_2.13:1.2.0+13-615add64-SNAPSHOT -o metals -f\n"})}),"\n",(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"#metals-server-properties",children:"Metals server properties"})," for additional system\nproperties that are supported by the server."]}),"\n",(0,i.jsx)(n.p,{children:"JSON-RPC communication takes place over standard input/output so the Metals\nserver doesn't print anything to the console when it starts. Instead, before\nestablishing a connection with the client, Metals logs notifications to a global\ndirectory:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"# macOS\n~/Library/Caches/org.scalameta.metals/global.log\n# Linux\n$XDG_CACHE_HOME/org.scalameta.metals/global.log\n# Linux (alternative)\n$HOME/.cache/org.scalameta.metals/global.log\n# Windows\n{FOLDERID_LocalApplicationData}\\.cache\\org.scalameta.metals\\global.log\n"})}),"\n",(0,i.jsxs)(n.p,{children:["After establishing a connection with the client, Metals redirects logs to the\n",(0,i.jsx)(n.code,{children:".metals/metals.log"})," file in the LSP workspace root directory."]}),"\n",(0,i.jsx)(n.p,{children:"Metals supports two kinds of JSON-RPC endpoints:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"#language-server-protocol",children:"Language Server Protocol"}),": for the main\nfunctionality of the server, including editor text synchronization and\nsemantic features such as goto definition."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"#metals-lsp-extensions",children:"Metals extensions"}),": for additional functionality that\nis missing in LSP but improves the user experience."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"configuring-the-server",children:"Configuring the server"}),"\n",(0,i.jsxs)(n.p,{children:["Over time the recommended way to configure Metals has shifted from heavily\nrelying on the ",(0,i.jsx)(n.a,{href:"#metals-server-properties",children:"Metals server properties"})," to being\nfully able to be configured via ",(0,i.jsx)(n.code,{children:"InitializationOptions"})," which are exchanged\nduring the\n",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specification#initialize",children:(0,i.jsx)(n.code,{children:"initialize"})}),"\nprocess. While Metals will still work being fully configured by server\nproperties, we strongly recommend that instead you rely on the\n",(0,i.jsx)(n.code,{children:"InitializationOptions"})," which are thoroughly covered below in the\n",(0,i.jsx)(n.a,{href:"#initialize",children:(0,i.jsx)(n.code,{children:"initialize"})})," section."]}),"\n",(0,i.jsx)(n.h2,{id:"language-server-protocol",children:"Language Server Protocol"}),"\n",(0,i.jsxs)(n.p,{children:["Consult the\n",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specification",children:"LSP specification"}),"\nto learn more about how LSP works. Metals uses the following endpoints from the\nspecification."]}),"\n",(0,i.jsx)(n.h3,{id:"initialize",children:(0,i.jsx)(n.code,{children:"initialize"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["the ",(0,i.jsx)(n.code,{children:"rootUri"})," field is used to configure Metals for that workspace directory.\nThe working directory for where server is started has no significant meaning."]}),"\n",(0,i.jsx)(n.li,{children:"at this point, Metals uses only full text synchronization. In the future, it\nwill be able to use incremental text synchronization."}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"didChangeWatchedFiles"})," client capability is used to determine whether to\nregister file watchers."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"initializationoptions",children:(0,i.jsx)(n.code,{children:"InitializationOptions"})}),"\n",(0,i.jsxs)(n.p,{children:["During ",(0,i.jsx)(n.code,{children:"initialize"})," we also have the ability to pass in ",(0,i.jsx)(n.code,{children:"InitializationOptions"}),'.\nThis is the primary way to configure Metals. In Metals we have a few different\n"providers". Some are LSP extensions, such as ',(0,i.jsx)(n.code,{children:"metals/inputBox"})," which you read\nabout below, and others used to be server properties that have been migrated to\n",(0,i.jsx)(n.code,{children:"InitializationOptions"}),". M"]}),"\n",(0,i.jsxs)(n.p,{children:["The currently available settings for ",(0,i.jsx)(n.code,{children:"InitializationOptions"})," are listed below."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:' interface InitializationOptions: {\n compilerOptions: {\n completionCommand?: string;\n isCompletionItemDetailEnabled?: boolean;\n isCompletionItemDocumentationEnabled?: boolean;\n isCompletionItemResolve?: boolean;\n isHoverDocumentationEnabled?: boolean;\n isSignatureHelpDocumentationEnabled?: boolean;\n overrideDefFormat?: "ascii" | "unicode";\n parameterHintsCommand?: string;\n snippetAutoIndent?: boolean;\n }\n debuggingProvider?: boolean;\n decorationProvider?: boolean;\n inlineDecorationProvider?: boolean;\n didFocusProvider?: boolean;\n doctorProvider?: "json" | "html";\n executeClientCommandProvider?: boolean;\n globSyntax?: "vscode" | "uri";\n icons?: "vscode" | "octicons" | "atom" | "unicode";\n inputBoxProvider?: boolean;\n isVirtualDocumentSupported?: boolean;\n isExitOnShutdown?: boolean;\n isHttpEnabled?: boolean;\n openFilesOnRenameProvider?: boolean;\n quickPickProvider?: boolean;\n renameFileThreshold?: number;\n slowTaskProvider?: boolean;\n statusBarProvider?: "on" | "off" | "log-message" | "show-message";\n treeViewProvider?: boolean;\n testExplorerProvider?: boolean;\n openNewWindowProvider?: boolean;\n copyWorksheetOutputProvider?: boolean;\n commandInHtmlFormat?: "vscode" | "sublime";\n doctorVisibilityProvider?: boolean;\n }\n'})}),"\n",(0,i.jsxs)(n.p,{children:["You can also always check these in the\n",(0,i.jsx)(n.a,{href:"https://github.com/scalameta/metals/blob/main/metals/src/main/scala/scala/meta/internal/metals/InitializationOptions.scala",children:(0,i.jsx)(n.code,{children:"InitializationOptions.scala"})}),"\nfile where you'll find all of the options and descriptions. Alternatively you can check out the typescript equivalent - ",(0,i.jsx)(n.a,{href:"https://github.com/scalameta/metals-languageclient/blob/main/src/interfaces/MetalsInitializationOptions.ts",children:(0,i.jsx)(n.code,{children:"MetalsInitializationOptions.ts"})})]}),"\n",(0,i.jsx)(n.h5,{id:"compileroptionscompletioncommand",children:(0,i.jsx)(n.code,{children:"compilerOptions.completionCommand"})}),"\n",(0,i.jsxs)(n.p,{children:["An optional string value for a command identifier to trigger completion\n(",(0,i.jsx)(n.code,{children:"textDocument/signatureHelp"}),") in the editor."]}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:'"editor.action.triggerSuggest"'}),": currently used by Visual Studio Code and\ncoc.nvim."]}),"\n",(0,i.jsx)(n.li,{children:"empty: for all other editors."}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"compileroptionsiscompletionitemdetailenabled",children:(0,i.jsx)(n.code,{children:"compilerOptions.isCompletionItemDetailEnabled"})}),"\n",(0,i.jsxs)(n.p,{children:["Boolean value signifying whether or not the ",(0,i.jsx)(n.code,{children:"CompletionItem.detail"})," field should\nbe populated."]}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"true"})]}),"\n",(0,i.jsx)(n.h5,{id:"compileroptionsiscompletionitemdocumentationenabled",children:(0,i.jsx)(n.code,{children:"compilerOptions.isCompletionItemDocumentationEnabled"})}),"\n",(0,i.jsxs)(n.p,{children:["Boolean value signifying whether or not the ",(0,i.jsx)(n.code,{children:"CompletionItem.documentation"})," field\nshould be populated."]}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"true"})]}),"\n",(0,i.jsx)(n.h5,{id:"compileroptionsiscompletionitemresolve",children:(0,i.jsx)(n.code,{children:"compilerOptions.isCompletionItemResolve"})}),"\n",(0,i.jsxs)(n.p,{children:["Boolean value signifying whether the client wants Metals to handle the\n",(0,i.jsx)(n.code,{children:"completionItem/resolve"})," request."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specification#completionItem_resolve",children:"https://microsoft.github.io/language-server-protocol/specification#completionItem_resolve"})}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"true"})]}),"\n",(0,i.jsx)(n.h5,{id:"compileroptionsishoverdocumentationenabled",children:(0,i.jsx)(n.code,{children:"compilerOptions.isHoverDocumentationEnabled"})}),"\n",(0,i.jsxs)(n.p,{children:["Boolean value signifying whether to include docstrings in a ",(0,i.jsx)(n.code,{children:"textDocument/hover"}),"\nrequest."]}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"true"})]}),"\n",(0,i.jsx)(n.h5,{id:"compileroptionsissignaturehelpdocumentationenabled",children:(0,i.jsx)(n.code,{children:"compilerOptions.isSignatureHelpDocumentationEnabled"})}),"\n",(0,i.jsxs)(n.p,{children:["Boolean value signifying whether or not the ",(0,i.jsx)(n.code,{children:"SignatureHelp.documentation"})," field\nshould be populated."]}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"true"})]}),"\n",(0,i.jsx)(n.h5,{id:"compileroptionsoverridedefformat",children:(0,i.jsx)(n.code,{children:"compilerOptions.overrideDefFormat"})}),"\n",(0,i.jsx)(n.p,{children:"Whether or not the presentation compiler overrides should show unicode icon or\njust be in ascii format."}),"\n",(0,i.jsx)(n.p,{children:"Possible Values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:'"ascii"'})," (default)"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"unicode"}),' show the "\ud83d\udd3c" icon in overrides.']}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"compileroptionsparameterhintscommand",children:(0,i.jsx)(n.code,{children:"compilerOptions.parameterHintsCommand"})}),"\n",(0,i.jsxs)(n.p,{children:["An optional string value for a command identifier to trigger parameter hints\n(",(0,i.jsx)(n.code,{children:"textDocument/signatureHelp"}),") in the editor. Metals uses this setting to\npopulate ",(0,i.jsx)(n.code,{children:"CompletionItem.command"})," for completion items that move the cursor\ninside an argument list. For example, when completing ",(0,i.jsx)(n.code,{children:'"".stripSu@@'})," into\n",(0,i.jsx)(n.code,{children:'"".stripSuffix(@@)'}),", Metals will automatically trigger parameter hints if this\nsetting is provided by the editor."]}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:'"editor.action.triggerParameterHints"'}),": Used by Visual Studio Code and\ncoc.nvim."]}),"\n",(0,i.jsx)(n.li,{children:"empty: for all other editors."}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"compileroptionssnippetautoindent",children:(0,i.jsx)(n.code,{children:"compilerOptions.snippetAutoIndent"})}),"\n",(0,i.jsx)(n.p,{children:'Certain editors will automatically insert indentation equal to that of the\nreference line that the operation started on. This is relevant in the case of\nmultiline textEdits such as the "implement all methods" completion.'}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"on"}),": (default): the client automatically adds in the indentation. This is the\ncase for VS Code, Sublime, and coc.nvim."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"off"}),": the client does not add any indentation when receiving a multi-line\ntextEdit"]}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"copyworksheetoutputprovider",children:(0,i.jsx)(n.code,{children:"copyWorksheetOutputProvider"})}),"\n",(0,i.jsx)(n.p,{children:"Boolean value signifying whether or not the client supports running\nCopyWorksheetOutput server command and copying its results into the local\nbuffer."}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"false"})]}),"\n",(0,i.jsx)(n.h5,{id:"debuggingprovider",children:(0,i.jsx)(n.code,{children:"debuggingProvider"})}),"\n",(0,i.jsxs)(n.p,{children:["Boolean value to signify that the client supports the\n",(0,i.jsx)(n.a,{href:"/metals/docs/integrations/debug-adapter-protocol",children:"Debug Adapter Protocol"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"false"})]}),"\n",(0,i.jsx)(n.h5,{id:"decorationprovider",children:(0,i.jsx)(n.code,{children:"decorationProvider"})}),"\n",(0,i.jsxs)(n.p,{children:["Boolean value to signify that the client supports the\n",(0,i.jsx)(n.a,{href:"/metals/docs/integrations/decoration-protocol",children:"Decoration Protocol"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"false"})]}),"\n",(0,i.jsx)(n.h5,{id:"didfocusprovider",children:(0,i.jsx)(n.code,{children:"didFocusProvider"})}),"\n",(0,i.jsxs)(n.p,{children:["Boolean value to signify that the client supports the\n",(0,i.jsx)(n.a,{href:"#metalsdidfocustextdocument",children:(0,i.jsx)(n.code,{children:"metals/didFocusTextDocument"})})," extension."]}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"false"})]}),"\n",(0,i.jsx)(n.h5,{id:"disablecoloroutput",children:(0,i.jsx)(n.code,{children:"disableColorOutput"})}),"\n",(0,i.jsx)(n.p,{children:"Useful for certain DAP clients that are unable to handle color codes for output.\nThis will remove the color codes coming from whatever DAP server is currently\nbeing used."}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"false"})]}),"\n",(0,i.jsx)(n.h5,{id:"doctorprovider",children:(0,i.jsx)(n.code,{children:"doctorProvider"})}),"\n",(0,i.jsx)(n.p,{children:"Format that you'd like Doctor to return information in."}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"html"}),": (default): Metals will return html that can be rendered directly in\nthe browser or web view"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"json"}),": json representation of the information returned by Doctor. See the\njson format ",(0,i.jsx)(n.a,{href:"#run-doctor",children:"here"}),"."]}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"executeclientcommandprovider",children:(0,i.jsx)(n.code,{children:"executeClientCommandProvider"})}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"off"})," (default): the ",(0,i.jsx)(n.code,{children:"metals/executeClientCommand"})," notification is not\nsupported. Client commands can still be handled by enabling\n",(0,i.jsx)(n.code,{children:"-Dmetals.http=on"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"on"}),": the ",(0,i.jsx)(n.code,{children:"metals/executeClientCommand"})," notification is supported and all\n",(0,i.jsx)(n.a,{href:"#metals-client-commands",children:"Metals client commands"})," are handled."]}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"globsyntax",children:(0,i.jsx)(n.code,{children:"globSyntax"})}),"\n",(0,i.jsxs)(n.p,{children:["Controls the glob syntax for registering file watchers on absolute directories.\nRegistration happens via ",(0,i.jsx)(n.code,{children:"client/registerCapability"})," for the\n",(0,i.jsx)(n.a,{href:"#workspacedidchangewatchedfiles",children:(0,i.jsx)(n.code,{children:"workspace/didChangeWatchedFiles"})})," method, if\nthe editor client supports it."]}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"uri"})," (default): URI-encoded file paths, with forward slash ",(0,i.jsx)(n.code,{children:"/"})," for file\nseparators regardless of the operating system. Includes ",(0,i.jsx)(n.code,{children:"file://"})," prefix."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"vscode"}),": use regular Path.toString for the absolute directory parts (",(0,i.jsx)(n.code,{children:"/"})," on\nmacOS+Linux and ",(0,i.jsx)(n.code,{children:"\\"})," on Windows) and forward slashes ",(0,i.jsx)(n.code,{children:"/"})," for relative parts.\nFor example, ",(0,i.jsx)(n.code,{children:"C:\\Users\\IEUser\\workspace\\project/*.{scala,sbt,properties}"}),".\nThis mode is used by the VS Code client."]}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"inlinedecorationprovider",children:(0,i.jsx)(n.code,{children:"inlineDecorationProvider"})}),"\n",(0,i.jsxs)(n.p,{children:["If the client implements the Metals Decoration Protocol ",(0,i.jsx)(n.strong,{children:"and"})," supports\ndecorations to be shown inline and not only at the end of a line."]}),"\n",(0,i.jsxs)(n.p,{children:["Default: ",(0,i.jsx)(n.code,{children:"false"})]}),"\n",(0,i.jsx)(n.h5,{id:"icons",children:(0,i.jsx)(n.code,{children:"icons"})}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"none"})," (default): don't display icons in messages."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"vscode"}),": use ",(0,i.jsx)(n.a,{href:"https://octicons.github.com",children:"Octicons"})," such as ",(0,i.jsx)(n.code,{children:"$(rocket)"})," for\nstatus bar messages, as supported by th\n",(0,i.jsx)(n.a,{href:"https://code.visualstudio.com/docs/extensionAPI/vscode-api#StatusBarItem",children:"VS Code status bar"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"unicode"}),": use unicode emojis like \ud83d\ude80 for status bar messages."]}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"inputboxprovider",children:(0,i.jsx)(n.code,{children:"inputBoxProvider"})}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"off"})," (default): the ",(0,i.jsx)(n.code,{children:"metals/inputBox"})," request is not supported. In this case,\nMetals tries to fall back to ",(0,i.jsx)(n.code,{children:"window/showMessageRequest"})," when possible."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"on"}),": the ",(0,i.jsx)(n.code,{children:"metals/inputBox"})," request is fully supported."]}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"isexitonshutdown",children:(0,i.jsx)(n.code,{children:"isExitOnShutdown"})}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"off"})," (default): run ",(0,i.jsx)(n.code,{children:"System.exit"})," only on the ",(0,i.jsx)(n.code,{children:"exit"})," notification, as\nrequired by the LSP specification."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"on"}),": run ",(0,i.jsx)(n.code,{children:"System.exit"})," after the ",(0,i.jsx)(n.code,{children:"shutdown"})," request, going against the LSP\nspecification. This option is enabled by default for Sublime Text to prevent\nthe Metals process from staying alive after Sublime Text has quit with\n",(0,i.jsx)(n.code,{children:"Cmd+Q"}),". It's not possible for Sublime Text packages to register a callback\nwhen the editor has quit. See\n",(0,i.jsx)(n.a,{href:"https://github.com/tomv564/LSP/issues/410",children:"LSP#410"})," for more details."]}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"ishttpenabled",children:(0,i.jsx)(n.code,{children:"isHttpEnabled"})}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"off"})," (default): don't start a server with the Metals HTTP client."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"on"}),": start a server with the [Metals HTTP client] to interact with the server\nthrough a basic web UI. This option is needed for editor clients that don't\nsupport necessary requests such as ",(0,i.jsx)(n.code,{children:"window/showMessageRequest"}),"."]}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"openfilesonrenameprovider",children:(0,i.jsx)(n.code,{children:"openFilesOnRenameProvider"})}),"\n",(0,i.jsx)(n.p,{children:"Boolean value to signify whether or not the client opens files when doing a\nrename."}),"\n",(0,i.jsxs)(n.p,{children:["Default: ",(0,i.jsx)(n.code,{children:"false"})]}),"\n",(0,i.jsx)(n.h5,{id:"opennewwindowprovider",children:(0,i.jsx)(n.code,{children:"openNewWindowProvider"})}),"\n",(0,i.jsx)(n.p,{children:"Boolean value signifying whether or not the client supports opening up a new\nwindow with the newly created project. Used in conjunction with the New Project\nProvider."}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"false"})]}),"\n",(0,i.jsx)(n.h5,{id:"quickpickprovider",children:(0,i.jsx)(n.code,{children:"quickPickProvider"})}),"\n",(0,i.jsxs)(n.p,{children:["Boolean value to signify whether or not the client implements the\n",(0,i.jsx)(n.a,{href:"#metalsquickpick",children:(0,i.jsx)(n.code,{children:"metals/quickPick"})})," extensions."]}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"false"})]}),"\n",(0,i.jsx)(n.h5,{id:"renamefilethreshold",children:(0,i.jsx)(n.code,{children:"renameFileThreshold"})}),"\n",(0,i.jsxs)(n.p,{children:["The max amount of files that you would like the client to open if the client is\na ",(0,i.jsx)(n.code,{children:"openFilesOnRenameProvider"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"300"})]}),"\n",(0,i.jsx)(n.h5,{id:"slowtaskprovider",children:(0,i.jsx)(n.code,{children:"slowTaskProvider"})}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"off"})," (default): the ",(0,i.jsx)(n.code,{children:"metals/slowTask"})," request is not supported."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"on"}),": the ",(0,i.jsx)(n.code,{children:"metals/slowTask"})," request is fully supported."]}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"statusbarprovider",children:(0,i.jsx)(n.code,{children:"statusBarProvider"})}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"off"})," (default): the ",(0,i.jsx)(n.code,{children:"metals/status"})," notification is not supported."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"on"}),": the ",(0,i.jsx)(n.code,{children:"metals/status"})," notification is supported."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"log-message"}),": translate ",(0,i.jsx)(n.code,{children:"metals/status"})," notifications to ",(0,i.jsx)(n.code,{children:"window/logMessage"}),"\nnotifications."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"show-message"}),": translate ",(0,i.jsx)(n.code,{children:"metals/status"})," notifications to\n",(0,i.jsx)(n.code,{children:"window/showMessage"})," show notifications however the client displays messages\nto the user."]}),"\n"]}),"\n",(0,i.jsx)(n.h5,{id:"treeviewprovider",children:(0,i.jsx)(n.code,{children:"treeViewProvider"})}),"\n",(0,i.jsxs)(n.p,{children:["Boolean value signifying whether or not the client supports the\n",(0,i.jsx)(n.a,{href:"/metals/docs/integrations/tree-view-protocol",children:"Tree View Protocol"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["Default value: ",(0,i.jsx)(n.code,{children:"false"})]}),"\n",(0,i.jsx)(n.h5,{id:"testexplorerprovider",children:(0,i.jsx)(n.code,{children:"testExplorerProvider"})}),"\n",(0,i.jsx)(n.p,{children:"Boolean value to signify whether or not the client implements the Test Explorer."}),"\n",(0,i.jsx)(n.h5,{id:"doctorvisibilityprovider",children:(0,i.jsx)(n.code,{children:"doctorVisibilityProvider"})}),"\n",(0,i.jsxs)(n.p,{children:["Boolean value to signify whether or not the client implements the ",(0,i.jsx)(n.code,{children:'"metals/doctorVisibilityDidChange"'}),".\nThis JSON notification is used to keep track of doctor state. If client implements this provider then Metals server\nwill send updates to the doctor view."]}),"\n",(0,i.jsx)(n.h4,{id:"experimental-capabilities",children:"Experimental Capabilities"}),"\n",(0,i.jsxs)(n.p,{children:["All of the features that used to be set with ",(0,i.jsx)(n.code,{children:"experimental"})," can now all be set\nvia ",(0,i.jsx)(n.code,{children:"InitializationOptions"}),". This is the preferred way to configure Metals."]}),"\n",(0,i.jsx)(n.h3,{id:"initialized",children:(0,i.jsx)(n.code,{children:"initialized"})}),"\n",(0,i.jsxs)(n.p,{children:["Triggers build server initialization and workspace indexing. The ",(0,i.jsx)(n.code,{children:"initialized"}),"\nnotification is critical for any Metals functionality to work."]}),"\n",(0,i.jsx)(n.h3,{id:"shutdown",children:(0,i.jsx)(n.code,{children:"shutdown"})}),"\n",(0,i.jsx)(n.p,{children:"It is very important that the client sends a shutdown request in order for\nMetals to clean up open resources."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["persists incremental compilation analysis files. Without a ",(0,i.jsx)(n.code,{children:"shutdown"})," hook,\nMetals will need to re-compile the entire workspace on next startup."]}),"\n",(0,i.jsxs)(n.li,{children:["stops ongoing processes such as ",(0,i.jsx)(n.code,{children:"sbt bloopInstall"})]}),"\n",(0,i.jsx)(n.li,{children:"closes database connections"}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"exit",children:(0,i.jsx)(n.code,{children:"exit"})}),"\n",(0,i.jsxs)(n.p,{children:["Kills the process using ",(0,i.jsx)(n.code,{children:"System.exit"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"cancelrequest",children:(0,i.jsx)(n.code,{children:"$/cancelRequest"})}),"\n",(0,i.jsxs)(n.p,{children:["Used by ",(0,i.jsx)(n.code,{children:"metals/slowTask"})," to notify when a long-running process has finished."]}),"\n",(0,i.jsx)(n.h3,{id:"clientregistercapability",children:(0,i.jsx)(n.code,{children:"client/registerCapability"})}),"\n",(0,i.jsxs)(n.p,{children:["If the client declares the ",(0,i.jsx)(n.code,{children:"workspace.didChangeWatchedFiles"})," capability during\nthe ",(0,i.jsx)(n.code,{children:"initialize"})," request, then Metals follows up with a\n",(0,i.jsx)(n.code,{children:"client/registerCapability"})," request to register file watchers for certain glob\npatterns."]}),"\n",(0,i.jsx)(n.h3,{id:"textdocumentdidopen",children:(0,i.jsx)(n.code,{children:"textDocument/didOpen"})}),"\n",(0,i.jsxs)(n.p,{children:["Triggers compilation in the build server for the build target containing the\nopened document. Related, see ",(0,i.jsx)(n.code,{children:"metals/didFocusTextDocument"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"textdocumentdidchange",children:(0,i.jsx)(n.code,{children:"textDocument/didChange"})}),"\n",(0,i.jsx)(n.p,{children:"Required to know the text contents of the current unsaved buffer."}),"\n",(0,i.jsx)(n.h3,{id:"textdocumentdidclose",children:(0,i.jsx)(n.code,{children:"textDocument/didClose"})}),"\n",(0,i.jsx)(n.p,{children:"Cleans up resources."}),"\n",(0,i.jsx)(n.h3,{id:"textdocumentdidsave",children:(0,i.jsx)(n.code,{children:"textDocument/didSave"})}),"\n",(0,i.jsx)(n.p,{children:"Triggers compilation in the build server and analyses if the build needs to be\nre-imported."}),"\n",(0,i.jsx)(n.h3,{id:"textdocumentpublishdiagnostics",children:(0,i.jsx)(n.code,{children:"textDocument/publishDiagnostics"})}),"\n",(0,i.jsxs)(n.p,{children:["Metals forwards diagnostics from the build server to the editor client.\nAdditionally, Metals publishes ",(0,i.jsx)(n.code,{children:"Information"})," diagnostics for unexpected\ncompilation errors when navigating external library sources."]}),"\n",(0,i.jsx)(n.h3,{id:"textdocumentdefinition",children:(0,i.jsx)(n.code,{children:"textDocument/definition"})}),"\n",(0,i.jsx)(n.p,{children:"Metals supports goto definition for workspace sources in addition to external\nlibrary sources."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Library sources live under the directory ",(0,i.jsx)(n.code,{children:".metals/readonly"})," and they are\nmarked as read-only to prevent the user from editing them."]}),"\n",(0,i.jsx)(n.li,{children:"The destination location can either be a Scala or Java source file. It is\nrecommended to have a Java language server installed to navigate Java sources."}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"textdocumentreferences",children:(0,i.jsx)(n.code,{children:"textDocument/references"})}),"\n",(0,i.jsx)(n.p,{children:"Metals finds symbol references for workspace sources but not external library\ndependencies."}),"\n",(0,i.jsxs)(n.p,{children:["LSP does not support streaming references so when project sources have not been\ncompiled at the point of a request, Metals returns immediately with potentially\nincomplete results and triggers a background cascade compilation to find new\nsymbol references. If new symbol references are discovered after the background\ncompilation completes, Metals sends a notification via ",(0,i.jsx)(n.code,{children:"metals/status"})," and\n",(0,i.jsx)(n.code,{children:"window/logMessage"}),' asking the user to run "find references" again.']}),"\n",(0,i.jsx)(n.h3,{id:"textdocumentdocumentsymbol",children:(0,i.jsx)(n.code,{children:"textDocument/documentSymbol"})}),"\n",(0,i.jsxs)(n.p,{children:["Returns ",(0,i.jsx)(n.code,{children:"DocumentSymbol[]"})," if the client declares support for hierarchical\ndocument symbol or ",(0,i.jsx)(n.code,{children:"SymbolInformation[]"})," otherwise."]}),"\n",(0,i.jsx)(n.h3,{id:"textdocumentformatting",children:(0,i.jsx)(n.code,{children:"textDocument/formatting"})}),"\n",(0,i.jsxs)(n.p,{children:["Formats the sources with the ",(0,i.jsx)(n.a,{href:"https://scalameta.org/scalafmt/",children:"Scalafmt"})," version\nthat is declared in ",(0,i.jsx)(n.code,{children:".scalafmt.conf"}),"."]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["when ",(0,i.jsx)(n.code,{children:".scalafmt.conf"})," is missing, Metals sends a ",(0,i.jsx)(n.code,{children:"window/showMessageRequest"}),"\nto create the file."]}),"\n",(0,i.jsxs)(n.li,{children:["when ",(0,i.jsx)(n.code,{children:".scalafmt.conf"})," exists but doesn't declare a ",(0,i.jsx)(n.code,{children:"version"})," setting, Metals\nsends a ",(0,i.jsx)(n.code,{children:"metals/inputBox"})," when supported (with fallback to\n",(0,i.jsx)(n.code,{children:"window/showMessageRequest"})," when unsupported) to prepend ",(0,i.jsx)(n.code,{children:"version=$VERSION"})," to\nthe ",(0,i.jsx)(n.code,{children:".scalafmt.conf"})," file."]}),"\n",(0,i.jsxs)(n.li,{children:["the first format request is usually slow because Metals needs to download\nScalafmt artifacts from Maven Central. While the download happens, Metals adds\na message in the status bar via ",(0,i.jsx)(n.code,{children:"metals/status"})," and detailed download progress\ninformation is logged to ",(0,i.jsx)(n.code,{children:".metals/metals.log"}),"."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"textdocumenthover",children:(0,i.jsx)(n.code,{children:"textDocument/hover"})}),"\n",(0,i.jsxs)(n.p,{children:["Returns ",(0,i.jsx)(n.code,{children:"Hover"})," for specified text document and position - ",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#textDocument_hover",children:"lsp spec"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"Metals also support an extended version of this method that supports hover for selection range.\nThe extended stucture of request params is the following:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"interface HoverExtParams {\n textDocument: TextDocumentIdentifier;\n /** Either `position` or `range` should be specified */\n position?: Position;\n range?: Range;\n}\n"})}),"\n",(0,i.jsx)(n.h3,{id:"workspacedidchangewatchedfiles",children:(0,i.jsx)(n.code,{children:"workspace/didChangeWatchedFiles"})}),"\n",(0,i.jsxs)(n.p,{children:["Optional. Metals uses a built-in file watcher for critical functionality such as\nGoto Definition so it is OK if an editor does not send\n",(0,i.jsx)(n.code,{children:"workspace/didChangeWatchedFiles"})," notifications."]}),"\n",(0,i.jsxs)(n.p,{children:["Metals listens to ",(0,i.jsx)(n.code,{children:"workspace/didChangeWatchedFiles"})," notifications from the\neditor for nice-to-have but non-critical file watching events. Metals\nautomatically registers for the following glob patterns if the editor supports\ndynamic registration for file watching."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "watchers": [\n {\n "globPattern": {\n "left": "file:///to/workspace/*.sbt"\n }\n },\n {\n "globPattern": {\n "left": "file:///to/workspace/pom.xml"\n }\n },\n {\n "globPattern": {\n "left": "file:///to/workspace/*.sc"\n }\n },\n {\n "globPattern": {\n "left": "file:///to/workspace/*?.gradle"\n }\n },\n {\n "globPattern": {\n "left": "file:///to/workspace/*.gradle.kts"\n }\n },\n {\n "globPattern": {\n "left": "file:///to/workspace/project/*.{scala,sbt}"\n }\n },\n {\n "globPattern": {\n "left": "file:///to/workspace/project/project/*.{scala,sbt}"\n }\n },\n {\n "globPattern": {\n "left": "file:///to/workspace/project/build.properties"\n }\n },\n {\n "globPattern": {\n "left": "file:///to/workspace/.metals/.reports/bloop/*/*"\n }\n }\n ]\n}\n'})}),"\n",(0,i.jsxs)(n.p,{children:["The editor is responsible for manually watching these file patterns if the\neditor does not support dynamic file watching registration but can still send\n",(0,i.jsx)(n.code,{children:"workspace/didChangeWatchedFiles"})," notifications."]}),"\n",(0,i.jsx)(n.h3,{id:"workspaceexecutecommands",children:(0,i.jsx)(n.code,{children:"workspace/executeCommands"})}),"\n",(0,i.jsxs)(n.p,{children:["Used to trigger a ",(0,i.jsx)(n.a,{href:"#metals-server-commands",children:"Metals server command"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"workspacedidchangeconfiguration",children:(0,i.jsx)(n.code,{children:"workspace/didChangeConfiguration"})}),"\n",(0,i.jsxs)(n.p,{children:["Used to update ",(0,i.jsx)(n.a,{href:"#metals-user-configuration",children:"Metals user configuration"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"windowlogmessage",children:(0,i.jsx)(n.code,{children:"window/logMessage"})}),"\n",(0,i.jsx)(n.p,{children:"Used to log non-critical and non-actionable information. The user is only\nexpected to use the logs for troubleshooting or finding metrics for how long\ncertain events take."}),"\n",(0,i.jsx)(n.h3,{id:"windowshowmessage",children:(0,i.jsx)(n.code,{children:"window/showMessage"})}),"\n",(0,i.jsxs)(n.p,{children:["Used to send critical but non-actionable notifications to the user. For\nnon-critical notifications, see ",(0,i.jsx)(n.code,{children:"metals/status"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"windowshowmessagerequest",children:(0,i.jsx)(n.code,{children:"window/showMessageRequest"})}),"\n",(0,i.jsxs)(n.p,{children:["Used to send critical and actionable notifications to the user. To notify the\nuser about long running tasks that can be cancelled, the extension\n",(0,i.jsx)(n.code,{children:"metals/slowTask"})," is used instead."]}),"\n",(0,i.jsx)(n.h2,{id:"metals-server-properties",children:"Metals server properties"}),"\n",(0,i.jsx)(n.p,{children:"There are various Metals server properties that can be configured through JVM\nsystem properties. A system property is passed to the server like this:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"# with `java` binary\njava -Dmetals.statistics=all ...\n# with `coursier bootstrap`\ncoursier bootstrap --java-opt -Dmetals.statistics=all ...\n"})}),"\n",(0,i.jsx)(n.p,{children:"Below are the available server properties:"}),"\n",(0,i.jsx)(n.h3,{id:"-dmetalsverbose",children:(0,i.jsx)(n.code,{children:"-Dmetals.verbose"})}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"off"})," (default): don't log unnecessary details."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"on"}),": emit very detailed logs, should only be used when debugging problems."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"-dmetalsstatistics",children:(0,i.jsx)(n.code,{children:"-Dmetals.statistics"})}),"\n",(0,i.jsx)(n.p,{children:"By default, Metals logs only the most relevant metrics like time it takes to run\nsbt and import a workspace. To enable further metrics, update this property\nwith a comma separated list of the following supported values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"memory"}),": print memory usage of the navigation index after build import."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"definition"}),": print total time to respond to ",(0,i.jsx)(n.code,{children:"textDocument/definition"}),"\nrequests."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Set the value to ",(0,i.jsx)(n.code,{children:"-Dmetals.statistics=all"})," to enable all statistics."]}),"\n",(0,i.jsx)(n.h3,{id:"-dmetalsh2auto-server",children:(0,i.jsx)(n.code,{children:"-Dmetals.h2.auto-server"})}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"on"})," (default): use\n",(0,i.jsxs)(n.a,{href:"http://www.h2database.com/html/features.html#auto_mixed_mode",children:["H2 ",(0,i.jsx)(n.code,{children:"AUTO_SERVER=TRUE"})," mode"]}),"\nto support multiple concurrent Metals servers in the same workspace. If this\noption is enabled, the Metals H2 database communicate to other concurrently\nrunning Metals servers via TCP through a free port. In case of failure to\nestablish a ",(0,i.jsx)(n.code,{children:"AUTO_SERVER=TRUE"})," connection, Metals falls back to\n",(0,i.jsx)(n.code,{children:"AUTO_SERVER=FALSE"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"off"}),": do not use ",(0,i.jsx)(n.code,{children:"AUTO_SERVER=TRUE"}),". By disabling this option, it's not\npossible to run concurrent Metals servers in the same workspace directory. For\nexample, it's not possible to have both VS Code and Vim installed with Metals\nrunning in the same directory. In case there are multiple Metals servers\nrunning in the same workspace directory, Metals falls back to using an\nin-memory database resulting in a degraded user experience."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"-dmetalspcdebug",children:(0,i.jsx)(n.code,{children:"-Dmetals.pc.debug"})}),"\n",(0,i.jsx)(n.p,{children:"Possible values:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"off"})," (default): do not log verbose debugging information for the presentation\ncompiler."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"on"}),": log verbose debugging information for the presentation compiler."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"-dbloopsbtversion",children:(0,i.jsx)(n.code,{children:"-Dbloop.sbt.version"})}),"\n",(0,i.jsxs)(n.p,{children:['Version number of the sbt-bloop plugin to use for the "Install build" command.\nDefault value is ',(0,i.jsx)(n.code,{children:"-Dbloop.sbt.version=1.5.13"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"The below properties are also available as user configuration options. It's\npreferable to set these there:"}),"\n",(0,i.jsx)(n.h3,{id:"-dmetalsbloop-port",children:(0,i.jsx)(n.code,{children:"-Dmetals.bloop-port"})}),"\n",(0,i.jsxs)(n.p,{children:["Port number of the Bloop server to connect to. Should only be used if Bloop\nserver was set up in a custom way. Default value is ",(0,i.jsx)(n.code,{children:"8212"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"Possible values are any allowed port number that the Bloop server is able to run\non."}),"\n",(0,i.jsx)(n.h2,{id:"metals-user-configuration",children:"Metals user configuration"}),"\n",(0,i.jsxs)(n.p,{children:["Users can customize the Metals server through the LSP\n",(0,i.jsx)(n.code,{children:"workspace/didChangeConfiguration"})," notification. Unlike server properties, it is\nnormal for regular Metals users to configure these options."]}),"\n",(0,i.jsxs)(n.p,{children:["User configuration options can optionally be provided via server properties\nusing the ",(0,i.jsx)(n.code,{children:"-Dmetals."})," prefix. System properties may be helpful for editor\nclients that don't support ",(0,i.jsx)(n.code,{children:"workspace/didChangeConfiguration"}),". In case user\nconfiguration is defined both via system properties and\n",(0,i.jsx)(n.code,{children:"workspace/didChangeConfiguration"}),", then ",(0,i.jsx)(n.code,{children:"workspace/didChangeConfiguration"}),"\ntakes precedence."]}),"\n",(0,i.jsx)(n.h3,{id:"java-home-directory",children:"Java Home directory"}),"\n",(0,i.jsxs)(n.p,{children:["The Java Home directory used for indexing JDK sources and locating the ",(0,i.jsx)(n.code,{children:"java"})," binary."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": ",(0,i.jsx)(n.code,{children:"JAVA_HOME"})," environment variable with fallback to ",(0,i.jsx)(n.code,{children:"user.home"})," system property."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "javaHome": "/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"sbt-script",children:"sbt script"}),"\n",(0,i.jsxs)(n.p,{children:["Optional absolute path to an ",(0,i.jsx)(n.code,{children:"sbt"})," executable to use for running ",(0,i.jsx)(n.code,{children:"sbt bloopInstall"}),".\nBy default, Metals uses ",(0,i.jsx)(n.code,{children:"java -jar sbt-launch.jar"})," with an embedded launcher while respecting\n",(0,i.jsx)(n.code,{children:".jvmopts"})," and ",(0,i.jsx)(n.code,{children:".sbtopts"}),". Update this setting if your ",(0,i.jsx)(n.code,{children:"sbt"})," script requires more customizations\nlike using environment variables."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": empty string ",(0,i.jsx)(n.code,{children:'""'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "sbtScript": "/usr/local/bin/sbt"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"gradle-script",children:"Gradle script"}),"\n",(0,i.jsxs)(n.p,{children:["Optional absolute path to a ",(0,i.jsx)(n.code,{children:"gradle"})," executable to use for running ",(0,i.jsx)(n.code,{children:"gradle bloopInstall"}),".\nBy default, Metals uses gradlew with 7.5.0 gradle version. Update this setting if your ",(0,i.jsx)(n.code,{children:"gradle"})," script requires more customizations\nlike using environment variables."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": empty string ",(0,i.jsx)(n.code,{children:'""'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "gradleScript": "/usr/local/bin/gradle"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"maven-script",children:"Maven script"}),"\n",(0,i.jsxs)(n.p,{children:["Optional absolute path to a ",(0,i.jsx)(n.code,{children:"maven"})," executable to use for generating bloop config.\nBy default, Metals uses mvnw maven wrapper with 3.6.1 maven version. Update this setting if your ",(0,i.jsx)(n.code,{children:"maven"})," script requires more customizations"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": empty string ",(0,i.jsx)(n.code,{children:'""'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "mavenScript": "/usr/local/bin/mvn"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"mill-script",children:"Mill script"}),"\n",(0,i.jsxs)(n.p,{children:["Optional absolute path to a ",(0,i.jsx)(n.code,{children:"mill"})," executable to use for running ",(0,i.jsx)(n.code,{children:"mill mill.contrib.bloop.Bloop/install"}),".\nBy default, Metals uses mill wrapper script with 0.5.0 mill version. Update this setting if your ",(0,i.jsx)(n.code,{children:"mill"})," script requires more customizations\nlike using environment variables."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": empty string ",(0,i.jsx)(n.code,{children:'""'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "millScript": "/usr/local/bin/mill"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"scalafmt-config-path",children:"Scalafmt config path"}),"\n",(0,i.jsxs)(n.p,{children:["Optional custom path to the .scalafmt.conf file.\nIt should be a path (relative or absolute - though an absolute path is recommended) and use\nforward slashes ",(0,i.jsx)(n.code,{children:"/"})," for file separators (even on Windows)."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": empty string ",(0,i.jsx)(n.code,{children:'""'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "scalafmtConfigPath": "project/.scalafmt.conf"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"scalafix-config-path",children:"Scalafix config path"}),"\n",(0,i.jsxs)(n.p,{children:["Optional custom path to the .scalafix.conf file.\nIt should be a path (relative or absolute - though an absolute path is recommended) and use\nforward slashes ",(0,i.jsx)(n.code,{children:"/"})," for file separators (even on Windows)."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": empty string ",(0,i.jsx)(n.code,{children:'""'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "scalafixConfigPath": "project/.scalafix.conf"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"ammonite-jvm-properties",children:"Ammonite JVM Properties"}),"\n",(0,i.jsxs)(n.p,{children:["Optional list of JVM properties to pass along to the Ammonite server.\nEach property needs to be a separate item.\\n\\nExample: ",(0,i.jsx)(n.code,{children:"-Xmx1G"})," or ",(0,i.jsx)(n.code,{children:"-Xms100M"}),'"']}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": ",(0,i.jsx)(n.code,{children:"[]"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "ammoniteJvmProperties": ["-Xmx1G"]\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"excluded-packages",children:"Excluded Packages"}),"\n",(0,i.jsx)(n.p,{children:"Packages that will be excluded from completions, imports, and symbol searches."}),"\n",(0,i.jsx)(n.p,{children:"Note that this is in addition to some default packages that are already excluded.\nThe default excluded packages are listed below:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:"META-INF\nimages\ntoolbarButtonGraphics\njdk\nsun\noracle\njava.awt.desktop\norg.jcp\norg.omg\norg.graalvm\ncom.oracle\ncom.sun\ncom.apple\napple\ncom.sourcegraph.shaded\n"})}),"\n",(0,i.jsxs)(n.p,{children:["If there is a need to remove one of the defaults, you are able to do so by including the\npackage in your list and prepending ",(0,i.jsx)(n.code,{children:"--"})," to it."]}),"\n",(0,i.jsx)(n.p,{children:"Example:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:'["--sun"]\n'})}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": ",(0,i.jsx)(n.code,{children:"[]"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "excludedPackages": ["akka.actor.typed.javadsl"]\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"dont-generate-bloop-plugin-file-for-sbt",children:"Don't generate Bloop plugin file for sbt"}),"\n",(0,i.jsxs)(n.p,{children:["If true, Metals will not generate ",(0,i.jsx)(n.code,{children:"metals.sbt"})," files under the assumption that sbt-bloop is already manually installed in the sbt build. Build import will fail with a 'not valid command bloopInstall' error in case Bloop is not manually installed in the build when using this option."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": false"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "bloopSbtAlreadyInstalled": false\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"version-of-bloop",children:"Version of Bloop"}),"\n",(0,i.jsx)(n.p,{children:"This version will be used for the Bloop build tool plugin, for any supported build tool,\nwhile importing in Metals as well as for running the embedded server"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": 1.5.13"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "bloopVersion": "1.4.0-RC1"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"bloop-jvm-properties",children:"Bloop JVM Properties"}),"\n",(0,i.jsxs)(n.p,{children:["Optional list of JVM properties to pass along to the Bloop server.\nPlease follow this guide for the format ",(0,i.jsx)(n.a,{href:"https://scalacenter.github.io/bloop/docs/server-reference#global-settings-for-the-server",children:"https://scalacenter.github.io/bloop/docs/server-reference#global-settings-for-the-server"}),'"']}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),': ["-Xmx1G"].']}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "bloopJvmProperties": ["-Xmx1G"]\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"should-display-lenses-with-links-to-super-methods",children:"Should display lenses with links to super methods"}),"\n",(0,i.jsx)(n.p,{children:"Super method lenses are visible above methods definition that override another methods. Clicking on a lens jumps to super method definition.\nDisabled lenses are not calculated for opened documents which might speed up document processing."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": false"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "superMethodLensesEnabled": false\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"should-display-type-annotations-for-inferred-types",children:"Should display type annotations for inferred types"}),"\n",(0,i.jsx)(n.p,{children:"When this option is enabled, each method that can have inferred types has them\ndisplayed either as additional decorations if they are supported by the editor or\nshown in the hover."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": false"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "showInferredType": false\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"should-display-implicit-parameter-at-usage-sites",children:"Should display implicit parameter at usage sites"}),"\n",(0,i.jsx)(n.p,{children:"When this option is enabled, each method that has implicit arguments has them\ndisplayed either as additional decorations if they are supported by the editor or\nshown in the hover."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": false"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "showImplicitArguments": false\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"should-display-implicit-conversion-at-usage-sites",children:"Should display implicit conversion at usage sites"}),"\n",(0,i.jsx)(n.p,{children:"When this option is enabled, each place where an implicit method or class is used has it\ndisplayed either as additional decorations if they are supported by the editor or\nshown in the hover."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": false"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "showImplicitConversionsAndClasses": false\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"use-semantic-tokens-highlight",children:"Use semantic tokens highlight"}),"\n",(0,i.jsx)(n.p,{children:"When this option is enabled, Metals will provide semantic tokens for clients that support it.\nThe feature should work within all supported files extensions aside from Java."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": true"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "enableSemanticHighlighting": false\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"indent-snippets-when-pasted",children:"Indent snippets when pasted."}),"\n",(0,i.jsx)(n.p,{children:"When this option is enabled, when a snippet is pasted into a Scala file, Metals will\ntry to adjust the indentation to that of the current cursor."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": false"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "enableIndentOnPaste": false\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"remote-language-server",children:"Remote language server"}),"\n",(0,i.jsx)(n.p,{children:"A URL pointing to an endpoint that implements a remote language server."}),"\n",(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"https://scalameta.org/metals/docs/integrations/remote-language-server",children:"https://scalameta.org/metals/docs/integrations/remote-language-server"})," for\ndocumentation on remote language servers."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": empty string ",(0,i.jsx)(n.code,{children:'""'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "remoteLanguageServer": "https://language-server.company.com/message"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"default-fallback-scala-version",children:"Default fallback Scala version"}),"\n",(0,i.jsx)(n.p,{children:"The Scala compiler version that is used as the default or fallback in case a file\ndoesn't belong to any build target or the specified Scala version isn't supported by Metals.\nThis applies to standalone Scala files, worksheets, and Ammonite scripts."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": 3.3.1"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "fallbackScalaVersion": 3.3.1\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"test-ui-used-for-tests-and-test-suites",children:"Test UI used for tests and test suites"}),"\n",(0,i.jsxs)(n.p,{children:['Default way of handling tests and test suites. The only valid values are\n"code lenses" and "test explorer". See ',(0,i.jsx)(n.a,{href:"https://scalameta.org/metals/docs/integrations/test-explorer",children:"https://scalameta.org/metals/docs/integrations/test-explorer"}),"\nfor information on how to work with the test explorer."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": Code Lenses"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "testUserInterface": test explorer\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"eclipse-java-formatter-config-path",children:"Eclipse Java formatter config path"}),"\n",(0,i.jsxs)(n.p,{children:["Optional custom path to the eclipse-formatter.xml file.\nIt should be a path (relative or absolute - though an absolute path is recommended) and use\nforward slashes ",(0,i.jsx)(n.code,{children:"/"})," for file separators (even on Windows)."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": empty string ",(0,i.jsx)(n.code,{children:'""'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "javaFormat.eclipseConfigPath": "formatters/eclipse-formatter.xml"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"eclipse-java-formatting-profile",children:"Eclipse Java formatting profile"}),"\n",(0,i.jsx)(n.p,{children:"If the Eclipse formatter file contains more than one profile, this option can be used to control which is used."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": empty string ",(0,i.jsx)(n.code,{children:'""'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "javaFormat.eclipseProfile": "GoogleStyle"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"scala-cli-launcher",children:"Scala CLI launcher"}),"\n",(0,i.jsxs)(n.p,{children:["Optional absolute path to a ",(0,i.jsx)(n.code,{children:"scala-cli"})," executable to use for running a Scala CLI BSP server.\nBy default, Metals uses the scala-cli from the PATH, or it's not found, downloads and runs Scala\nCLI on the JVM (slower than native Scala CLI). Update this if you want to use a custom Scala CLI\nlauncher, not available in PATH."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": empty string ",(0,i.jsx)(n.code,{children:'""'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "scalaCliLauncher": "/usr/local/bin/scala-cli"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"custom-project-root",children:"Custom project root"}),"\n",(0,i.jsx)(n.p,{children:'Optional relative path to your project\'s root.\nIf you want your project root to be the workspace/workspace root set it to "." .'}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": empty string ",(0,i.jsx)(n.code,{children:'""'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "customProjectRoot": "backend/scalaProject/"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h3,{id:"show-all-compilation-debugging-information",children:"Show all compilation debugging information"}),"\n",(0,i.jsx)(n.p,{children:"If a build server supports it (for example Bloop or Scala CLI), setting it to true\nwill make the logs contain all the possible debugging information including\nabout incremental compilation in Zinc."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Default"}),": false"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "metals": {\n "verboseCompilation": true\n }\n}\n'})}),"\n",(0,i.jsx)(n.h2,{id:"metals-server-commands",children:"Metals server commands"}),"\n",(0,i.jsxs)(n.p,{children:["The client can trigger one of the following commands through the\n",(0,i.jsx)(n.code,{children:"workspace/executeCommand"})," request."]}),"\n",(0,i.jsx)(n.h3,{id:"analyze-stacktrace",children:"Analyze stacktrace"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"analyze-stacktrace"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": [string], where the string is a stacktrace."]}),"\n",(0,i.jsx)(n.p,{children:"Converts provided stacktrace in the parameter to a format that contains links\nto locations of places where the exception was raised."}),"\n",(0,i.jsxs)(n.p,{children:["If the configuration parameter of the client ",(0,i.jsx)(n.code,{children:"commandInHtmlFormat"})," is set\nthen client is requested to display html with links\nalready pointing to proper locations in user codebase.\nOtherwise client will display simple scala file\nbut with code lenses that direct user to proper location in codebase."]}),"\n",(0,i.jsx)(n.h3,{id:"switch-build-server",children:"Switch build server"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"bsp-switch"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Prompt the user to select a new build server to connect to."}),"\n",(0,i.jsx)(n.p,{children:"This command does nothing in case there are less than two installed build\nservers on the computer. In case the user has multiple BSP servers installed\nthen Metals will prompt the user to select which server to use."}),"\n",(0,i.jsx)(n.h3,{id:"connect-to-build-server",children:"Connect to build server"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"build-connect"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Establish a new connection to the build server and reindex the workspace."}),"\n",(0,i.jsx)(n.p,{children:"This command can be helpful in scenarios when Metals feels unresponsive, for example\nwhen reopening Metals after the computer it has been sleeping."}),"\n",(0,i.jsx)(n.h3,{id:"cancel-compilation",children:"Cancel compilation"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"compile-cancel"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Cancel the currently ongoing compilation, if any."}),"\n",(0,i.jsx)(n.h3,{id:"cascade-compile",children:"Cascade compile"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"compile-cascade"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Compile the current open files along with all build targets in this workspace that depend on those files."}),"\n",(0,i.jsx)(n.p,{children:"By default, Metals compiles only the current build target and its dependencies when saving a file.\nRun the cascade compile task to additionally compile the inverse dependencies of the current build target.\nFor example, if you change the API in main sources and run cascade compile then it will also compile the\ntest sources that depend on main."}),"\n",(0,i.jsx)(n.h3,{id:"clean-compile",children:"Clean compile"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"compile-clean"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Recompile all build targets in this workspace."}),"\n",(0,i.jsx)(n.p,{children:"By default, Metals compiles the files incrementally. In case of any compile artifacts corruption\nthis command might be run to make sure everything is recompiled correctly."}),"\n",(0,i.jsx)(n.h3,{id:"convert-positional-arguments-to-named-ones",children:"Convert positional arguments to named ones"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"convert-to-named-arguments"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": Object with ",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentPositionParams",children:"TextDocumentPositionParams"})," of the target Apply and ",(0,i.jsx)(n.code,{children:"numUnnamedArgs"})," (int)"]}),"\n",(0,i.jsx)(n.p,{children:"Whenever a user chooses code action to convert to named arguments, this command is later run to\ndetermine the parameter names of all unnamed arguments and insert names at the correct locations."}),"\n",(0,i.jsx)(n.h3,{id:"copy-worksheet-output",children:"Copy Worksheet Output"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"copy-worksheet-output"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": [uri], the uri of the worksheet that you'd like to copy the contents of."]}),"\n",(0,i.jsx)(n.p,{children:"Copy the contents of a worksheet to your local buffer."}),"\n",(0,i.jsx)(n.p,{children:"Note: This command returns the contents of the worksheet, and the LSP client\nis in charge of taking that content and putting it into your local buffer."}),"\n",(0,i.jsx)(n.h3,{id:"discover-main-classes-to-run-and-return-the-object",children:"Discover main classes to run and return the object"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"discover-jvm-run-command"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": DebugUnresolvedTestClassParams object\nExample:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "path": "path/to/file.scala",\n "runType": "run"\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"Response:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "targets": ["id1"],\n "dataKind": "scala-main-class",\n "data": {\n "class": "Foo",\n "arguments": [],\n "jvmOptions": [],\n "environmentVariables": [],\n "shellCommand": "java ..."\n }\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"Gets the DebugSession object that also contains a command to run in shell based\non JVM environment including classpath, jvmOptions and environment parameters."}),"\n",(0,i.jsx)(n.h3,{id:"discover-tests",children:"Discover tests"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"discover-tests"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":\nAn object with uri, when request is meant to discover test cases for uri"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:"{\n uri: file:///home/dev/foo/Bar.scala\n}\n"})}),"\n",(0,i.jsx)(n.p,{children:"or empty object if request is meant to discover all test suites"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:"{}\n"})}),"\n",(0,i.jsx)(n.p,{children:"Discovers all tests in project or a file.\nSee ClientCommands.UpdateTestExplorer to see how response looks like."}),"\n",(0,i.jsx)(n.h3,{id:"extract-member-definition",children:"Extract member definition"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"extract-member-definition"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": This command should be sent in with the LSP ",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocumentPositionParams",children:(0,i.jsx)(n.code,{children:"TextDocumentPositionParams"})})]}),"\n",(0,i.jsx)(n.p,{children:"Whenever a user chooses a code action to extract a definition of a Class/Trait/Object/Enum this\ncommand is later ran to extract the code and create a new file with it"}),"\n",(0,i.jsx)(n.h3,{id:"generate-bsp-config",children:"Generate BSP Config"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"generate-bsp-config"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": [string], name of the build server."]}),"\n",(0,i.jsx)(n.p,{children:"Checks to see if your build tool can serve as a BSP server. If so, generate\nthe necessary BSP config to connect to the server. If there is more than one\nbuild tool for a workspace, you can then choose the desired one and that\none will be used to generate the config."}),"\n",(0,i.jsx)(n.p,{children:"After the config is generated, Metals will attempt to auto-connect to it."}),"\n",(0,i.jsx)(n.p,{children:"The build servers that Metals knows how to detect and start:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"sbt"}),"\n",(0,i.jsx)(n.li,{children:"mill-bsp"}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Note: while Metals does know how to start Bloop, Bloop will be started when you trigger a build\nimport or when you use ",(0,i.jsx)(n.code,{children:"bsp-switch"})," to switch to Bloop."]}),"\n",(0,i.jsx)(n.h3,{id:"goto-location-for-position",children:"Goto location for position"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"goto-position"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": [location], where the location is a lsp location object."]}),"\n",(0,i.jsx)(n.p,{children:"Move the cursor to the location provided in arguments.\nIt simply forwards request to client."}),"\n",(0,i.jsx)(n.h3,{id:"go-to-super-methodfield-definition",children:"Go to super method/field definition"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"goto-super-method"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": This command should be sent in with the LSP ",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocumentPositionParams",children:(0,i.jsx)(n.code,{children:"TextDocumentPositionParams"})})]}),"\n",(0,i.jsxs)(n.p,{children:["Jumps to super method/field definition of a symbol under cursor according to inheritance rules.\nWhen ",(0,i.jsx)(n.code,{children:"A {override def x()} <:< B <:< C {def x()}"})," and on method 'A.x' it will jump directly to 'C.x'\nas method x() is not overridden in B.\nIf symbol is a reference of a method it will jump to a definition.\nIf symbol under cursor is invalid or does not override anything then command is ignored."]}),"\n",(0,i.jsx)(n.h3,{id:"goto-location-for-symbol",children:"Goto location for symbol"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"goto"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": [string], where the string is a SemanticDB symbol."]}),"\n",(0,i.jsx)(n.p,{children:"Move the cursor to the definition of the argument symbol."}),"\n",(0,i.jsx)(n.h3,{id:"import-build",children:"Import build"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"build-import"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Import the latest changes from the build to for example pick up new library dependencies."}),"\n",(0,i.jsx)(n.p,{children:"By default, Metals automatically prompts you to import the build when sources of the build change.\nUse this command to manually trigger an import build instead of relying on the automatic prompt."}),"\n",(0,i.jsx)(n.h3,{id:"insert-inferred-type-of-a-value",children:"Insert inferred type of a value"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"insert-inferred-type"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": This command should be sent in with the LSP ",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocumentPositionParams",children:(0,i.jsx)(n.code,{children:"TextDocumentPositionParams"})})]}),"\n",(0,i.jsx)(n.p,{children:"Whenever a user chooses code action to insert the inferred type this command is later ran to\ncalculate the type and insert it in the correct location."}),"\n",(0,i.jsx)(n.h3,{id:"inline-value",children:"Inline value"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"inline-value"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": This command should be sent in with the LSP ",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocumentPositionParams",children:(0,i.jsx)(n.code,{children:"TextDocumentPositionParams"})})]}),"\n",(0,i.jsx)(n.p,{children:"Whenever a user chooses code action to inline a value this command is later ran to\nfind all the references to choose the correct inline version (if possible to perform)"}),"\n",(0,i.jsx)(n.h3,{id:"create-new-scala-file",children:"Create new scala file"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"new-scala-file"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": [string[]], where the first is a directory location for the new file.\nThe second and third positions correspond to the file name and file type to allow for quick\ncreation of a file if all are present."]}),"\n",(0,i.jsx)(n.p,{children:"Create and open new Scala file."}),"\n",(0,i.jsx)(n.p,{children:"The currently allowed Scala file types that can be passed in are:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"scala-file (Empty file)"}),"\n",(0,i.jsx)(n.li,{children:"scala-class (Class)"}),"\n",(0,i.jsx)(n.li,{children:"scala-case-class (Case Class)"}),"\n",(0,i.jsx)(n.li,{children:"scala-enum (Enum)"}),"\n",(0,i.jsx)(n.li,{children:"scala-object (Object)"}),"\n",(0,i.jsx)(n.li,{children:"scala-trait (Trait)"}),"\n",(0,i.jsx)(n.li,{children:"scala-package-object (Package Object)"}),"\n",(0,i.jsx)(n.li,{children:"scala-worksheet (Worksheet)"}),"\n",(0,i.jsx)(n.li,{children:"scala-script (Scala Script(Ammonite or Scala CLI))"}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Note: requires 'metals/inputBox' capability from language client."}),"\n",(0,i.jsx)(n.h3,{id:"create-new-java-file",children:"Create new java file"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"new-java-file"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": [string[]], where the first is a directory location for the new file.\nThe second and third positions correspond to the file name and file type to allow for quick\ncreation of a file if all are present."]}),"\n",(0,i.jsx)(n.p,{children:"Create and open a new Java file."}),"\n",(0,i.jsx)(n.p,{children:"The currently allowed Java file types that ca be passed in are:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"java-class (Class)"}),"\n",(0,i.jsx)(n.li,{children:"java-interface (Interface)"}),"\n",(0,i.jsx)(n.li,{children:"java-enum (Enum)"}),"\n",(0,i.jsx)(n.li,{children:"java-record (Record)"}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Note: requires 'metals/inputBox' capability from language client."}),"\n",(0,i.jsx)(n.h3,{id:"new-scala-project",children:"New Scala Project"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"new-scala-project"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsxs)(n.p,{children:["Create a new Scala project using one of the available g8 templates.\nThis includes simple projects as well as samples for most of the popular Scala frameworks.\nThe command reuses the Metals quick pick extension to work and can function with ",(0,i.jsx)(n.code,{children:"window/showMessageRequest"}),",\nhowever the experience will not be optimal in that case. Some editors might also offer to open the newly created\nproject via ",(0,i.jsx)(n.code,{children:"openNewWindowProvider"}),", but it is not necessary for the main functionality to work."]}),"\n",(0,i.jsx)(n.h3,{id:"restart-presentation-compiler",children:"Restart presentation compiler"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"presentation-compiler-restart"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Restart running presentation compiler instances."}),"\n",(0,i.jsx)(n.p,{children:"Metals automatically restarts the presentation compiler after every successful compilation\nin the build tool so this command should not be needed for normal usage. Please report\nan issue if you need to use this command."}),"\n",(0,i.jsx)(n.h3,{id:"reset-choice-popup",children:"Reset Choice Popup"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"reset-choice"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": [string?], where string is a choice value."]}),"\n",(0,i.jsx)(n.p,{children:"ResetChoicePopup command allows you to reset a decision you made about different settings.\nE.g. If you choose to import workspace with sbt you can decide to reset and change it again."}),"\n",(0,i.jsxs)(n.p,{children:["Provided string is optional but if present it must be one of defined in ",(0,i.jsx)(n.code,{children:"PopupChoiceReset.scala"}),"\nIf a choice is not provided it will execute interactive mode where user is prompt to select\nwhich choice to reset."]}),"\n",(0,i.jsx)(n.h3,{id:"reset-notifications",children:"Reset notifications"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"reset-notifications"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"ResetNotifications command allows you to reset all the dismissed notifications.\nE.g. If you choose to dismiss build import forever, this command will make the notification show up again."}),"\n",(0,i.jsx)(n.h3,{id:"extract-method-from-range",children:"Extract method from range"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"extract-method"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": LSP [",(0,i.jsx)(n.code,{children:"TextDocumentIdentifier"}),"], (",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentIdentifier",children:"https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentIdentifier"}),"),\nLSP [",(0,i.jsx)(n.code,{children:"Range"}),"], range of the code you'd like to extract as method,\nLSP [",(0,i.jsx)(n.code,{children:"Position"}),"], position where the definition of extracted method will be created."]}),"\n",(0,i.jsx)(n.p,{children:"Whenever a user chooses code action to extract method, this command is later ran to\ncalculate parameters for the newly created method and create its definition."}),"\n",(0,i.jsx)(n.h3,{id:"restart-build-server",children:"Restart build server"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"build-restart"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Unconditionally stop the current running Bloop server and start a new one using Bloop launcher"}),"\n",(0,i.jsx)(n.h3,{id:"run-doctor",children:"Run doctor"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"doctor-run"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Open the Metals doctor to troubleshoot potential problems with the build."}),"\n",(0,i.jsx)(n.p,{children:"This command can be helpful in scenarios where features are not working as expected such\nas compile errors are not appearing or completions are not correct."}),"\n",(0,i.jsx)(n.h3,{id:"run-all-scalafix-rules",children:"Run all Scalafix Rules"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"scalafix-run"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": This command should be sent in with the LSP ",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocumentPositionParams",children:(0,i.jsx)(n.code,{children:"TextDocumentPositionParams"})})]}),"\n",(0,i.jsx)(n.p,{children:"Run all the supported scalafix rules in your codebase."}),"\n",(0,i.jsxs)(n.p,{children:["If the rules are missing please add them to user configuration ",(0,i.jsx)(n.code,{children:"metals.scalafixRulesDependencies"}),".\nTheir format is the coursier one ",(0,i.jsx)(n.a,{href:"https://get-coursier.io/",children:"https://get-coursier.io/"})]}),"\n",(0,i.jsx)(n.h3,{id:"run-a-set-of-scalafix-rules",children:"Run a set of Scalafix Rules"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"scalafix-run-only"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": RunScalafixRulesParams object\nExample:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "textDocumentPositionParams": {\n "textDocument": {\n "uri": "path/to/file.scala"\n },\n "position": {\n "line": 70,\n "character": 33\n }\n },\n "rules": ["ExplicitResultTypes"]\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"Run a set of Scalafix rules in your codebase."}),"\n",(0,i.jsx)(n.p,{children:"If no rules are specified, this command will prompt the user to select one from a list\nof their project's enabled rules."}),"\n",(0,i.jsxs)(n.p,{children:["If you want to run all rules, use the ",(0,i.jsx)(n.code,{children:"scalafix-run"})," command instead."]}),"\n",(0,i.jsx)(n.h3,{id:"decode-file",children:"Decode file"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"file-decode"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": [uri], uri of the file with any parameters required for decoding.\nExamples:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["javap:","\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"metalsDecode:file:///somePath/someFile.java.javap\nmetalsDecode:file:///somePath/someFile.scala.javap\nmetalsDecode:file:///somePath/someFile.class.javap\nmetalsDecode:file:///somePath/someFile.java.javap-verbose\nmetalsDecode:file:///somePath/someFile.scala.javap-verbose\nmetalsDecode:file:///somePath/someFile.class.javap-verbose\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["semanticdb:","\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"metalsDecode:file:///somePath/someFile.java.semanticdb-compact\nmetalsDecode:file:///somePath/someFile.java.semanticdb-detailed\nmetalsDecode:file:///somePath/someFile.scala.semanticdb-compact\nmetalsDecode:file:///somePath/someFile.scala.semanticdb-detailed\nmetalsDecode:file:///somePath/someFile.java.semanticdb.semanticdb-compact\nmetalsDecode:file:///somePath/someFile.java.semanticdb.semanticdb-detailed\nmetalsDecode:file:///somePath/someFile.scala.semanticdb.semanticdb-compact\nmetalsDecode:file:///somePath/someFile.scala.semanticdb.semanticdb-detailed\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["tasty:","\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"metalsDecode:file:///somePath/someFile.scala.tasty-decoded\nmetalsDecode:file:///somePath/someFile.tasty.tasty-decoded\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["jar:","\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"metalsDecode:jar:file:///somePath/someFile-sources.jar!/somePackage/someFile.java\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["build target:","\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"metalsDecode:file:///workspacePath/buildTargetName.metals-buildtarget\n"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Response:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"interface DecoderResponse {\n requestedUri: string;\n value?: string;\n error?: string\n}\n"})}),"\n",(0,i.jsx)(n.p,{children:"Decode a file into a human readable format."}),"\n",(0,i.jsxs)(n.p,{children:["Compilation involves various binary files that can't be read directly\nin a text editor so they need to be decoded into a human readable format.\nExamples include ",(0,i.jsx)(n.code,{children:".class"})," and ",(0,i.jsx)(n.code,{children:".semanticdb"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"disconnect-from-old-build-server",children:"Disconnect from old build server"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"build-disconnect"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Unconditionally cancel existing build server connection without reconnecting"}),"\n",(0,i.jsx)(n.h3,{id:"list-build-targets",children:"List build targets"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"list-build-targets"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Retrieve a list of build targets for the workspace."}),"\n",(0,i.jsx)(n.h3,{id:"scan-sources",children:"Scan sources"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"sources-scan"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Walk all files in the workspace and index where symbols are defined."}),"\n",(0,i.jsxs)(n.p,{children:["Is automatically run once after ",(0,i.jsx)(n.code,{children:"initialized"})," notification and incrementally\nupdated on file watching events. A language client that doesn't support\nfile watching can run this manually instead. It should not be much slower\nthan walking the entire file tree and reading ",(0,i.jsx)(n.code,{children:"*.scala"})," files to string,\nindexing itself is cheap."]}),"\n",(0,i.jsx)(n.h3,{id:"start-ammonite-build-server",children:"Start Ammonite build server"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"ammonite-start"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Start Ammonite build server"}),"\n",(0,i.jsx)(n.h3,{id:"start-debug-adapter",children:"Start debug adapter"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"debug-adapter-start"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": DebugSessionParameters object\nExample:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "targets": ["mybuild://workspace/foo/?id=foo"],\n dataKind: "scala-main-class",\n data: {\n className: "com.foo.App"\n }\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"Start a new debugger session with fully specified DebugSessionParams"}),"\n",(0,i.jsx)(n.h3,{id:"start-main-class",children:"Start main class"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"debug-adapter-start"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": DebugUnresolvedMainClassParams object\nExample:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "mainClass": "path/to/file.scala",\n "buildTarget": "metals"\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"Start a new debugger session by resolving a main class by name and target"}),"\n",(0,i.jsx)(n.h3,{id:"start-test-suite",children:"Start test suite"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"debug-adapter-start"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ScalaTestSuitesDebugRequest object\nExample:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "target": "metals"\n "requestData" : {\n "suites": ["com.foo.FooSuite"],\n "jvmOptions": []],\n "environmentVariables": [],\n }\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"Start a new debugger session for a test suite, can be used to run a single test case"}),"\n",(0,i.jsx)(n.h3,{id:"start-test-suite-1",children:"Start test suite"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"debug-adapter-start"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": DebugUnresolvedTestClassParams object\nExample:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "testClass": "com.foo.FooSuite"\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"Start a new debugger session by resolving a test suite by name and possibly target."}),"\n",(0,i.jsx)(n.h3,{id:"attach-to-a-running-jvm-process",children:"Attach to a running jvm process"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"debug-adapter-start"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": DebugUnresolvedAttachRemoteParams object\nExample:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "hostName": "localhost",\n "port": 1234,\n "buildTarget": "metals",\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"Start a new debugger session by attaching to existing jvm process."}),"\n",(0,i.jsx)(n.h3,{id:"try-to-discover-a-test-or-main-to-run",children:"Try to discover a test or main to run."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"debug-adapter-start"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": DebugDiscoveryParams object\nExample:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "path": "path/to/file.scala",\n "runType": "run",\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"Start a new debugger session by running the discovered test or main class."}),"\n",(0,i.jsx)(n.h3,{id:"stop-ammonite-build-server",children:"Stop Ammonite build server"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"ammonite-stop"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Stop Ammonite build server"}),"\n",(0,i.jsx)(n.h3,{id:"go-to-super-methodfield-definition-in-hierarchy",children:"Go to super method/field definition in hierarchy"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"super-method-hierarchy"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": This command should be sent in with the LSP ",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocumentPositionParams",children:(0,i.jsx)(n.code,{children:"TextDocumentPositionParams"})})]}),"\n",(0,i.jsx)(n.p,{children:"When user executes this command it will calculate inheritance hierarchy of a class that contains given method.\nThen it will filter out classes not overriding given method and a list using 'metalsQuickPick' will be\ndisplayed to which super method user would like to go to.\nCommand has no effect on other symbols than method definition.\nQuickPick will show up only if more than one result is found."}),"\n",(0,i.jsx)(n.h3,{id:"start-scala-cli-server",children:"Start Scala CLI server"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"scala-cli-start"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Start Scala CLI server"}),"\n",(0,i.jsx)(n.h3,{id:"stop-scala-cli-server",children:"Stop Scala CLI server"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"scala-cli-stop"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Stop Scala CLI server"}),"\n",(0,i.jsx)(n.h3,{id:"open-an-issue-on-github",children:"Open an issue on GitHub"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"open-new-github-issue"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Open the Metals repository on GitHub to ask a question or report a bug."}),"\n",(0,i.jsx)(n.h3,{id:"open-a-feature-request",children:"Open a feature request"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"browser-open-url:https://github.com/scalameta/metals-feature-requests/issues/new?template=feature-request.yml"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Open the Metals repository on GitHub to open a feature request."}),"\n",(0,i.jsx)(n.h3,{id:"create-a-zip-with-error-reports",children:"Create a zip with error reports"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"zip-reports"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Creates a zip from incognito and bloop reports with additional information about build targets."}),"\n",(0,i.jsx)(n.h3,{id:"clean-and-restart-build-server",children:"Clean and restart build server"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"reset-workspace"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Clean metals cache and restart build server."}),"\n",(0,i.jsx)(n.p,{children:"When using Bloop, clears all directories in .bloop.\nThis will ensure that Bloop will have a fully reset state."}),"\n",(0,i.jsx)(n.h2,{id:"metals-client-commands",children:"Metals client commands"}),"\n",(0,i.jsxs)(n.p,{children:["The Metals server can send one of the following client commands if the client\nsupports the ",(0,i.jsx)(n.code,{children:"metals/executeClientCommand"})," notification,"]}),"\n",(0,i.jsx)(n.h3,{id:"open-a-specified-folder-either-in-the-same-or-new-window",children:"Open a specified folder either in the same or new window"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals-open-folder"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": An object with ",(0,i.jsx)(n.code,{children:"uri"})," and ",(0,i.jsx)(n.code,{children:"newWindow"})," fields.\nExample:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "uri": "file://path/to/directory",\n "newWindow": true\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"Open a new window with the specified directory."}),"\n",(0,i.jsx)(n.h3,{id:"run-doctor-1",children:"Run doctor"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals-doctor-run"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"string"}),", the HTML to display in the focused window."]}),"\n",(0,i.jsx)(n.p,{children:"Focus on a window displaying troubleshooting help from the Metals doctor."}),"\n",(0,i.jsxs)(n.p,{children:["If ",(0,i.jsx)(n.code,{children:"doctorProvider"})," is set to ",(0,i.jsx)(n.code,{children:'"json"'})," then the schema is as follows:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:"export interface DoctorOutput {\n /** Metals Doctor title */\n title: string;\n /** Version of the doctor json format, 0 if empty\n * The latest version is: 5\n */\n version: String;\n /**\n * Contains metals version and jdk info and a brief information about understanding\n * the Doctor placed in here as well. (since version 3 (replaces headerText))\n */\n header: DoctorHeader;\n /**\n * Troubleshooting help for each workspace folder.\n */\n folders: DoctorFolderResult[];\n}\n\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:"export interface DoctorFolderResult {\n /**\n * Contains decisions that were made about what build tool or build server\n * the user has chosen.\n */\n header: DoctorFolderHeader\n /**\n * If build targets are detected in your workspace, they will be listed here with\n * the status of related functionality of Metals for each build target.\n */\n targets?: DoctorBuildTarget[];\n /** Messages given if build targets cannot be found */\n messages?: DoctorRecommendation[];\n /** Explanations for the various statuses present in the doctor */\n explanations?: DoctorExplanation[];\n /** Error reports reported from Metals */\n errorReports: ErrorReportInfo[];\n}\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:"export interface DoctorHeader {\n /** java version and location information */\n jdkInfo?: string;\n /** the version of the server that is being used */\n serverInfo: string;\n /** small description on what a build target is */\n buildTargetDescription: string;\n}\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:"export interface DoctorFolderHeader {\n /** if Metals detected multiple build tools, this specifies the one the user has chosen */\n buildTool?: string;\n /** the build server that is being used */\n buildServer: string;\n /** if the user has turned the import prompt off, this will include a message on\n * how to get it back.\n */\n importBuildStatus?: string;\n}\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:"export interface DoctorBuildTarget {\n /** Name of the build target */\n buildTarget: string;\n /** Status of compilation for build this build target (since version 2) */\n compilationStatus: string;\n /** Can contain Scala version, sbt version or Java */\n targetType: string;\n /** Status of diagnostics */\n diagnostics: string;\n /** Status of completions, hovers and other interactive features*/\n interactive: string;\n /** Status of semanticdb indexes */\n semanticdb: string;\n /** Status of debugging */\n debugging: string;\n /** Status of java support */\n java: string;\n /** Any recommendations in how to fix any issues that are found above */\n recommendation: string;\n}\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:"export interface DoctorRecommendation {\n /** Title of the recommendation */\n title: string;\n /** Recommendations related to the found issue. */\n recommendations: string[]\n}\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:"export interface DoctorExplanation {\n /** Title of the explanation */\n title: string;\n /** Explanations of statuses that can be found in the doctor */\n recommendations: string[]\n}\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:"export interface ErrorReportInfo {\n /** Display name of the error */\n name: string;\n /** Timestamp of the report creation date */\n timestamp: number;\n /** Error report file uri */\n uri: string;\n /** Build target that the error is associated with */\n buildTarget?: string;\n /** Short error summary */\n shortSummary: string;\n /** The type of error -- This can be metals, metals-full, or bloop currently */\n errorReportType: string;\n}\n"})}),"\n",(0,i.jsx)(n.h3,{id:"reload-doctor",children:"Reload doctor"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals-doctor-reload"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"string"}),", the HTML to display in the focused window."]}),"\n",(0,i.jsxs)(n.p,{children:["Reload the HTML contents of an open Doctor window, if any. Should be ignored if there is no open doctor window.\nIf ",(0,i.jsx)(n.code,{children:"doctorProvider"})," is set to ",(0,i.jsx)(n.code,{children:'"json"'}),", then the schema is the same as found above in ",(0,i.jsx)(n.code,{children:'"metals-run-doctor"'})]}),"\n",(0,i.jsx)(n.h3,{id:"toggle-logs",children:"Toggle logs"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals-logs-toggle"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsxs)(n.p,{children:["Focus or remove focus on the output logs reported by the server via ",(0,i.jsx)(n.code,{children:"window/logMessage"}),"."]}),"\n",(0,i.jsx)(n.p,{children:'In VS Code, this opens the "output" channel for the Metals extension.'}),"\n",(0,i.jsx)(n.h3,{id:"open-problems",children:"Open problems"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals-diagnostics-focus"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Focus on the window that lists all published diagnostics."}),"\n",(0,i.jsx)(n.p,{children:'In VS Code, this opens the "problems" window.'}),"\n",(0,i.jsx)(n.h3,{id:"goto-location",children:"Goto location"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals-goto-location"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": First required parameter is LSP ",(0,i.jsx)(n.code,{children:"Location"})," object with ",(0,i.jsx)(n.code,{children:"uri"})," and ",(0,i.jsx)(n.code,{children:"range"})," fields.\nSecond parameter is optional and has signature ",(0,i.jsx)(n.code,{children:"otherWindow: Boolean"}),".\nIt gives a hint to client that if possible it would be good to open location in\nanother buffer/window.\nExample:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'[{\n "uri": "file://path/to/Definition.scala",\n "range": {\n "start": {"line": 194, "character": 0},\n "end": {"line": 194, "character": 1}\n },\n "otherWindow" : true\n},\n]\n'})}),"\n",(0,i.jsx)(n.p,{children:"Move the cursor focus to the provided location"}),"\n",(0,i.jsx)(n.h3,{id:"echo-command",children:"Echo command"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals-echo-command"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"string"}),", the command ID to execute on the client."]}),"\n",(0,i.jsx)(n.p,{children:"A client command that should be forwarded back to the Metals server."}),"\n",(0,i.jsx)(n.p,{children:"Metals may register commands in client UIs like tree view nodes that should be\nforwarded back to the Metals server if the client clicks on the UI elements."}),"\n",(0,i.jsx)(n.h3,{id:"refresh-model",children:"Refresh model"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals-model-refresh"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Note"}),": This request is deprecated and Metals will favor ",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specifications/specification-3-16/#codeLens_refresh",children:"Code Lens Refresh Request"})," if supported by the client."]}),"\n",(0,i.jsx)(n.p,{children:"Notifies the client that the model has been updated and it\nshould be refreshed (e.g. by resending code lens request)"}),"\n",(0,i.jsx)(n.h3,{id:"show-the-stacktrace-in-the-client",children:"Show the stacktrace in the client."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals-show-stacktrace"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": [string], the markdown representation of the stacktrace"]}),"\n",(0,i.jsx)(n.p,{children:"Show the stacktrace modified with links to specific files."}),"\n",(0,i.jsx)(n.h3,{id:"copy-worksheet-output-1",children:"Copy Worksheet Output"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals.copy-worksheet-output"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": [uri], the uri of the worksheet that you'd like to copy the contents of."]}),"\n",(0,i.jsx)(n.p,{children:"Copy the contents of a worksheet to your local buffer."}),"\n",(0,i.jsx)(n.p,{children:"Note: This command should execute the copy-worksheet-output\nserver command to get the output to copy into the buffer."}),"\n",(0,i.jsxs)(n.p,{children:["Server will attempt to create code lens with this command if ",(0,i.jsx)(n.code,{children:"copyWorksheetOutputProvider"})," option is set."]}),"\n",(0,i.jsx)(n.h3,{id:"start-run-session",children:"Start run session"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals-run-session-start"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": DebugSessionParameters object. It should be forwarded\nto the debug-adapter-start command as is."]}),"\n",(0,i.jsx)(n.p,{children:"Example:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "targets": ["mybuild://workspace/foo/?id=foo"],\n dataKind: "scala-main-class",\n data: {\n className: "com.foo.App"\n }\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"Starts a run session. The address of a new Debug Adapter can be obtained\nby using the debug-adapter-start metals server command\nwith the same arguments as provided to this command."}),"\n",(0,i.jsx)(n.h3,{id:"start-debug-session",children:"Start debug session"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals-debug-session-start"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": DebugSessionParameters object. It should be forwarded\nto the debug-adapter-start command as is."]}),"\n",(0,i.jsx)(n.p,{children:"Example:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "targets": ["mybuild://workspace/foo/?id=foo"],\n dataKind: "scala-main-class",\n data: {\n className: "com.foo.App"\n }\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"Starts a debug session. The address of a new Debug Adapter can be obtained\nby using the debug-adapter-start metals server command\nwith the same arguments as provided to this command."}),"\n",(0,i.jsx)(n.h3,{id:"connect-to-build-server-1",children:"Connect to build server."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Command"}),": ",(0,i.jsx)(n.code,{children:'"metals-build-connect"'})]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),": ",(0,i.jsx)(n.code,{children:"null"})]}),"\n",(0,i.jsx)(n.p,{children:"Establish a new connection to the build server and reindex the workspace."}),"\n",(0,i.jsx)(n.p,{children:"This command can be helpful in scenarios when Metals feels unresponsive, for example\nwhen reopening Metals after the computer it has been sleeping."}),"\n",(0,i.jsx)(n.h2,{id:"metals-http-client",children:"Metals HTTP client"}),"\n",(0,i.jsx)(n.p,{children:"Metals has an optional web interface that can be used to trigger server commands\nand respond to server requests. This interface is not intended for regular\nusers, it exists only to help editor plugin authors integrate with Metals."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/t5RJ3q6.png",alt:"Metals http client"})}),"\n",(0,i.jsxs)(n.p,{children:["The server is enabled by passing the ",(0,i.jsx)(n.code,{children:"-Dmetals.http=on"})," system property. The\nserver runs by default at ",(0,i.jsx)(n.a,{href:"http://localhost:5031/",children:(0,i.jsx)(n.code,{children:"http://localhost:5031"})}),".\nWhen the port 5031 is taken the next free increment is chosen instead (5032,\n5033, ...)."]}),"\n",(0,i.jsx)(n.h2,{id:"metals-lsp-extensions",children:"Metals LSP extensions"}),"\n",(0,i.jsx)(n.p,{children:"Editor clients can opt into receiving Metals-specific JSON-RPC requests and\nnotifications. Metals extensions are not defined in LSP and are not strictly\nrequired for the Metals server to function but it is recommended to implement\nthem to improve the user experience."}),"\n",(0,i.jsxs)(n.p,{children:["To enable Metals extensions, start the main process with the system property\n",(0,i.jsx)(n.code,{children:"-Dmetals.extensions=true"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"debug-adapter-protocol",children:"Debug Adapter Protocol"}),"\n",(0,i.jsxs)(n.p,{children:["Metals implements and additional protocol for running and debugging inside the\neditor, see the\n",(0,i.jsx)(n.a,{href:"/metals/docs/integrations/debug-adapter-protocol",children:"Debug Adapter Protocol"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"tree-view-protocol",children:"Tree View Protocol"}),"\n",(0,i.jsxs)(n.p,{children:["Metals implements several custom JSON-RPC endpoints related to rendering tree\nviews in the editor client, the\n",(0,i.jsx)(n.a,{href:"/metals/docs/integrations/tree-view-protocol",children:"Tree View Protocol"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"decoration-protocol",children:"Decoration Protocol"}),"\n",(0,i.jsxs)(n.p,{children:["Metals implements an LSP extension to display non-editable text in the editor,\nsee the ",(0,i.jsx)(n.a,{href:"/metals/docs/integrations/decoration-protocol",children:"Decoration Protocol"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"metalsslowtask",children:(0,i.jsx)(n.code,{children:"metals/slowTask"})}),"\n",(0,i.jsxs)(n.p,{children:["The Metals slow task request is sent from the server to the client to notify the\nstart of a long running process with unknown estimated total time. A\n",(0,i.jsx)(n.code,{children:"cancel: true"})," response from the client cancels the task. A ",(0,i.jsx)(n.code,{children:"$/cancelRequest"}),"\nrequest from the server indicates that the task has completed."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/nsjWHWR.gif",alt:"Metals slow task"})}),"\n",(0,i.jsxs)(n.p,{children:["The difference between ",(0,i.jsx)(n.code,{children:"metals/slowTask"})," and ",(0,i.jsx)(n.code,{children:"window/showMessageRequest"})," is that\n",(0,i.jsx)(n.code,{children:"slowTask"})," is time-sensitive and the interface should display a timer for how\nlong the task has been running while ",(0,i.jsx)(n.code,{children:"showMessageRequest"})," is static."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.em,{children:"Request"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["method: ",(0,i.jsx)(n.code,{children:"metals/slowTask"})]}),"\n",(0,i.jsxs)(n.li,{children:["params: ",(0,i.jsx)(n.code,{children:"MetalsSlowTaskParams"})," defined as follows:"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:'interface MetalsSlowTaskParams {\n /** The name of this slow task */\n message: string;\n /**\n * If true, the log output from this task does not need to be displayed to the user.\n *\n * In VS Code, the Metals "Output channel" is not toggled when this flag is true.\n */\n quietLogs?: boolean;\n /** Time that has elapsed since the begging of the task. */\n secondsElapsed?: number;\n}\n'})}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.em,{children:"Response"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["result: ",(0,i.jsx)(n.code,{children:"MetalsSlowTaskResponse"})," defined as follows"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"interface MetalsSlowTaskResult {\n /**\n * If true, cancel the running task.\n * If false, the user dismissed the dialogue but want to\n * continue running the task.\n */\n cancel: boolean;\n}\n"})}),"\n",(0,i.jsx)(n.h3,{id:"metalsstatus",children:(0,i.jsx)(n.code,{children:"metals/status"})}),"\n",(0,i.jsxs)(n.p,{children:["The Metals status notification is sent from the server to the client to notify\nabout non-critical and non-actionable events that are happening in the server.\nMetals status notifications are a complement to ",(0,i.jsx)(n.code,{children:"window/showMessage"})," and\n",(0,i.jsx)(n.code,{children:"window/logMessage"}),". Unlike ",(0,i.jsx)(n.code,{children:"window/logMessage"}),", status notifications should\nalways be visible in the user interface. Unlike ",(0,i.jsx)(n.code,{children:"window/showMessage"}),", status\nnotifications are not critical meaning that they should not demand too much\nattention from the user."]}),"\n",(0,i.jsx)(n.p,{children:"In general, Metals uses status notifications to update the user about ongoing\nevents in the server such as batch compilation in the build server or when a\nsuccessful connection was established with the build server."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/XX9CLRH.gif",alt:"Metals status bar"})}),"\n",(0,i.jsxs)(n.p,{children:['The "\ud83d\ude80 Imported build" and "\ud83d\udd04 Compiling explorer" messages at the bottom of\nthe window are ',(0,i.jsx)(n.code,{children:"metals/status"})," notifications."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.em,{children:"Notification"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["method: ",(0,i.jsx)(n.code,{children:"metals/status"})]}),"\n",(0,i.jsxs)(n.li,{children:["params: ",(0,i.jsx)(n.code,{children:"MetalsStatusParams"})," defined as follows:"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"interface MetalsStatusParams {\n /** The text to display in the status bar. */\n text: string;\n /** If true, show the status bar. */\n show?: boolean;\n /** If true, hide the status bar. */\n hide?: boolean;\n /** If set, display this message when user hovers over the status bar. */\n tooltip?: string;\n /** If set, execute this command when the user clicks on the status bar item. */\n command?: string;\n}\n"})}),"\n",(0,i.jsx)(n.h3,{id:"metalsdidfocustextdocument",children:(0,i.jsx)(n.code,{children:"metals/didFocusTextDocument"})}),"\n",(0,i.jsxs)(n.p,{children:["The Metals did focus notification is sent from the client to the server when the\neditor changes focus to a new text document. Unlike ",(0,i.jsx)(n.code,{children:"textDocument/didOpen"}),", the\ndid focus notification is sent even when the text document is already open."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/XjTtAZK.gif",alt:"Metals did focus"})}),"\n",(0,i.jsxs)(n.p,{children:["Observe that the compilation error appears as soon as ",(0,i.jsx)(n.code,{children:"UserTest.scala"})," is\nfocused even if the text document was already open before. The LSP\n",(0,i.jsx)(n.code,{children:"textDocument/didOpen"})," notification is only sent the first time a document so it\nis not possible for the language server to re-trigger compilation when moves\nfocus back to ",(0,i.jsx)(n.code,{children:"UserTest.scala"})," that depends on APIs defined in ",(0,i.jsx)(n.code,{children:"User.scala"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.em,{children:"Notification"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["method: ",(0,i.jsx)(n.code,{children:"metals/didFocusTextDocument"})]}),"\n",(0,i.jsxs)(n.li,{children:["params: ",(0,i.jsx)(n.code,{children:"string"}),", the URI of the document where the focused was moved to."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"metalsexecuteclientcommand",children:(0,i.jsx)(n.code,{children:"metals/executeClientCommand"})}),"\n",(0,i.jsxs)(n.p,{children:["The Metals execute client command is sent from the server to the client to\ntrigger an action inside the editor. This notification is a copy of the\n",(0,i.jsx)(n.code,{children:"workspace/executeCommand"})," except"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"execute client command is a notification, not a request"}),"\n",(0,i.jsx)(n.li,{children:"execute client command is initiated from the server, not the client"}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"https://scalameta.org/metals/docs/integrations/new-editor#metals-client-commands",children:"Metals client\ncommands"}),"\nfor the list of supported client commands."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.em,{children:"Notification"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["method: ",(0,i.jsx)(n.code,{children:"metals/executeClientCommand"})]}),"\n",(0,i.jsxs)(n.li,{children:["params: ",(0,i.jsx)(n.code,{children:"ExecuteCommandParams"}),", as defined in LSP."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"metalsinputbox",children:(0,i.jsx)(n.code,{children:"metals/inputBox"})}),"\n",(0,i.jsxs)(n.p,{children:["The Metals input box request is sent from the server to the client to let the\nuser provide a string value for a given prompt. Unlike\n",(0,i.jsx)(n.code,{children:"window/showMessageRequest"}),", the ",(0,i.jsx)(n.code,{children:"metals/inputBox"})," request allows the user to\nprovide a custom response instead of picking a pre-selected value."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.em,{children:"Request"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["method: ",(0,i.jsx)(n.code,{children:"metals/inputBox"})]}),"\n",(0,i.jsxs)(n.li,{children:["params: ",(0,i.jsx)(n.code,{children:"MetalsInputBoxParams"})," defined as follows. Note, matches\n",(0,i.jsx)(n.a,{href:"https://code.visualstudio.com/api/references/vscode-api#InputBoxOptions",children:(0,i.jsx)(n.code,{children:"InputBoxOptions"})}),"\nin the Visual Studio Code API:"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"export interface MetalsInputBoxParams {\n /**\n * The value to prefill in the input box.\n */\n value?: string;\n /**\n * The text to display underneath the input box.\n */\n prompt?: string;\n /**\n * An optional string to show as place holder in the input box to guide the user what to type.\n */\n placeHolder?: string;\n /**\n * Set to `true` to show a password prompt that will not show the typed value.\n */\n password?: boolean;\n /**\n * Set to `true` to keep the input box open when focus moves to another part of the editor or to another window.\n */\n ignoreFocusOut?: boolean;\n}\n"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["result: ",(0,i.jsx)(n.code,{children:"MetalsInputBoxResult"})," defined as follows:"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"export interface MetalsInputBoxResult {\n value?: string;\n cancelled?: boolean;\n}\n"})}),"\n",(0,i.jsx)(n.h3,{id:"metalsquickpick",children:(0,i.jsx)(n.code,{children:"metals/quickPick"})}),"\n",(0,i.jsxs)(n.p,{children:["The Metals quick pick request is sent from the server to the client to let the\nuser provide a string value by picking one out of a number of given options. It\nis similar to ",(0,i.jsx)(n.code,{children:"window/showMessageRequest"}),", but the ",(0,i.jsx)(n.code,{children:"metals/quickPick"})," request\nhas richer parameters, that can be used to filter items to pick, like\n",(0,i.jsx)(n.code,{children:"description"})," and ",(0,i.jsx)(n.code,{children:"detail"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.em,{children:"Request"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["method: ",(0,i.jsx)(n.code,{children:"metals/quickPick"})]}),"\n",(0,i.jsxs)(n.li,{children:["params: ",(0,i.jsx)(n.code,{children:"MetalsQuickInputParams"})," defined as follows. It partially matches\n",(0,i.jsx)(n.a,{href:"https://code.visualstudio.com/api/references/vscode-api#QuickPickOptions",children:(0,i.jsx)(n.code,{children:"QuickPickOptions"})}),"\nin the Visual Studio Code API, but it also contains ",(0,i.jsx)(n.code,{children:"items"})," of\n",(0,i.jsx)(n.a,{href:"https://code.visualstudio.com/api/references/vscode-api#QuickPickItem",children:(0,i.jsx)(n.code,{children:"MetalsQuickPickItem"})}),",\nwhich, in it's turn, partially matches ",(0,i.jsx)(n.code,{children:"QuickPickItem"}),", but these interfaces\ndo not contain options for picking many items:"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"export interface MetalsQuickPickParams {\n /**\n * An array of items that can be selected from.\n */\n items: MetalsQuickPickItem[];\n /**\n * An optional flag to include the description when filtering the picks.\n */\n matchOnDescription?: boolean;\n /**\n * An optional flag to include the detail when filtering the picks.\n */\n matchOnDetail?: boolean;\n /**\n * An optional string to show as place holder in the input box to guide the user what to pick on.\n */\n placeHolder?: string;\n /**\n * Set to `true` to keep the picker open when focus moves to another part of the editor or to another window.\n */\n ignoreFocusOut?: boolean;\n}\n\nexport interface MetalsQuickPickItem {\n /**\n * An id for this items that should be return as a result of the picking.\n */\n id: string;\n /**\n * A human readable string which is rendered prominent.\n */\n label: string;\n /**\n * A human readable string which is rendered less prominent.\n */\n description?: string;\n /**\n * A human readable string which is rendered less prominent.\n */\n detail?: string;\n /**\n * Always show this item.\n */\n alwaysShow?: boolean;\n}\n"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["result: ",(0,i.jsx)(n.code,{children:"MetalsQuickPickResult"})," defined as follows:"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"export interface MetalsQuickPickResult {\n itemId?: string;\n cancelled?: boolean;\n}\n"})}),"\n",(0,i.jsx)(n.h3,{id:"metalswindowstatedidchange",children:(0,i.jsx)(n.code,{children:"metals/windowStateDidChange"})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"metals/windowStateDidChange"})," notification is sent from the client to the\nserver to indicate whether the editor application window is focused or not. When\nthe editor window is not focused, Metals tries to avoid triggering expensive\ncomputation in the background such as compilation."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.em,{children:"Notification"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["method: ",(0,i.jsx)(n.code,{children:"metals/windowStateDidChange"})]}),"\n",(0,i.jsxs)(n.li,{children:["params: ",(0,i.jsx)(n.code,{children:"WindowStateDidChangeParams"})," defined as follows:"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"interface WindowStateDidChangeParams( {\n /** If true, the editor application window is focused. False, otherwise. */\n focused: boolean;\n}\n"})}),"\n",(0,i.jsx)(n.h3,{id:"metalsopenwindow",children:(0,i.jsx)(n.code,{children:"metals/openWindow"})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"metals/openWindow"})," params are used with the New Scala Project\nfunctionality. After the new project has been created, if the editor has the\nability to open the project in a new window then these params are used with the\n",(0,i.jsx)(n.code,{children:"metals-open-folder"})," command."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"interface MetalsOpenWindowParams {\n /** Location of the newly created project. */\n uri: string;\n /** Whether or not to open the project in a new window. */\n openNewWindow: boolean;\n}\n"})}),"\n",(0,i.jsx)(n.h3,{id:"metalsfindtextindependencyjars",children:(0,i.jsx)(n.code,{children:"metals/findTextInDependencyJars"})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"FindTextInDependencyJars"})," request is sent from the client to the server to perform a search though files in the classpath\nincluding binary and sources jars. In response it returns a standard list of ",(0,i.jsx)(n.code,{children:"Location"})," from the ",(0,i.jsx)(n.a,{href:"https://microsoft.github.io/language-server-protocol/specification#location",children:"LSP spec"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["In case if this endpoint was called with empty ",(0,i.jsx)(n.code,{children:"query.pattern"})," or empty ",(0,i.jsx)(n.code,{children:"options.include"})," server sends ",(0,i.jsx)(n.a,{href:"https://scalameta.org/metals/docs/integrations/new-editor#metalsinputbox",children:(0,i.jsx)(n.code,{children:"metals/inputBox"})}),"\nrequest to the client to obtain these values."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.em,{children:"Request"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["method: ",(0,i.jsx)(n.code,{children:"metals/findTextInDependecyJars"})]}),"\n",(0,i.jsxs)(n.li,{children:["params: ",(0,i.jsx)(n.code,{children:"FindTextInDependencyJarsRequest"})," defined as follows."]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"/**\n * Currenly, only `pattern` field is used for search.\n * See: https://github.com/scalameta/metals/issues/3234\n */\ninterface TextSearchQuery {\n /**\n\t\t * The text pattern to search for.\n\t\t */\n pattern?: string;\n /**\n\t\t * Whether or not `pattern` should be interpreted as a regular expression.\n\t\t */\n isRegExp?: boolean;\n /**\n\t\t * Whether or not the search should be case-sensitive.\n\t\t */\n isCaseSensitive?: boolean;\n /**\n\t\t * Whether or not to search for whole word matches only.\n\t\t */\n isWordMatch?: boolean;\n}\n\ninterface FindTextInFilesOptions {\n /** Include file filter. Example: `*.conf` */\n include?: string;\n /** Exclude file filter. Example: `*.conf` */\n exclude?: string;\n}\n\ninterface FindTextInDependencyJarsRequest(\n options?: FindTextInFilesOptions;\n query: TextSearchQuery\n)\n"})}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.em,{children:"Response"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["result: ",(0,i.jsx)(n.code,{children:"Location[]"})]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"metalsdoctorvisibilitydidchange",children:(0,i.jsx)(n.code,{children:"metals/doctorVisibilityDidChange"})}),"\n",(0,i.jsxs)(n.p,{children:["When the client opens the doctor view, it will send in ",(0,i.jsx)(n.code,{children:"visible: true"})," to the\nserver and then ",(0,i.jsx)(n.code,{children:"visible: false"})," when the doctor view is closed. This will\nensure that the doctor checks aren't calculated on the server side when they\naren't needed to since they won't be seen by the client anyways."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.em,{children:"Notification"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["method: ",(0,i.jsx)(n.code,{children:"metals/doctorVisibilityDidChange"})]}),"\n",(0,i.jsxs)(n.li,{children:["params: ",(0,i.jsx)(n.code,{children:"DoctorVisibilityDidChangeParams"})]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"interface DoctorVisibilityDidChangeParams {\n visible: boolean;\n}\n"})})]})}function h(e={}){const{wrapper:n}={...(0,t.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},1151:(e,n,s)=>{s.d(n,{Z:()=>l,a:()=>r});var i=s(7294);const t={},o=i.createContext(t);function r(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/49773175.1bc1e418.js b/assets/js/49773175.1bc1e418.js
deleted file mode 100644
index 98e3e67c289..00000000000
--- a/assets/js/49773175.1bc1e418.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4100],{817:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>o,contentTitle:()=>l,default:()=>h,frontMatter:()=>a,metadata:()=>r,toc:()=>c});var i=s(5893),t=s(1151);const a={id:"vim",sidebar_label:"Vim",title:"Vim"},l=void 0,r={id:"editors/vim",title:"Vim",description:"nvim-metals demo",source:"@site/target/docs/editors/vim.md",sourceDirName:"editors",slug:"/editors/vim",permalink:"/metals/docs/editors/vim",draft:!1,unlisted:!1,editUrl:"https://github.com/scalameta/metals/edit/main/docs/editors/vim.md",tags:[],version:"current",frontMatter:{id:"vim",sidebar_label:"Vim",title:"Vim"},sidebar:"docs",previous:{title:"VS Code",permalink:"/metals/docs/editors/vscode"},next:{title:"Sublime Text",permalink:"/metals/docs/editors/sublime"}},o={},c=[{value:"Requirements",id:"requirements",level:2},{value:"nvim-metals",id:"nvim-metals",level:2},{value:"Vim alternatives",id:"vim-alternatives",level:2},{value:"Using an alternative LSP Client",id:"using-an-alternative-lsp-client",level:3},{value:"Files and Directories to include in your Gitignore",id:"files-and-directories-to-include-in-your-gitignore",level:2},{value:"Running scalafix rules",id:"running-scalafix-rules",level:2},{value:"Getting help",id:"getting-help",level:2}];function d(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/BglIFli.gif",alt:"nvim-metals demo"})}),"\n",(0,i.jsxs)(n.p,{children:["While Metals works with most LSP clients for ",(0,i.jsx)(n.a,{href:"https://www.vim.org/",children:"Vim"})," and\n",(0,i.jsx)(n.a,{href:"https://neovim.io/",children:"Neovim"}),", we recommend using the dedicated Neovim plugin to\nget the best Metals support. Metals has many specific commands and LSP\nextensions that won't be available when not using the extension."]}),"\n",(0,i.jsx)(n.h2,{id:"requirements",children:"Requirements"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Java 8, 11, 17 provided by OpenJDK or Oracle"}),". Eclipse OpenJ9 is not\nsupported, please make sure the ",(0,i.jsx)(n.code,{children:"JAVA_HOME"})," environment variable\npoints to a valid Java 8, 11 or 17 installation."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"macOS, Linux or Windows"}),". Metals is developed on many operating systems and\nevery PR is tested on Ubuntu, Windows and MacOS."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 2.13, 2.12, 2.11 and Scala 3"}),". Metals supports these Scala versions:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 2.13"}),":\n2.13.12, 2.13.11, 2.13.10, 2.13.9, 2.13.8, 2.13.7, 2.13.6, 2.13.5"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 2.12"}),":\n2.12.18, 2.12.17, 2.12.16, 2.12.15, 2.12.14, 2.12.13, 2.12.12, 2.12.11"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 2.11"}),":\n2.11.12"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 3"}),":\n3.3.1, 3.3.0, 3.2.2, 3.2.1, 3.2.0, 3.1.3, 3.1.2, 3.1.1, 3.1.0"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Note that 2.11.x support is deprecated and it will be removed in future releases.\nIt's recommended to upgrade to Scala 2.12 or Scala 2.13"}),"\n",(0,i.jsx)(n.h2,{id:"nvim-metals",children:"nvim-metals"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/scalameta/nvim-metals",children:(0,i.jsx)(n.code,{children:"nvim-metals"})})," Is the dedicated\nMetals extension for the ",(0,i.jsx)(n.a,{href:"https://neovim.io/doc/user/lsp.html",children:"built-in LSP\nsupport"})," in Neovim."]}),"\n",(0,i.jsxs)(n.p,{children:["To get started with installation please see the ",(0,i.jsx)(n.code,{children:"nvim-metals"}),"\n",(0,i.jsx)(n.a,{href:"https://github.com/scalameta/nvim-metals#prerequisites",children:"prerequisites"})," and\n",(0,i.jsx)(n.a,{href:"https://github.com/scalameta/nvim-metals#installation",children:"installation steps"}),"."]}),"\n",(0,i.jsxs)("table",{children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:"Version"}),(0,i.jsx)("th",{children:"Published"})]})}),(0,i.jsxs)("tbody",{children:[(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:"1.2.0+13-615add64-SNAPSHOT"}),(0,i.jsx)("td",{children:"15 Dec 2023 18:44"})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:"1.2.0+13-615add64-SNAPSHOT"}),(0,i.jsx)("td",{children:"15 Dec 2023 18:29"})]})]})]}),"\n",(0,i.jsxs)(n.p,{children:["Keep in mind that by default Neovim doesn't have default mappings for the\nfunctionality you'll want like, hovers, goto definition, method signatures, etc.\nYou can find a full example configuration of these in the ",(0,i.jsx)(n.a,{href:"https://github.com/scalameta/nvim-metals/discussions/39",children:"example\nconfiguration"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["For a guide on all the available features in ",(0,i.jsx)(n.code,{children:"nvim-metals"}),", refer to the\n",(0,i.jsx)(n.a,{href:"https://github.com/scalameta/nvim-metals/discussions/279",children:"features list"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"vim-alternatives",children:"Vim alternatives"}),"\n",(0,i.jsxs)(n.p,{children:["There are multiple Vim alternatives if you're not a Neovim user. Metals did have\na Metals-specific plugin that worked with Vim,\n",(0,i.jsx)(n.a,{href:"https://github.com/scalameta/coc-metals",children:(0,i.jsx)(n.code,{children:"coc-metals"})}),", but it doesn't work\nwith the newest versions of Metals and is currently ",(0,i.jsx)(n.a,{href:"https://github.com/scalameta/coc-metals/issues/460",children:"deprecated and\nunmaintained"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"using-an-alternative-lsp-client",children:"Using an alternative LSP Client"}),"\n",(0,i.jsx)(n.p,{children:"There are multiple other LSP clients that work with Vim. Here are a few:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://github.com/natebosch/vim-lsc/",children:(0,i.jsx)(n.code,{children:"natebosch/vim-lsc"})}),": simple installation and written in Vimscript."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://github.com/prabirshrestha/vim-lsp",children:(0,i.jsx)(n.code,{children:"vim-lsp"})}),": simple installation and written in\nVimscript."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://github.com/yegappan/lsp",children:(0,i.jsx)(n.code,{children:"yegappan/lsp"})}),": Very new and targeting\nVim9."]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Keep in mind that they have varying levels of LSP support, don't support Metals\nspecific commands (like build import), or Metals specific LSP extensions (like\ntree view), and you need to manage the Metals installation yourself."}),"\n",(0,i.jsx)(n.p,{children:"There are two ways to install Metals yourself in order to work with an\nalternative client."}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["Most easily is to just use ",(0,i.jsx)(n.a,{href:"https://get-coursier.io/",children:"Coursier"})," to do a ",(0,i.jsx)(n.code,{children:"cs install metals"}),"."]}),"\n",(0,i.jsx)(n.li,{children:"Generating a Metals binary yourself."}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"files-and-directories-to-include-in-your-gitignore",children:"Files and Directories to include in your Gitignore"}),"\n",(0,i.jsxs)(n.p,{children:["The Metals server places logs and other files in the ",(0,i.jsx)(n.code,{children:".metals"})," directory. The\nBloop compile server places logs and compilation artifacts in the ",(0,i.jsx)(n.code,{children:".bloop"}),"\ndirectory. The Bloop plugin that generates Bloop configuration is added in the\n",(0,i.jsx)(n.code,{children:"metals.sbt"})," file, which is added at ",(0,i.jsx)(n.code,{children:"project/metals.sbt"})," as well as further\n",(0,i.jsx)(n.code,{children:"project"})," directories depending on how deep ",(0,i.jsx)(n.code,{children:"*.sbt"})," files need to be supported.\nTo support each ",(0,i.jsx)(n.code,{children:"*.sbt"})," file Metals needs to create an additional file at\n",(0,i.jsx)(n.code,{children:"./project/project/metals.sbt"})," relative to the sbt file.\nWorking with Ammonite scripts will place compiled scripts into the ",(0,i.jsx)(n.code,{children:".ammonite"})," directory.\nIt's recommended to exclude these directories and files\nfrom version control systems like git."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"# ~/.gitignore\n.metals/\n.bloop/\n.ammonite/\nmetals.sbt\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"coursier bootstrap org.scalameta:metals_2.13:1.2.0+13-615add64-SNAPSHOT -o metals -f\n"})}),"\n",(0,i.jsx)(n.p,{children:"(optional) It's recommended to enable JVM string de-duplication and provide a\ngenerous stack size and memory options."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"coursier bootstrap \\\n --java-opt -XX:+UseG1GC \\\n --java-opt -XX:+UseStringDeduplication \\\n --java-opt -Xss4m \\\n --java-opt -Xms100m \\\n org.scalameta:metals_2.13:1.2.0+13-615add64-SNAPSHOT -o metals -f\n"})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"-Dmetals.client=vim-lsc"})," flag is there just as a helper to match your\npotential client. So make sure it matches your client name. This line isn't\nmandatory though as your client should be able to fully be configured via\n",(0,i.jsx)(n.code,{children:"InitializationOptions"}),". You can read more about his\n",(0,i.jsx)(n.a,{href:"https://scalameta.org/metals/blog/2020/07/23/configuring-a-client#initializationoptions",children:"here"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"running-scalafix-rules",children:"Running scalafix rules"}),"\n",(0,i.jsxs)(n.p,{children:["Scalafix allows users to specify some refactoring and linting rules that can be applied to your\ncodebase. Please checkout the ",(0,i.jsx)(n.a,{href:"https://scalacenter.github.io/scalafix",children:"scalafix website"})," for more information."]}),"\n",(0,i.jsxs)(n.p,{children:["Since Metals v0.11.7 it's now possible to run scalafix rules using a special\ncommand ",(0,i.jsx)(n.code,{children:"metals.scalafix-run"}),".\nThis should run all the rules defined in your ",(0,i.jsx)(n.code,{children:".scalafix.conf"})," file. All built-in rules\nand the ",(0,i.jsx)(n.a,{href:"https://scalacenter.github.io/scalafix/docs/rules/community-rules.html#hygiene-rules",children:"community hygiene ones"})," can\nbe run without any additional settings. However, for all the other rules users need to\nadd an additional dependency in the ",(0,i.jsx)(n.code,{children:"metals.scalafixRulesDependencies"})," user setting.\nThose rules need to be in form of strings such as ",(0,i.jsx)(n.code,{children:"com.github.liancheng::organize-imports:0.6.0"}),", which\nfollows the same convention as ",(0,i.jsx)(n.a,{href:"https://get-coursier.io/",children:"coursier dependencies"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"A sample scalafix configuration can be seen below:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-hocon",children:'rules = [\n OrganizeImports,\n ExplicitResultTypes,\n RemoveUnused\n]\n\nRemoveUnused.imports = false\n\nOrganizeImports.groupedImports = Explode\nOrganizeImports.expandRelative = true\nOrganizeImports.removeUnused = true\nOrganizeImports.groups = [\n "re:javax?\\."\n "scala."\n "scala.meta."\n "*"\n]\n\n'})}),"\n",(0,i.jsx)(n.h2,{id:"getting-help",children:"Getting help"}),"\n",(0,i.jsxs)(n.p,{children:["There is an active community using Vim and Metals. Apart from ",(0,i.jsx)(n.a,{href:"https://github.com/scalameta/nvim-metals/issues/new/choose",children:"creating an\nissue"})," or ",(0,i.jsx)(n.a,{href:"https://github.com/scalameta/nvim-metals/discussions",children:"starting\na discussion"})," for\n",(0,i.jsx)(n.code,{children:"nvim-metals"})," users, you can also ask questions in our ",(0,i.jsx)(n.code,{children:"#vim-users"})," ",(0,i.jsx)(n.a,{href:"https://discord.gg/FaVDrJegEh",children:"Discord\nChannel"})," or ",(0,i.jsx)(n.a,{href:"https://matrix.to/#/#scalameta:vim-users",children:"Matrix\nBridge"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,t.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},1151:(e,n,s)=>{s.d(n,{Z:()=>r,a:()=>l});var i=s(7294);const t={},a=i.createContext(t);function l(e){const n=i.useContext(a);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),i.createElement(a.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/49773175.3ccc5da4.js b/assets/js/49773175.3ccc5da4.js
new file mode 100644
index 00000000000..e7d2ce83a78
--- /dev/null
+++ b/assets/js/49773175.3ccc5da4.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4100],{817:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>o,contentTitle:()=>l,default:()=>h,frontMatter:()=>a,metadata:()=>r,toc:()=>c});var i=s(5893),t=s(1151);const a={id:"vim",sidebar_label:"Vim",title:"Vim"},l=void 0,r={id:"editors/vim",title:"Vim",description:"nvim-metals demo",source:"@site/target/docs/editors/vim.md",sourceDirName:"editors",slug:"/editors/vim",permalink:"/metals/docs/editors/vim",draft:!1,unlisted:!1,editUrl:"https://github.com/scalameta/metals/edit/main/docs/editors/vim.md",tags:[],version:"current",frontMatter:{id:"vim",sidebar_label:"Vim",title:"Vim"},sidebar:"docs",previous:{title:"VS Code",permalink:"/metals/docs/editors/vscode"},next:{title:"Sublime Text",permalink:"/metals/docs/editors/sublime"}},o={},c=[{value:"Requirements",id:"requirements",level:2},{value:"nvim-metals",id:"nvim-metals",level:2},{value:"Vim alternatives",id:"vim-alternatives",level:2},{value:"Using an alternative LSP Client",id:"using-an-alternative-lsp-client",level:3},{value:"Files and Directories to include in your Gitignore",id:"files-and-directories-to-include-in-your-gitignore",level:2},{value:"Running scalafix rules",id:"running-scalafix-rules",level:2},{value:"Getting help",id:"getting-help",level:2}];function d(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/BglIFli.gif",alt:"nvim-metals demo"})}),"\n",(0,i.jsxs)(n.p,{children:["While Metals works with most LSP clients for ",(0,i.jsx)(n.a,{href:"https://www.vim.org/",children:"Vim"})," and\n",(0,i.jsx)(n.a,{href:"https://neovim.io/",children:"Neovim"}),", we recommend using the dedicated Neovim plugin to\nget the best Metals support. Metals has many specific commands and LSP\nextensions that won't be available when not using the extension."]}),"\n",(0,i.jsx)(n.h2,{id:"requirements",children:"Requirements"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Java 8, 11, 17 provided by OpenJDK or Oracle"}),". Eclipse OpenJ9 is not\nsupported, please make sure the ",(0,i.jsx)(n.code,{children:"JAVA_HOME"})," environment variable\npoints to a valid Java 8, 11 or 17 installation."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"macOS, Linux or Windows"}),". Metals is developed on many operating systems and\nevery PR is tested on Ubuntu, Windows and MacOS."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 2.13, 2.12, 2.11 and Scala 3"}),". Metals supports these Scala versions:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 2.13"}),":\n2.13.12, 2.13.11, 2.13.10, 2.13.9, 2.13.8, 2.13.7, 2.13.6, 2.13.5"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 2.12"}),":\n2.12.18, 2.12.17, 2.12.16, 2.12.15, 2.12.14, 2.12.13, 2.12.12, 2.12.11"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 2.11"}),":\n2.11.12"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 3"}),":\n3.3.1, 3.3.0, 3.2.2, 3.2.1, 3.2.0, 3.1.3, 3.1.2, 3.1.1, 3.1.0"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Note that 2.11.x support is deprecated and it will be removed in future releases.\nIt's recommended to upgrade to Scala 2.12 or Scala 2.13"}),"\n",(0,i.jsx)(n.h2,{id:"nvim-metals",children:"nvim-metals"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/scalameta/nvim-metals",children:(0,i.jsx)(n.code,{children:"nvim-metals"})})," Is the dedicated\nMetals extension for the ",(0,i.jsx)(n.a,{href:"https://neovim.io/doc/user/lsp.html",children:"built-in LSP\nsupport"})," in Neovim."]}),"\n",(0,i.jsxs)(n.p,{children:["To get started with installation please see the ",(0,i.jsx)(n.code,{children:"nvim-metals"}),"\n",(0,i.jsx)(n.a,{href:"https://github.com/scalameta/nvim-metals#prerequisites",children:"prerequisites"})," and\n",(0,i.jsx)(n.a,{href:"https://github.com/scalameta/nvim-metals#installation",children:"installation steps"}),"."]}),"\n",(0,i.jsxs)("table",{children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:"Version"}),(0,i.jsx)("th",{children:"Published"})]})}),(0,i.jsxs)("tbody",{children:[(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:"1.2.0"}),(0,i.jsx)("td",{children:"12 Dec 2023 10:36"})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:"1.2.0+14-72692d2c-SNAPSHOT"}),(0,i.jsx)("td",{children:"18 Dec 2023 10:59"})]})]})]}),"\n",(0,i.jsxs)(n.p,{children:["Keep in mind that by default Neovim doesn't have default mappings for the\nfunctionality you'll want like, hovers, goto definition, method signatures, etc.\nYou can find a full example configuration of these in the ",(0,i.jsx)(n.a,{href:"https://github.com/scalameta/nvim-metals/discussions/39",children:"example\nconfiguration"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["For a guide on all the available features in ",(0,i.jsx)(n.code,{children:"nvim-metals"}),", refer to the\n",(0,i.jsx)(n.a,{href:"https://github.com/scalameta/nvim-metals/discussions/279",children:"features list"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"vim-alternatives",children:"Vim alternatives"}),"\n",(0,i.jsxs)(n.p,{children:["There are multiple Vim alternatives if you're not a Neovim user. Metals did have\na Metals-specific plugin that worked with Vim,\n",(0,i.jsx)(n.a,{href:"https://github.com/scalameta/coc-metals",children:(0,i.jsx)(n.code,{children:"coc-metals"})}),", but it doesn't work\nwith the newest versions of Metals and is currently ",(0,i.jsx)(n.a,{href:"https://github.com/scalameta/coc-metals/issues/460",children:"deprecated and\nunmaintained"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"using-an-alternative-lsp-client",children:"Using an alternative LSP Client"}),"\n",(0,i.jsx)(n.p,{children:"There are multiple other LSP clients that work with Vim. Here are a few:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://github.com/natebosch/vim-lsc/",children:(0,i.jsx)(n.code,{children:"natebosch/vim-lsc"})}),": simple installation and written in Vimscript."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://github.com/prabirshrestha/vim-lsp",children:(0,i.jsx)(n.code,{children:"vim-lsp"})}),": simple installation and written in\nVimscript."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"https://github.com/yegappan/lsp",children:(0,i.jsx)(n.code,{children:"yegappan/lsp"})}),": Very new and targeting\nVim9."]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Keep in mind that they have varying levels of LSP support, don't support Metals\nspecific commands (like build import), or Metals specific LSP extensions (like\ntree view), and you need to manage the Metals installation yourself."}),"\n",(0,i.jsx)(n.p,{children:"There are two ways to install Metals yourself in order to work with an\nalternative client."}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["Most easily is to just use ",(0,i.jsx)(n.a,{href:"https://get-coursier.io/",children:"Coursier"})," to do a ",(0,i.jsx)(n.code,{children:"cs install metals"}),"."]}),"\n",(0,i.jsx)(n.li,{children:"Generating a Metals binary yourself."}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"files-and-directories-to-include-in-your-gitignore",children:"Files and Directories to include in your Gitignore"}),"\n",(0,i.jsxs)(n.p,{children:["The Metals server places logs and other files in the ",(0,i.jsx)(n.code,{children:".metals"})," directory. The\nBloop compile server places logs and compilation artifacts in the ",(0,i.jsx)(n.code,{children:".bloop"}),"\ndirectory. The Bloop plugin that generates Bloop configuration is added in the\n",(0,i.jsx)(n.code,{children:"metals.sbt"})," file, which is added at ",(0,i.jsx)(n.code,{children:"project/metals.sbt"})," as well as further\n",(0,i.jsx)(n.code,{children:"project"})," directories depending on how deep ",(0,i.jsx)(n.code,{children:"*.sbt"})," files need to be supported.\nTo support each ",(0,i.jsx)(n.code,{children:"*.sbt"})," file Metals needs to create an additional file at\n",(0,i.jsx)(n.code,{children:"./project/project/metals.sbt"})," relative to the sbt file.\nWorking with Ammonite scripts will place compiled scripts into the ",(0,i.jsx)(n.code,{children:".ammonite"})," directory.\nIt's recommended to exclude these directories and files\nfrom version control systems like git."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"# ~/.gitignore\n.metals/\n.bloop/\n.ammonite/\nmetals.sbt\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"coursier bootstrap org.scalameta:metals_2.13:1.2.0 -o metals -f\n"})}),"\n",(0,i.jsx)(n.p,{children:"(optional) It's recommended to enable JVM string de-duplication and provide a\ngenerous stack size and memory options."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"coursier bootstrap \\\n --java-opt -XX:+UseG1GC \\\n --java-opt -XX:+UseStringDeduplication \\\n --java-opt -Xss4m \\\n --java-opt -Xms100m \\\n org.scalameta:metals_2.13:1.2.0 -o metals -f\n"})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"-Dmetals.client=vim-lsc"})," flag is there just as a helper to match your\npotential client. So make sure it matches your client name. This line isn't\nmandatory though as your client should be able to fully be configured via\n",(0,i.jsx)(n.code,{children:"InitializationOptions"}),". You can read more about his\n",(0,i.jsx)(n.a,{href:"https://scalameta.org/metals/blog/2020/07/23/configuring-a-client#initializationoptions",children:"here"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"running-scalafix-rules",children:"Running scalafix rules"}),"\n",(0,i.jsxs)(n.p,{children:["Scalafix allows users to specify some refactoring and linting rules that can be applied to your\ncodebase. Please checkout the ",(0,i.jsx)(n.a,{href:"https://scalacenter.github.io/scalafix",children:"scalafix website"})," for more information."]}),"\n",(0,i.jsxs)(n.p,{children:["Since Metals v0.11.7 it's now possible to run scalafix rules using a special\ncommand ",(0,i.jsx)(n.code,{children:"metals.scalafix-run"}),".\nThis should run all the rules defined in your ",(0,i.jsx)(n.code,{children:".scalafix.conf"})," file. All built-in rules\nand the ",(0,i.jsx)(n.a,{href:"https://scalacenter.github.io/scalafix/docs/rules/community-rules.html#hygiene-rules",children:"community hygiene ones"})," can\nbe run without any additional settings. However, for all the other rules users need to\nadd an additional dependency in the ",(0,i.jsx)(n.code,{children:"metals.scalafixRulesDependencies"})," user setting.\nThose rules need to be in form of strings such as ",(0,i.jsx)(n.code,{children:"com.github.liancheng::organize-imports:0.6.0"}),", which\nfollows the same convention as ",(0,i.jsx)(n.a,{href:"https://get-coursier.io/",children:"coursier dependencies"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"A sample scalafix configuration can be seen below:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-hocon",children:'rules = [\n OrganizeImports,\n ExplicitResultTypes,\n RemoveUnused\n]\n\nRemoveUnused.imports = false\n\nOrganizeImports.groupedImports = Explode\nOrganizeImports.expandRelative = true\nOrganizeImports.removeUnused = true\nOrganizeImports.groups = [\n "re:javax?\\."\n "scala."\n "scala.meta."\n "*"\n]\n\n'})}),"\n",(0,i.jsx)(n.h2,{id:"getting-help",children:"Getting help"}),"\n",(0,i.jsxs)(n.p,{children:["There is an active community using Vim and Metals. Apart from ",(0,i.jsx)(n.a,{href:"https://github.com/scalameta/nvim-metals/issues/new/choose",children:"creating an\nissue"})," or ",(0,i.jsx)(n.a,{href:"https://github.com/scalameta/nvim-metals/discussions",children:"starting\na discussion"})," for\n",(0,i.jsx)(n.code,{children:"nvim-metals"})," users, you can also ask questions in our ",(0,i.jsx)(n.code,{children:"#vim-users"})," ",(0,i.jsx)(n.a,{href:"https://discord.gg/FaVDrJegEh",children:"Discord\nChannel"})," or ",(0,i.jsx)(n.a,{href:"https://matrix.to/#/#scalameta:vim-users",children:"Matrix\nBridge"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,t.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},1151:(e,n,s)=>{s.d(n,{Z:()=>r,a:()=>l});var i=s(7294);const t={},a=i.createContext(t);function l(e){const n=i.useContext(a);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),i.createElement(a.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/8a0b8ece.b4cabaaf.js b/assets/js/8a0b8ece.1f7f4ad7.js
similarity index 63%
rename from assets/js/8a0b8ece.b4cabaaf.js
rename to assets/js/8a0b8ece.1f7f4ad7.js
index a81086c4756..bf0963bd48e 100644
--- a/assets/js/8a0b8ece.b4cabaaf.js
+++ b/assets/js/8a0b8ece.1f7f4ad7.js
@@ -1 +1 @@
-"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4782],{908:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>o,default:()=>h,frontMatter:()=>l,metadata:()=>r,toc:()=>c});var i=s(5893),t=s(1151);const l={id:"sublime",title:"Sublime Text"},o=void 0,r={id:"editors/sublime",title:"Sublime Text",description:"Metals works with Sublime Text (build 4000 or later) thanks to the",source:"@site/target/docs/editors/sublime.md",sourceDirName:"editors",slug:"/editors/sublime",permalink:"/metals/docs/editors/sublime",draft:!1,unlisted:!1,editUrl:"https://github.com/scalameta/metals/edit/main/docs/editors/sublime.md",tags:[],version:"current",frontMatter:{id:"sublime",title:"Sublime Text"},sidebar:"docs",previous:{title:"Vim",permalink:"/metals/docs/editors/vim"},next:{title:"Emacs",permalink:"/metals/docs/editors/emacs"}},a={},c=[{value:"Requirements",id:"requirements",level:2},{value:"Installing the plugins",id:"installing-the-plugins",level:2},{value:"Importing a build",id:"importing-a-build",level:2},{value:"Server logs",id:"server-logs",level:2},{value:"Find symbol references",id:"find-symbol-references",level:2},{value:"Goto symbol in workspace",id:"goto-symbol-in-workspace",level:2},{value:"Manually trigger build import",id:"manually-trigger-build-import",level:2},{value:"Tweaking Sublime Text for a better productivity",id:"tweaking-sublime-text-for-a-better-productivity",level:2},{value:"Optional LSP client tweaks",id:"optional-lsp-client-tweaks",level:3},{value:"Additional key mappings",id:"additional-key-mappings",level:3},{value:"Keymapping for formatting document via scalafmt",id:"keymapping-for-formatting-document-via-scalafmt",level:4},{value:"Add key mapping for Goto symbol in workspace",id:"add-key-mapping-for-goto-symbol-in-workspace",level:3},{value:"Enabling auto-import on completion",id:"enabling-auto-import-on-completion",level:3},{value:"Using latest Metals SNAPSHOT",id:"using-latest-metals-snapshot",level:2},{value:"Files and Directories to include in your Gitignore",id:"files-and-directories-to-include-in-your-gitignore",level:2},{value:"Worksheets",id:"worksheets",level:2},{value:"Getting started with Worksheets",id:"getting-started-with-worksheets",level:3},{value:"Evaluations",id:"evaluations",level:3},{value:"Using dependencies in worksheets",id:"using-dependencies-in-worksheets",level:3},{value:"Troubleshooting",id:"troubleshooting",level:3},{value:"Running scalafix rules",id:"running-scalafix-rules",level:2}];function d(e){const n={a:"a",br:"br",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["Metals works with Sublime Text (build 4000 or later) thanks to the\n",(0,i.jsx)(n.a,{href:"https://github.com/sublimelsp/LSP",children:"sublimelsp/LSP"})," and ",(0,i.jsx)(n.a,{href:"https://github.com/scalameta/metals-sublime",children:"scalameta/metals-sublime"})," plugins."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/vJKP0T3.gif",alt:"Sublime Text demo"})}),"\n",(0,i.jsx)(n.h2,{id:"requirements",children:"Requirements"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Java 8, 11, 17 provided by OpenJDK or Oracle"}),". Eclipse OpenJ9 is not\nsupported, please make sure the ",(0,i.jsx)(n.code,{children:"JAVA_HOME"})," environment variable\npoints to a valid Java 8, 11 or 17 installation."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"macOS, Linux or Windows"}),". Metals is developed on many operating systems and\nevery PR is tested on Ubuntu, Windows and MacOS."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 2.13, 2.12, 2.11 and Scala 3"}),". Metals supports these Scala versions:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 2.13"}),":\n2.13.12, 2.13.11, 2.13.10, 2.13.9, 2.13.8, 2.13.7, 2.13.6, 2.13.5"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 2.12"}),":\n2.12.18, 2.12.17, 2.12.16, 2.12.15, 2.12.14, 2.12.13, 2.12.12, 2.12.11"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 2.11"}),":\n2.11.12"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 3"}),":\n3.3.1, 3.3.0, 3.2.2, 3.2.1, 3.2.0, 3.1.3, 3.1.2, 3.1.1, 3.1.0"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Note that 2.11.x support is deprecated and it will be removed in future releases.\nIt's recommended to upgrade to Scala 2.12 or Scala 2.13"}),"\n",(0,i.jsx)(n.h2,{id:"installing-the-plugins",children:"Installing the plugins"}),"\n",(0,i.jsx)(n.p,{children:"Install the following packages:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/sublimelsp/LSP",children:"sublimelsp/LSP"}),": Language Server Protocol support for Sublime Text.",(0,i.jsx)(n.br,{}),"\n",(0,i.jsx)(n.code,{children:"Command Palette (Cmd + Shift + P) > Install package > LSP"})]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/scalameta/metals-sublime",children:"scalameta/metals-sublime"}),": For automatic installation of metals and custom commands.\n",(0,i.jsx)(n.code,{children:"Command Palette (Cmd + Shift + P) > Install package > LSP-metals"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Finally restart sublime text."}),"\n",(0,i.jsxs)(n.p,{children:['Next, open "Preferences > Key Binding" and register ',(0,i.jsx)(n.code,{children:"F12"})," to trigger goto\ndefinition."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'[\n // ...\n {\n "keys": ["f12"],\n "command": "lsp_symbol_definition"\n }\n]\n'})}),"\n",(0,i.jsx)(n.h2,{id:"importing-a-build",children:"Importing a build"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/eUk30Zy.png",alt:"Build Import"})}),"\n",(0,i.jsxs)(n.p,{children:["Open Sublime in the base directory of your Scala project and it will then prompt you to import the build as long as you're using one of the ",(0,i.jsx)(n.a,{href:"https://scalameta.org/metals/docs/build-tools/overview.html",children:"supported build tools"}),'. Click "Import build" to start the installation step.']}),"\n",(0,i.jsx)(n.p,{children:"This starts the Metal language server but no functionality will work yet because the\nbuild has not been imported."}),"\n",(0,i.jsx)(n.p,{children:"This step can take a long time, especially the first time you run it in a new\nworkspace. The exact time depends on the complexity of the build and if the library dependencies are cached or need to be downloaded. For example, this step can take anywhere from 10 seconds in small cached builds up to 10-15 minutes in large un-cached builds."}),"\n",(0,i.jsx)(n.h2,{id:"server-logs",children:"Server logs"}),"\n",(0,i.jsxs)(n.p,{children:["For more detailed information about what is happening behind the scenes during\n",(0,i.jsx)(n.code,{children:"sbt bloopInstall"})," run ",(0,i.jsx)(n.code,{children:"lsp toggle server panel"})," in the command palette. You can optionally add key binding for this command."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/PilER2E.png",alt:"Server logs"})}),"\n",(0,i.jsxs)(n.p,{children:["Once the import step completes, compilation starts for your open ",(0,i.jsx)(n.code,{children:"*.scala"}),'\nfiles. Once the sources have compiled successfully, you can navigate the\nsources with "Goto definition" by pressing ',(0,i.jsx)(n.code,{children:"F12"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"find-symbol-references",children:"Find symbol references"}),"\n",(0,i.jsxs)(n.p,{children:["The default key binding is ",(0,i.jsx)(n.code,{children:"shift+F12"}),". If you use vim-bindings, you need to be\nin insert-mode."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/BJDkczD.gif",alt:"Find references"})}),"\n",(0,i.jsx)(n.h2,{id:"goto-symbol-in-workspace",children:"Goto symbol in workspace"}),"\n",(0,i.jsx)(n.p,{children:"You can search for symbols in your dependency source using the command palette."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/8X0XNi2.gif",alt:"workspace symbols"})}),"\n",(0,i.jsx)(n.h2,{id:"manually-trigger-build-import",children:"Manually trigger build import"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/LViPc95.png",alt:"Import build command"})}),"\n",(0,i.jsx)(n.p,{children:"You can optionally register a key binding for the command."}),"\n",(0,i.jsx)(n.h2,{id:"tweaking-sublime-text-for-a-better-productivity",children:"Tweaking Sublime Text for a better productivity"}),"\n",(0,i.jsx)(n.p,{children:"This paragraph contains a few tips & trick that can improve your daily productivity with Metals."}),"\n",(0,i.jsx)(n.h3,{id:"optional-lsp-client-tweaks",children:"Optional LSP client tweaks"}),"\n",(0,i.jsx)(n.p,{children:'If you prefer to only enable Metals completions\n(without mixing them with the default ones from Sublime) set the following setting\nin the "Preferences > Preferences: LSP Settings":'}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n // ...\n "only_show_lsp_completions": true,\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:'Also, if you prefer to show symbol references in Sublime\'s quick panel instead of the bottom panel\nset following setting in the "Preferences > Preferences: LSP Settings":'}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n // ...\n "show_references_in_quick_panel": true,\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/7tSiEfX.gif",alt:"Symbol references in the popup"})}),"\n",(0,i.jsx)(n.h3,{id:"additional-key-mappings",children:"Additional key mappings"}),"\n",(0,i.jsx)(n.p,{children:"You can set a few optional key mappings for enable useful action shortcuts and perform some tweaks for the completion popup."}),"\n",(0,i.jsx)(n.h4,{id:"keymapping-for-formatting-document-via-scalafmt",children:"Keymapping for formatting document via scalafmt"}),"\n",(0,i.jsxs)(n.p,{children:['Open "Preferences > Key Binding" and register ',(0,i.jsx)(n.code,{children:"ctrl+alt+l"})," to trigger formatting document.\ndefinition."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'[\n // ...\n {\n "keys": ["ctrl+alt+l"],\n "command": "lsp_format_document"\n }\n]\n'})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/wVjC1Ij.gif",alt:"Add key mapping for formatting document via scalafmt"})}),"\n",(0,i.jsx)(n.h3,{id:"add-key-mapping-for-goto-symbol-in-workspace",children:"Add key mapping for Goto symbol in workspace"}),"\n",(0,i.jsx)(n.p,{children:'This an optional step if you want to have a shortcut for looking up symbols in the workspace.\nOpen "Preferences > Key Binding" and add:'}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'[\n // ...\n { \n "keys": ["ctrl+t"], \n "command": "show_overlay",\n "args": {"overlay": "command_palette", "command": "lsp_workspace_symbols" }\n }\n]\n'})}),"\n",(0,i.jsx)(n.h3,{id:"enabling-auto-import-on-completion",children:"Enabling auto-import on completion"}),"\n",(0,i.jsx)(n.p,{children:'Metals can complete symbols from your workspace scope and automatically import them.\nBy default, however, if you hit "Enter" to select a completion, the LSP client will\ncomplete the class without importing it, but you can easy remap to use also "Enter" key.\nOpen "Preferences > Key Binding" and add:'}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'[ \n // ...\n { "keys": ["enter"], "command": "commit_completion", "context": [{ "key": "auto_complete_visible" } ] },\n { "keys": ["tab"], "command": "commit_completion", "context": [{ "key": "auto_complete_visible" } ] }\n]\n'})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/RDYx9mB.gif",alt:"Import after Enter key was hit"})}),"\n",(0,i.jsx)(n.h2,{id:"using-latest-metals-snapshot",children:"Using latest Metals SNAPSHOT"}),"\n",(0,i.jsxs)(n.p,{children:['Update the "server_version" setting to try out the latest pending Metals\nfeatures by accessing ',(0,i.jsx)(n.code,{children:"Preferences > Package Settings > LSP > Servers > LSP-metals"})]}),"\n",(0,i.jsxs)("table",{children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:"Version"}),(0,i.jsx)("th",{children:"Published"})]})}),(0,i.jsxs)("tbody",{children:[(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:"1.2.0+13-615add64-SNAPSHOT"}),(0,i.jsx)("td",{children:"15 Dec 2023 18:44"})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:"1.2.0+13-615add64-SNAPSHOT"}),(0,i.jsx)("td",{children:"15 Dec 2023 18:29"})]})]})]}),"\n",(0,i.jsx)(n.h2,{id:"files-and-directories-to-include-in-your-gitignore",children:"Files and Directories to include in your Gitignore"}),"\n",(0,i.jsxs)(n.p,{children:["The Metals server places logs and other files in the ",(0,i.jsx)(n.code,{children:".metals"})," directory. The\nBloop compile server places logs and compilation artifacts in the ",(0,i.jsx)(n.code,{children:".bloop"}),"\ndirectory. The Bloop plugin that generates Bloop configuration is added in the\n",(0,i.jsx)(n.code,{children:"metals.sbt"})," file, which is added at ",(0,i.jsx)(n.code,{children:"project/metals.sbt"})," as well as further\n",(0,i.jsx)(n.code,{children:"project"})," directories depending on how deep ",(0,i.jsx)(n.code,{children:"*.sbt"})," files need to be supported.\nTo support each ",(0,i.jsx)(n.code,{children:"*.sbt"})," file Metals needs to create an additional file at\n",(0,i.jsx)(n.code,{children:"./project/project/metals.sbt"})," relative to the sbt file.\nWorking with Ammonite scripts will place compiled scripts into the ",(0,i.jsx)(n.code,{children:".ammonite"})," directory.\nIt's recommended to exclude these directories and files\nfrom version control systems like git."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"# ~/.gitignore\n.metals/\n.bloop/\n.ammonite/\nmetals.sbt\n"})}),"\n",(0,i.jsx)(n.h2,{id:"worksheets",children:"Worksheets"}),"\n",(0,i.jsxs)(n.p,{children:["Worksheets are a great way to explore an api, try out an idea, or code\nup an example and quickly see the evaluated expression or result. Behind\nthe scenes worksheets are powered by the great work done in\n",(0,i.jsx)(n.a,{href:"https://scalameta.org/mdoc/",children:"mdoc"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"getting-started-with-worksheets",children:"Getting started with Worksheets"}),"\n",(0,i.jsxs)(n.p,{children:["To get started with a worksheet you can either use the ",(0,i.jsx)(n.code,{children:"metals.new-scala-file"}),"\ncommand and select ",(0,i.jsx)(n.em,{children:"Worksheet"})," or create a file called ",(0,i.jsx)(n.code,{children:"*.worksheet.sc"}),".\nThis format is important since this is what tells Metals that it's meant to be\ntreated as a worksheet and not just a Scala script. Where you create the\nscript also matters. If you'd like to use classes and values from your\nproject, you need to make sure the worksheet is created inside of your sources next to any existing Scala files.\ndirectory. You can still create a worksheet in other places, but you will\nonly have access to the standard library and your dependencies."]}),"\n",(0,i.jsx)(n.h3,{id:"evaluations",children:"Evaluations"}),"\n",(0,i.jsx)(n.p,{children:"After saving you'll see the result of the expression as a comment as the end of the line.\nYou may not see the full result for example if it's too long, so you are also\nable to hover on the comment to expand."}),"\n",(0,i.jsxs)(n.p,{children:["Keep in mind that you don't need to wrap your code in an ",(0,i.jsx)(n.code,{children:"object"}),". In worksheets\neverything can be evaluated at the top level."]}),"\n",(0,i.jsx)(n.h3,{id:"using-dependencies-in-worksheets",children:"Using dependencies in worksheets"}),"\n",(0,i.jsx)(n.p,{children:"You are able to include an external dependency in your worksheet by including\nit in one of the following two ways."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-scala",children:"// $dep.`organisation`::artifact:version` style\nimport $dep.`com.lihaoyi::scalatags:0.7.0`\n\n// $ivy.`organisation::artifact:version` style\nimport $ivy.`com.lihaoyi::scalatags:0.7.0`\n"})}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"::"})," is the same as ",(0,i.jsx)(n.code,{children:"%%"})," in sbt, which will append the current Scala binary version\nto the artifact name."]}),"\n",(0,i.jsxs)(n.p,{children:["You can also import ",(0,i.jsx)(n.code,{children:"scalac"})," options in a special ",(0,i.jsx)(n.code,{children:"$scalac"})," import like below:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-scala",children:"import $scalac.`-Ywarn-unused`\n"})}),"\n",(0,i.jsx)(n.h3,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,i.jsx)(n.p,{children:"Since worksheets are not standard Scala files, you may run into issues with some constructs.\nFor example, you may see an error like this:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"value classes may not be a member of another class - mdoc\n"})}),"\n",(0,i.jsx)(n.p,{children:"This means that one of the classes defined in the worksheet extends AnyVal, which is\nnot currently supported. You can work around this by moving the class to a separate file or removing\nthe AnyVal parent."}),"\n",(0,i.jsx)(n.h2,{id:"running-scalafix-rules",children:"Running scalafix rules"}),"\n",(0,i.jsxs)(n.p,{children:["Scalafix allows users to specify some refactoring and linting rules that can be applied to your\ncodebase. Please checkout the ",(0,i.jsx)(n.a,{href:"https://scalacenter.github.io/scalafix",children:"scalafix website"})," for more information."]}),"\n",(0,i.jsxs)(n.p,{children:["Since Metals v0.11.7 it's now possible to run scalafix rules using a special\ncommand ",(0,i.jsx)(n.code,{children:"metals.scalafix-run"}),".\nThis should run all the rules defined in your ",(0,i.jsx)(n.code,{children:".scalafix.conf"})," file. All built-in rules\nand the ",(0,i.jsx)(n.a,{href:"https://scalacenter.github.io/scalafix/docs/rules/community-rules.html#hygiene-rules",children:"community hygiene ones"})," can\nbe run without any additional settings. However, for all the other rules users need to\nadd an additional dependency in the ",(0,i.jsx)(n.code,{children:"metals.scalafixRulesDependencies"})," user setting.\nThose rules need to be in form of strings such as ",(0,i.jsx)(n.code,{children:"com.github.liancheng::organize-imports:0.6.0"}),", which\nfollows the same convention as ",(0,i.jsx)(n.a,{href:"https://get-coursier.io/",children:"coursier dependencies"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"A sample scalafix configuration can be seen below:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-hocon",children:'rules = [\n OrganizeImports,\n ExplicitResultTypes,\n RemoveUnused\n]\n\nRemoveUnused.imports = false\n\nOrganizeImports.groupedImports = Explode\nOrganizeImports.expandRelative = true\nOrganizeImports.removeUnused = true\nOrganizeImports.groups = [\n "re:javax?\\."\n "scala."\n "scala.meta."\n "*"\n]\n\n'})})]})}function h(e={}){const{wrapper:n}={...(0,t.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},1151:(e,n,s)=>{s.d(n,{Z:()=>r,a:()=>o});var i=s(7294);const t={},l=i.createContext(t);function o(e){const n=i.useContext(l);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),i.createElement(l.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
+"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4782],{908:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>o,default:()=>h,frontMatter:()=>l,metadata:()=>r,toc:()=>c});var i=s(5893),t=s(1151);const l={id:"sublime",title:"Sublime Text"},o=void 0,r={id:"editors/sublime",title:"Sublime Text",description:"Metals works with Sublime Text (build 4000 or later) thanks to the",source:"@site/target/docs/editors/sublime.md",sourceDirName:"editors",slug:"/editors/sublime",permalink:"/metals/docs/editors/sublime",draft:!1,unlisted:!1,editUrl:"https://github.com/scalameta/metals/edit/main/docs/editors/sublime.md",tags:[],version:"current",frontMatter:{id:"sublime",title:"Sublime Text"},sidebar:"docs",previous:{title:"Vim",permalink:"/metals/docs/editors/vim"},next:{title:"Emacs",permalink:"/metals/docs/editors/emacs"}},a={},c=[{value:"Requirements",id:"requirements",level:2},{value:"Installing the plugins",id:"installing-the-plugins",level:2},{value:"Importing a build",id:"importing-a-build",level:2},{value:"Server logs",id:"server-logs",level:2},{value:"Find symbol references",id:"find-symbol-references",level:2},{value:"Goto symbol in workspace",id:"goto-symbol-in-workspace",level:2},{value:"Manually trigger build import",id:"manually-trigger-build-import",level:2},{value:"Tweaking Sublime Text for a better productivity",id:"tweaking-sublime-text-for-a-better-productivity",level:2},{value:"Optional LSP client tweaks",id:"optional-lsp-client-tweaks",level:3},{value:"Additional key mappings",id:"additional-key-mappings",level:3},{value:"Keymapping for formatting document via scalafmt",id:"keymapping-for-formatting-document-via-scalafmt",level:4},{value:"Add key mapping for Goto symbol in workspace",id:"add-key-mapping-for-goto-symbol-in-workspace",level:3},{value:"Enabling auto-import on completion",id:"enabling-auto-import-on-completion",level:3},{value:"Using latest Metals SNAPSHOT",id:"using-latest-metals-snapshot",level:2},{value:"Files and Directories to include in your Gitignore",id:"files-and-directories-to-include-in-your-gitignore",level:2},{value:"Worksheets",id:"worksheets",level:2},{value:"Getting started with Worksheets",id:"getting-started-with-worksheets",level:3},{value:"Evaluations",id:"evaluations",level:3},{value:"Using dependencies in worksheets",id:"using-dependencies-in-worksheets",level:3},{value:"Troubleshooting",id:"troubleshooting",level:3},{value:"Running scalafix rules",id:"running-scalafix-rules",level:2}];function d(e){const n={a:"a",br:"br",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["Metals works with Sublime Text (build 4000 or later) thanks to the\n",(0,i.jsx)(n.a,{href:"https://github.com/sublimelsp/LSP",children:"sublimelsp/LSP"})," and ",(0,i.jsx)(n.a,{href:"https://github.com/scalameta/metals-sublime",children:"scalameta/metals-sublime"})," plugins."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/vJKP0T3.gif",alt:"Sublime Text demo"})}),"\n",(0,i.jsx)(n.h2,{id:"requirements",children:"Requirements"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Java 8, 11, 17 provided by OpenJDK or Oracle"}),". Eclipse OpenJ9 is not\nsupported, please make sure the ",(0,i.jsx)(n.code,{children:"JAVA_HOME"})," environment variable\npoints to a valid Java 8, 11 or 17 installation."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"macOS, Linux or Windows"}),". Metals is developed on many operating systems and\nevery PR is tested on Ubuntu, Windows and MacOS."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 2.13, 2.12, 2.11 and Scala 3"}),". Metals supports these Scala versions:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 2.13"}),":\n2.13.12, 2.13.11, 2.13.10, 2.13.9, 2.13.8, 2.13.7, 2.13.6, 2.13.5"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 2.12"}),":\n2.12.18, 2.12.17, 2.12.16, 2.12.15, 2.12.14, 2.12.13, 2.12.12, 2.12.11"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 2.11"}),":\n2.11.12"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Scala 3"}),":\n3.3.1, 3.3.0, 3.2.2, 3.2.1, 3.2.0, 3.1.3, 3.1.2, 3.1.1, 3.1.0"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Note that 2.11.x support is deprecated and it will be removed in future releases.\nIt's recommended to upgrade to Scala 2.12 or Scala 2.13"}),"\n",(0,i.jsx)(n.h2,{id:"installing-the-plugins",children:"Installing the plugins"}),"\n",(0,i.jsx)(n.p,{children:"Install the following packages:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/sublimelsp/LSP",children:"sublimelsp/LSP"}),": Language Server Protocol support for Sublime Text.",(0,i.jsx)(n.br,{}),"\n",(0,i.jsx)(n.code,{children:"Command Palette (Cmd + Shift + P) > Install package > LSP"})]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/scalameta/metals-sublime",children:"scalameta/metals-sublime"}),": For automatic installation of metals and custom commands.\n",(0,i.jsx)(n.code,{children:"Command Palette (Cmd + Shift + P) > Install package > LSP-metals"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Finally restart sublime text."}),"\n",(0,i.jsxs)(n.p,{children:['Next, open "Preferences > Key Binding" and register ',(0,i.jsx)(n.code,{children:"F12"})," to trigger goto\ndefinition."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'[\n // ...\n {\n "keys": ["f12"],\n "command": "lsp_symbol_definition"\n }\n]\n'})}),"\n",(0,i.jsx)(n.h2,{id:"importing-a-build",children:"Importing a build"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/eUk30Zy.png",alt:"Build Import"})}),"\n",(0,i.jsxs)(n.p,{children:["Open Sublime in the base directory of your Scala project and it will then prompt you to import the build as long as you're using one of the ",(0,i.jsx)(n.a,{href:"https://scalameta.org/metals/docs/build-tools/overview.html",children:"supported build tools"}),'. Click "Import build" to start the installation step.']}),"\n",(0,i.jsx)(n.p,{children:"This starts the Metal language server but no functionality will work yet because the\nbuild has not been imported."}),"\n",(0,i.jsx)(n.p,{children:"This step can take a long time, especially the first time you run it in a new\nworkspace. The exact time depends on the complexity of the build and if the library dependencies are cached or need to be downloaded. For example, this step can take anywhere from 10 seconds in small cached builds up to 10-15 minutes in large un-cached builds."}),"\n",(0,i.jsx)(n.h2,{id:"server-logs",children:"Server logs"}),"\n",(0,i.jsxs)(n.p,{children:["For more detailed information about what is happening behind the scenes during\n",(0,i.jsx)(n.code,{children:"sbt bloopInstall"})," run ",(0,i.jsx)(n.code,{children:"lsp toggle server panel"})," in the command palette. You can optionally add key binding for this command."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/PilER2E.png",alt:"Server logs"})}),"\n",(0,i.jsxs)(n.p,{children:["Once the import step completes, compilation starts for your open ",(0,i.jsx)(n.code,{children:"*.scala"}),'\nfiles. Once the sources have compiled successfully, you can navigate the\nsources with "Goto definition" by pressing ',(0,i.jsx)(n.code,{children:"F12"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"find-symbol-references",children:"Find symbol references"}),"\n",(0,i.jsxs)(n.p,{children:["The default key binding is ",(0,i.jsx)(n.code,{children:"shift+F12"}),". If you use vim-bindings, you need to be\nin insert-mode."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/BJDkczD.gif",alt:"Find references"})}),"\n",(0,i.jsx)(n.h2,{id:"goto-symbol-in-workspace",children:"Goto symbol in workspace"}),"\n",(0,i.jsx)(n.p,{children:"You can search for symbols in your dependency source using the command palette."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/8X0XNi2.gif",alt:"workspace symbols"})}),"\n",(0,i.jsx)(n.h2,{id:"manually-trigger-build-import",children:"Manually trigger build import"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/LViPc95.png",alt:"Import build command"})}),"\n",(0,i.jsx)(n.p,{children:"You can optionally register a key binding for the command."}),"\n",(0,i.jsx)(n.h2,{id:"tweaking-sublime-text-for-a-better-productivity",children:"Tweaking Sublime Text for a better productivity"}),"\n",(0,i.jsx)(n.p,{children:"This paragraph contains a few tips & trick that can improve your daily productivity with Metals."}),"\n",(0,i.jsx)(n.h3,{id:"optional-lsp-client-tweaks",children:"Optional LSP client tweaks"}),"\n",(0,i.jsx)(n.p,{children:'If you prefer to only enable Metals completions\n(without mixing them with the default ones from Sublime) set the following setting\nin the "Preferences > Preferences: LSP Settings":'}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n // ...\n "only_show_lsp_completions": true,\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:'Also, if you prefer to show symbol references in Sublime\'s quick panel instead of the bottom panel\nset following setting in the "Preferences > Preferences: LSP Settings":'}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n // ...\n "show_references_in_quick_panel": true,\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/7tSiEfX.gif",alt:"Symbol references in the popup"})}),"\n",(0,i.jsx)(n.h3,{id:"additional-key-mappings",children:"Additional key mappings"}),"\n",(0,i.jsx)(n.p,{children:"You can set a few optional key mappings for enable useful action shortcuts and perform some tweaks for the completion popup."}),"\n",(0,i.jsx)(n.h4,{id:"keymapping-for-formatting-document-via-scalafmt",children:"Keymapping for formatting document via scalafmt"}),"\n",(0,i.jsxs)(n.p,{children:['Open "Preferences > Key Binding" and register ',(0,i.jsx)(n.code,{children:"ctrl+alt+l"})," to trigger formatting document.\ndefinition."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'[\n // ...\n {\n "keys": ["ctrl+alt+l"],\n "command": "lsp_format_document"\n }\n]\n'})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/wVjC1Ij.gif",alt:"Add key mapping for formatting document via scalafmt"})}),"\n",(0,i.jsx)(n.h3,{id:"add-key-mapping-for-goto-symbol-in-workspace",children:"Add key mapping for Goto symbol in workspace"}),"\n",(0,i.jsx)(n.p,{children:'This an optional step if you want to have a shortcut for looking up symbols in the workspace.\nOpen "Preferences > Key Binding" and add:'}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'[\n // ...\n { \n "keys": ["ctrl+t"], \n "command": "show_overlay",\n "args": {"overlay": "command_palette", "command": "lsp_workspace_symbols" }\n }\n]\n'})}),"\n",(0,i.jsx)(n.h3,{id:"enabling-auto-import-on-completion",children:"Enabling auto-import on completion"}),"\n",(0,i.jsx)(n.p,{children:'Metals can complete symbols from your workspace scope and automatically import them.\nBy default, however, if you hit "Enter" to select a completion, the LSP client will\ncomplete the class without importing it, but you can easy remap to use also "Enter" key.\nOpen "Preferences > Key Binding" and add:'}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'[ \n // ...\n { "keys": ["enter"], "command": "commit_completion", "context": [{ "key": "auto_complete_visible" } ] },\n { "keys": ["tab"], "command": "commit_completion", "context": [{ "key": "auto_complete_visible" } ] }\n]\n'})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://i.imgur.com/RDYx9mB.gif",alt:"Import after Enter key was hit"})}),"\n",(0,i.jsx)(n.h2,{id:"using-latest-metals-snapshot",children:"Using latest Metals SNAPSHOT"}),"\n",(0,i.jsxs)(n.p,{children:['Update the "server_version" setting to try out the latest pending Metals\nfeatures by accessing ',(0,i.jsx)(n.code,{children:"Preferences > Package Settings > LSP > Servers > LSP-metals"})]}),"\n",(0,i.jsxs)("table",{children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:"Version"}),(0,i.jsx)("th",{children:"Published"})]})}),(0,i.jsxs)("tbody",{children:[(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:"1.2.0"}),(0,i.jsx)("td",{children:"12 Dec 2023 10:36"})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:"1.2.0+14-72692d2c-SNAPSHOT"}),(0,i.jsx)("td",{children:"18 Dec 2023 10:59"})]})]})]}),"\n",(0,i.jsx)(n.h2,{id:"files-and-directories-to-include-in-your-gitignore",children:"Files and Directories to include in your Gitignore"}),"\n",(0,i.jsxs)(n.p,{children:["The Metals server places logs and other files in the ",(0,i.jsx)(n.code,{children:".metals"})," directory. The\nBloop compile server places logs and compilation artifacts in the ",(0,i.jsx)(n.code,{children:".bloop"}),"\ndirectory. The Bloop plugin that generates Bloop configuration is added in the\n",(0,i.jsx)(n.code,{children:"metals.sbt"})," file, which is added at ",(0,i.jsx)(n.code,{children:"project/metals.sbt"})," as well as further\n",(0,i.jsx)(n.code,{children:"project"})," directories depending on how deep ",(0,i.jsx)(n.code,{children:"*.sbt"})," files need to be supported.\nTo support each ",(0,i.jsx)(n.code,{children:"*.sbt"})," file Metals needs to create an additional file at\n",(0,i.jsx)(n.code,{children:"./project/project/metals.sbt"})," relative to the sbt file.\nWorking with Ammonite scripts will place compiled scripts into the ",(0,i.jsx)(n.code,{children:".ammonite"})," directory.\nIt's recommended to exclude these directories and files\nfrom version control systems like git."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"# ~/.gitignore\n.metals/\n.bloop/\n.ammonite/\nmetals.sbt\n"})}),"\n",(0,i.jsx)(n.h2,{id:"worksheets",children:"Worksheets"}),"\n",(0,i.jsxs)(n.p,{children:["Worksheets are a great way to explore an api, try out an idea, or code\nup an example and quickly see the evaluated expression or result. Behind\nthe scenes worksheets are powered by the great work done in\n",(0,i.jsx)(n.a,{href:"https://scalameta.org/mdoc/",children:"mdoc"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"getting-started-with-worksheets",children:"Getting started with Worksheets"}),"\n",(0,i.jsxs)(n.p,{children:["To get started with a worksheet you can either use the ",(0,i.jsx)(n.code,{children:"metals.new-scala-file"}),"\ncommand and select ",(0,i.jsx)(n.em,{children:"Worksheet"})," or create a file called ",(0,i.jsx)(n.code,{children:"*.worksheet.sc"}),".\nThis format is important since this is what tells Metals that it's meant to be\ntreated as a worksheet and not just a Scala script. Where you create the\nscript also matters. If you'd like to use classes and values from your\nproject, you need to make sure the worksheet is created inside of your sources next to any existing Scala files.\ndirectory. You can still create a worksheet in other places, but you will\nonly have access to the standard library and your dependencies."]}),"\n",(0,i.jsx)(n.h3,{id:"evaluations",children:"Evaluations"}),"\n",(0,i.jsx)(n.p,{children:"After saving you'll see the result of the expression as a comment as the end of the line.\nYou may not see the full result for example if it's too long, so you are also\nable to hover on the comment to expand."}),"\n",(0,i.jsxs)(n.p,{children:["Keep in mind that you don't need to wrap your code in an ",(0,i.jsx)(n.code,{children:"object"}),". In worksheets\neverything can be evaluated at the top level."]}),"\n",(0,i.jsx)(n.h3,{id:"using-dependencies-in-worksheets",children:"Using dependencies in worksheets"}),"\n",(0,i.jsx)(n.p,{children:"You are able to include an external dependency in your worksheet by including\nit in one of the following two ways."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-scala",children:"// $dep.`organisation`::artifact:version` style\nimport $dep.`com.lihaoyi::scalatags:0.7.0`\n\n// $ivy.`organisation::artifact:version` style\nimport $ivy.`com.lihaoyi::scalatags:0.7.0`\n"})}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"::"})," is the same as ",(0,i.jsx)(n.code,{children:"%%"})," in sbt, which will append the current Scala binary version\nto the artifact name."]}),"\n",(0,i.jsxs)(n.p,{children:["You can also import ",(0,i.jsx)(n.code,{children:"scalac"})," options in a special ",(0,i.jsx)(n.code,{children:"$scalac"})," import like below:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-scala",children:"import $scalac.`-Ywarn-unused`\n"})}),"\n",(0,i.jsx)(n.h3,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,i.jsx)(n.p,{children:"Since worksheets are not standard Scala files, you may run into issues with some constructs.\nFor example, you may see an error like this:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"value classes may not be a member of another class - mdoc\n"})}),"\n",(0,i.jsx)(n.p,{children:"This means that one of the classes defined in the worksheet extends AnyVal, which is\nnot currently supported. You can work around this by moving the class to a separate file or removing\nthe AnyVal parent."}),"\n",(0,i.jsx)(n.h2,{id:"running-scalafix-rules",children:"Running scalafix rules"}),"\n",(0,i.jsxs)(n.p,{children:["Scalafix allows users to specify some refactoring and linting rules that can be applied to your\ncodebase. Please checkout the ",(0,i.jsx)(n.a,{href:"https://scalacenter.github.io/scalafix",children:"scalafix website"})," for more information."]}),"\n",(0,i.jsxs)(n.p,{children:["Since Metals v0.11.7 it's now possible to run scalafix rules using a special\ncommand ",(0,i.jsx)(n.code,{children:"metals.scalafix-run"}),".\nThis should run all the rules defined in your ",(0,i.jsx)(n.code,{children:".scalafix.conf"})," file. All built-in rules\nand the ",(0,i.jsx)(n.a,{href:"https://scalacenter.github.io/scalafix/docs/rules/community-rules.html#hygiene-rules",children:"community hygiene ones"})," can\nbe run without any additional settings. However, for all the other rules users need to\nadd an additional dependency in the ",(0,i.jsx)(n.code,{children:"metals.scalafixRulesDependencies"})," user setting.\nThose rules need to be in form of strings such as ",(0,i.jsx)(n.code,{children:"com.github.liancheng::organize-imports:0.6.0"}),", which\nfollows the same convention as ",(0,i.jsx)(n.a,{href:"https://get-coursier.io/",children:"coursier dependencies"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"A sample scalafix configuration can be seen below:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-hocon",children:'rules = [\n OrganizeImports,\n ExplicitResultTypes,\n RemoveUnused\n]\n\nRemoveUnused.imports = false\n\nOrganizeImports.groupedImports = Explode\nOrganizeImports.expandRelative = true\nOrganizeImports.removeUnused = true\nOrganizeImports.groups = [\n "re:javax?\\."\n "scala."\n "scala.meta."\n "*"\n]\n\n'})})]})}function h(e={}){const{wrapper:n}={...(0,t.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},1151:(e,n,s)=>{s.d(n,{Z:()=>r,a:()=>o});var i=s(7294);const t={},l=i.createContext(t);function o(e){const n=i.useContext(l);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),i.createElement(l.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/94015cb6.910478de.js b/assets/js/94015cb6.aebd4f14.js
similarity index 69%
rename from assets/js/94015cb6.910478de.js
rename to assets/js/94015cb6.aebd4f14.js
index 1b9dd9cfd5d..fbc7a8dade5 100644
--- a/assets/js/94015cb6.910478de.js
+++ b/assets/js/94015cb6.aebd4f14.js
@@ -1 +1 @@
-"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6520],{9913:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>r,contentTitle:()=>i,default:()=>p,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var t=s(5893),a=s(1151);const o={id:"emacs",title:"Emacs"},i=void 0,l={id:"editors/emacs",title:"Emacs",description:"Metals works in Emacs thanks to the",source:"@site/target/docs/editors/emacs.md",sourceDirName:"editors",slug:"/editors/emacs",permalink:"/metals/docs/editors/emacs",draft:!1,unlisted:!1,editUrl:"https://github.com/scalameta/metals/edit/main/docs/editors/emacs.md",tags:[],version:"current",frontMatter:{id:"emacs",title:"Emacs"},sidebar:"docs",previous:{title:"Sublime Text",permalink:"/metals/docs/editors/sublime"},next:{title:"Online IDEs",permalink:"/metals/docs/editors/online-ides"}},r={},c=[{value:"Requirements",id:"requirements",level:2},{value:"Installation",id:"installation",level:2},{value:"Importing a build",id:"importing-a-build",level:2},{value:"Custom sbt launcher",id:"custom-sbt-launcher",level:3},{value:"Speeding up import",id:"speeding-up-import",level:3},{value:"Importing changes",id:"importing-changes",level:3},{value:"LSP Tips",id:"lsp-tips",level:2},{value:"Show navigable stack trace",id:"show-navigable-stack-trace",level:3},{value:"Reference",id:"reference",level:3},{value:"Manually trigger build import",id:"manually-trigger-build-import",level:2},{value:"Run doctor",id:"run-doctor",level:2},{value:"eglot",id:"eglot",level:3},{value:"Files and Directories to include in your Gitignore",id:"files-and-directories-to-include-in-your-gitignore",level:2},{value:"Worksheets",id:"worksheets",level:2},{value:"Getting started with Worksheets",id:"getting-started-with-worksheets",level:3},{value:"Evaluations",id:"evaluations",level:3},{value:"Using dependencies in worksheets",id:"using-dependencies-in-worksheets",level:3},{value:"Troubleshooting",id:"troubleshooting",level:3},{value:"Running scalafix rules",id:"running-scalafix-rules",level:2}];function d(e){const n={a:"a",blockquote:"blockquote",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:["Metals works in Emacs thanks to the\n",(0,t.jsx)(n.a,{href:"https://github.com/emacs-lsp/lsp-mode",children:(0,t.jsx)(n.code,{children:"lsp-mode"})})," package (another option is the ",(0,t.jsx)(n.a,{href:"#eglot",children:"Eglot"})," package)."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/KJQLMZ7.gif",alt:"Emacs demo"})}),"\n",(0,t.jsx)(n.h2,{id:"requirements",children:"Requirements"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Java 8, 11, 17 provided by OpenJDK or Oracle"}),". Eclipse OpenJ9 is not\nsupported, please make sure the ",(0,t.jsx)(n.code,{children:"JAVA_HOME"})," environment variable\npoints to a valid Java 8, 11 or 17 installation."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"macOS, Linux or Windows"}),". Metals is developed on many operating systems and\nevery PR is tested on Ubuntu, Windows and MacOS."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Scala 2.13, 2.12, 2.11 and Scala 3"}),". Metals supports these Scala versions:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Scala 2.13"}),":\n2.13.12, 2.13.11, 2.13.10, 2.13.9, 2.13.8, 2.13.7, 2.13.6, 2.13.5"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Scala 2.12"}),":\n2.12.18, 2.12.17, 2.12.16, 2.12.15, 2.12.14, 2.12.13, 2.12.12, 2.12.11"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Scala 2.11"}),":\n2.11.12"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Scala 3"}),":\n3.3.1, 3.3.0, 3.2.2, 3.2.1, 3.2.0, 3.1.3, 3.1.2, 3.1.1, 3.1.0"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Note that 2.11.x support is deprecated and it will be removed in future releases.\nIt's recommended to upgrade to Scala 2.12 or Scala 2.13"}),"\n",(0,t.jsx)(n.h2,{id:"installation",children:"Installation"}),"\n",(0,t.jsxs)(n.p,{children:["To use Metals in Emacs, place this snippet in your Emacs configuration (for example .emacs.d/init.el) to load\n",(0,t.jsx)(n.code,{children:"lsp-mode"})," along with its dependencies:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-elisp",children:'(require \'package)\n\n;; Add melpa to your packages repositories\n(add-to-list \'package-archives \'("melpa" . "https://melpa.org/packages/") t)\n\n(package-initialize)\n\n;; Install use-package if not already installed\n(unless (package-installed-p \'use-package)\n (package-refresh-contents)\n (package-install \'use-package))\n\n(require \'use-package)\n\n;; Enable defer and ensure by default for use-package\n;; Keep auto-save/backup files separate from source code: https://github.com/scalameta/metals/issues/1027\n(setq use-package-always-defer t\n use-package-always-ensure t\n backup-directory-alist `((".*" . ,temporary-file-directory))\n auto-save-file-name-transforms `((".*" ,temporary-file-directory t)))\n\n;; Enable scala-mode for highlighting, indentation and motion commands\n(use-package scala-mode\n :interpreter ("scala" . scala-mode))\n\n;; Enable sbt mode for executing sbt commands\n(use-package sbt-mode\n :commands sbt-start sbt-command\n :config\n ;; WORKAROUND: https://github.com/ensime/emacs-sbt-mode/issues/31\n ;; allows using SPACE when in the minibuffer\n (substitute-key-definition\n \'minibuffer-complete-word\n \'self-insert-command\n minibuffer-local-completion-map)\n ;; sbt-supershell kills sbt-mode: https://github.com/hvesalai/emacs-sbt-mode/issues/152\n (setq sbt:program-options \'("-Dsbt.supershell=false")))\n\n;; Enable nice rendering of diagnostics like compile errors.\n(use-package flycheck\n :init (global-flycheck-mode))\n\n(use-package lsp-mode\n ;; Optional - enable lsp-mode automatically in scala files\n ;; You could also swap out lsp for lsp-deffered in order to defer loading\n :hook (scala-mode . lsp)\n (lsp-mode . lsp-lens-mode)\n :config\n ;; Uncomment following section if you would like to tune lsp-mode performance according to\n ;; https://emacs-lsp.github.io/lsp-mode/page/performance/\n ;; (setq gc-cons-threshold 100000000) ;; 100mb\n ;; (setq read-process-output-max (* 1024 1024)) ;; 1mb\n ;; (setq lsp-idle-delay 0.500)\n ;; (setq lsp-log-io nil)\n ;; (setq lsp-completion-provider :capf)\n (setq lsp-prefer-flymake nil)\n ;; Makes LSP shutdown the metals server when all buffers in the project are closed.\n ;; https://emacs-lsp.github.io/lsp-mode/page/settings/mode/#lsp-keep-workspace-alive\n (setq lsp-keep-workspace-alive nil))\n\n;; Add metals backend for lsp-mode\n(use-package lsp-metals)\n\n;; Enable nice rendering of documentation on hover\n;; Warning: on some systems this package can reduce your emacs responsiveness significally.\n;; (See: https://emacs-lsp.github.io/lsp-mode/page/performance/)\n;; In that case you have to not only disable this but also remove from the packages since\n;; lsp-mode can activate it automatically.\n(use-package lsp-ui)\n\n;; lsp-mode supports snippets, but in order for them to work you need to use yasnippet\n;; If you don\'t want to use snippets set lsp-enable-snippet to nil in your lsp-mode settings\n;; to avoid odd behavior with snippets and indentation\n(use-package yasnippet)\n\n;; Use company-capf as a completion provider.\n;;\n;; To Company-lsp users:\n;; Company-lsp is no longer maintained and has been removed from MELPA.\n;; Please migrate to company-capf.\n(use-package company\n :hook (scala-mode . company-mode)\n :config\n (setq lsp-completion-provider :capf))\n\n;; Posframe is a pop-up tool that must be manually installed for dap-mode\n(use-package posframe)\n\n;; Use the Debug Adapter Protocol for running tests and debugging\n(use-package dap-mode\n :hook\n (lsp-mode . dap-mode)\n (lsp-mode . dap-ui-mode))\n'})}),"\n",(0,t.jsxs)(n.blockquote,{children:["\n",(0,t.jsxs)(n.p,{children:["You may need to disable other packages like ",(0,t.jsx)(n.code,{children:"ensime"})," or sbt server to prevent\nconflicts with Metals."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Next you have to install metals server. Emacs can do it for you when ",(0,t.jsx)(n.code,{children:"lsp-mode"}),"\nis enabled in a scala buffer or via ",(0,t.jsx)(n.code,{children:"lsp-install-server"})," command. Also you can\ndo it manually executing ",(0,t.jsx)(n.code,{children:"coursier install metals"})," and configuring ",(0,t.jsx)(n.code,{children:"$PATH"}),"\nvariable properly."]}),"\n",(0,t.jsx)(n.h2,{id:"importing-a-build",children:"Importing a build"}),"\n",(0,t.jsxs)(n.p,{children:['The first time you open Metals in a new workspace it prompts you to import the build.\nType "Import build" or press ',(0,t.jsx)(n.code,{children:"Tab"}),' and select "Import build" to start the installation step.']}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/UdwMQFk.png",alt:"Import build"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:'"Not now" disables this prompt for 2 minutes.'}),"\n",(0,t.jsxs)(n.li,{children:['"Don\'t show again" disables this prompt forever, use ',(0,t.jsx)(n.code,{children:"rm -rf .metals/"})," to re-enable\nthe prompt."]}),"\n",(0,t.jsxs)(n.li,{children:["Use ",(0,t.jsx)(n.code,{children:"tail -f .metals/metals.log"})," to watch the build import progress."]}),"\n",(0,t.jsxs)(n.li,{children:["Behind the scenes, Metals uses ",(0,t.jsx)(n.a,{href:"https://scalacenter.github.io/bloop/",children:"Bloop"})," to\nimport sbt builds, but you don't need Bloop installed on your machine to run this step."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Once the import step completes, compilation starts for your open ",(0,t.jsx)(n.code,{children:"*.scala"}),"\nfiles."]}),"\n",(0,t.jsx)(n.p,{children:"Once the sources have compiled successfully, you can navigate the codebase with\ngoto definition."}),"\n",(0,t.jsx)(n.h3,{id:"custom-sbt-launcher",children:"Custom sbt launcher"}),"\n",(0,t.jsxs)(n.p,{children:["By default, Metals runs an embedded ",(0,t.jsx)(n.code,{children:"sbt-launch.jar"})," launcher that respects ",(0,t.jsx)(n.code,{children:".sbtopts"})," and ",(0,t.jsx)(n.code,{children:".jvmopts"}),".\nHowever, the environment variables ",(0,t.jsx)(n.code,{children:"SBT_OPTS"})," and ",(0,t.jsx)(n.code,{children:"JAVA_OPTS"})," are not respected."]}),"\n",(0,t.jsxs)(n.p,{children:["Update the server property ",(0,t.jsx)(n.code,{children:"-Dmetals.sbt-script=/path/to/sbt"})," to use a custom\n",(0,t.jsx)(n.code,{children:"sbt"})," script instead of the default Metals launcher if you need further\ncustomizations like reading environment variables."]}),"\n",(0,t.jsx)(n.h3,{id:"speeding-up-import",children:"Speeding up import"}),"\n",(0,t.jsx)(n.p,{children:'The "Import build" step can take a long time, especially the first time you\nrun it in a new build. The exact time depends on the complexity of the build and\nif library dependencies need to be downloaded. For example, this step can take\neverything from 10 seconds in small cached builds up to 10-15 minutes in large\nuncached builds.'}),"\n",(0,t.jsxs)(n.p,{children:["Consult the ",(0,t.jsx)(n.a,{href:"https://scalacenter.github.io/bloop/docs/build-tools/sbt#speeding-up-build-export",children:"Bloop documentation"}),"\nto learn how to speed up build import."]}),"\n",(0,t.jsx)(n.h3,{id:"importing-changes",children:"Importing changes"}),"\n",(0,t.jsxs)(n.p,{children:["When you change ",(0,t.jsx)(n.code,{children:"build.sbt"})," or sources under ",(0,t.jsx)(n.code,{children:"project/"}),", you will be prompted to\nre-import the build."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/UFK0p8i.png",alt:"Import sbt changes"})}),"\n",(0,t.jsx)(n.h2,{id:"lsp-tips",children:"LSP Tips"}),"\n",(0,t.jsx)(n.h3,{id:"show-navigable-stack-trace",children:"Show navigable stack trace"}),"\n",(0,t.jsxs)(n.p,{children:["You can annotate your stack trace with code lenses (which requires the\nfollowing bit of configuration mentioned earlier: ",(0,t.jsx)(n.code,{children:"(lsp-mode . lsp-lens-mode)"}),").\nThese allow you to run actions from your code."]}),"\n",(0,t.jsx)(n.p,{children:"One of these actions allow you to navigate your stack trace."}),"\n",(0,t.jsxs)(n.p,{children:["You can annotate any stack trace by marking a stack trace with your\nregion and using ",(0,t.jsx)(n.code,{children:"M-x lsp-metals-analyze-stacktrace"})," on it."]}),"\n",(0,t.jsx)(n.p,{children:'This will open a new Scala buffer that has code lenses annotations:\njust click on the small "open" annotation to navigate to the source\ncode relative to your stack trace.'}),"\n",(0,t.jsxs)(n.p,{children:["This will work as long as the buffer you are marking your stack trace\non exists within the project directory tracked by ",(0,t.jsx)(n.code,{children:"lsp-mode"}),", because\n",(0,t.jsx)(n.code,{children:"lsp-metals-analyze-stacktrace"})," needs the ",(0,t.jsx)(n.code,{children:"lsp"})," workspace to find the\nlocation of your errors."]}),"\n",(0,t.jsxs)(n.p,{children:["Note that if you try to do that from ",(0,t.jsx)(n.code,{children:"sbt-mode"}),", you may get an error\nunless you patch ",(0,t.jsx)(n.code,{children:"lsp-find-workspace"})," with the following:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-elisp",children:'(defun lsp-find-workspace (server-id &optional file-name)\n "Find workspace for SERVER-ID for FILE-NAME."\n (-when-let* ((session (lsp-session))\n (folder->servers (lsp-session-folder->servers session))\n (workspaces (if file-name\n (let* ((folder (lsp-find-session-folder session file-name))\n (folder-last-char (substring folder (- (length folder) 1) (length folder)))\n (key (if (string= folder-last-char "/") (substring folder 0 (- (length folder) 1)) folder)))\n (gethash key folder->servers))\n (lsp--session-workspaces session))))\n\n (--first (eq (lsp--client-server-id (lsp--workspace-client it)) server-id) workspaces)))\n'})}),"\n",(0,t.jsxs)(n.p,{children:["The above shall become unnecessary once ",(0,t.jsx)(n.a,{href:"https://github.com/emacs-lsp/lsp-mode/issues/2610",children:"this issue"})," is solved."]}),"\n",(0,t.jsx)(n.h3,{id:"reference",children:"Reference"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://www.youtube.com/watch?v=x7ey0ifcqAg&feature=youtu.be",children:"Yurii Ostapchuk at #ScalaUA\u200b - How I learned to stop worrying and love LSP (and Emacs :))"})}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"manually-trigger-build-import",children:"Manually trigger build import"}),"\n",(0,t.jsxs)(n.p,{children:["To manually trigger a build import, run ",(0,t.jsx)(n.code,{children:"M-x lsp-metals-build-import"}),"."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/SvGXJDK.png",alt:"Import build command"})}),"\n",(0,t.jsx)(n.h2,{id:"run-doctor",children:"Run doctor"}),"\n",(0,t.jsxs)(n.p,{children:["Run ",(0,t.jsx)(n.code,{children:"M-x lsp-metals-doctor-run"})," to troubleshoot potential configuration problems\nin your build."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/yelm0jd.png",alt:"Run doctor command"})}),"\n",(0,t.jsx)(n.h3,{id:"eglot",children:"eglot"}),"\n",(0,t.jsxs)(n.p,{children:["There is an alternative LSP client called\n",(0,t.jsx)(n.a,{href:"https://github.com/joaotavora/eglot",children:"eglot"})," that might be worth trying out if\nyou want to use an alternative to lsp-mode."]}),"\n",(0,t.jsx)(n.p,{children:"To configure Eglot with Metals:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-elisp",children:"(require 'package)\n\n;; Add melpa-stable to your packages repositories\n(add-to-list 'package-archives '(\"melpa-stable\" . \"https://stable.melpa.org/packages/\") t)\n\n(package-initialize)\n\n;; Install use-package if not already installed\n(unless (package-installed-p 'use-package)\n (package-refresh-contents)\n (package-install 'use-package))\n\n(require 'use-package)\n\n;; Enable defer and ensure by default for use-package\n(setq use-package-always-defer t\n use-package-always-ensure t)\n\n;; Enable scala-mode and sbt-mode\n(use-package scala-mode\n :interpreter (\"scala\" . scala-mode))\n\n;; Enable sbt mode for executing sbt commands\n(use-package sbt-mode\n :commands sbt-start sbt-command\n :config\n ;; WORKAROUND: https://github.com/ensime/emacs-sbt-mode/issues/31\n ;; allows using SPACE when in the minibuffer\n (substitute-key-definition\n 'minibuffer-complete-word\n 'self-insert-command\n minibuffer-local-completion-map)\n ;; sbt-supershell kills sbt-mode: https://github.com/hvesalai/emacs-sbt-mode/issues/152\n (setq sbt:program-options '(\"-Dsbt.supershell=false\")))\n\n(use-package eglot\n :pin melpa-stable\n ;; (optional) Automatically start metals for Scala files.\n :hook (scala-mode . eglot-ensure))\n"})}),"\n",(0,t.jsxs)(n.p,{children:["If you start Emacs now then it will fail since the ",(0,t.jsx)(n.code,{children:"metals-emacs"})," binary does\nnot exist yet."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sh",children:"coursier bootstrap org.scalameta:metals_2.13:1.2.0+13-615add64-SNAPSHOT -o metals -f\n"})}),"\n",(0,t.jsx)(n.p,{children:"(optional) It's recommended to enable JVM string de-duplication and provide a\ngenerous stack size and memory options."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sh",children:"coursier bootstrap \\\n --java-opt -XX:+UseG1GC \\\n --java-opt -XX:+UseStringDeduplication \\\n --java-opt -Xss4m \\\n --java-opt -Xms100m \\\n org.scalameta:metals_2.13:1.2.0+13-615add64-SNAPSHOT -o metals -f\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"-Dmetals.client=emacs"})," flag is important since it configures Metals for\nusage with Emacs."]}),"\n",(0,t.jsx)(n.h2,{id:"files-and-directories-to-include-in-your-gitignore",children:"Files and Directories to include in your Gitignore"}),"\n",(0,t.jsxs)(n.p,{children:["The Metals server places logs and other files in the ",(0,t.jsx)(n.code,{children:".metals"})," directory. The\nBloop compile server places logs and compilation artifacts in the ",(0,t.jsx)(n.code,{children:".bloop"}),"\ndirectory. The Bloop plugin that generates Bloop configuration is added in the\n",(0,t.jsx)(n.code,{children:"metals.sbt"})," file, which is added at ",(0,t.jsx)(n.code,{children:"project/metals.sbt"})," as well as further\n",(0,t.jsx)(n.code,{children:"project"})," directories depending on how deep ",(0,t.jsx)(n.code,{children:"*.sbt"})," files need to be supported.\nTo support each ",(0,t.jsx)(n.code,{children:"*.sbt"})," file Metals needs to create an additional file at\n",(0,t.jsx)(n.code,{children:"./project/project/metals.sbt"})," relative to the sbt file.\nWorking with Ammonite scripts will place compiled scripts into the ",(0,t.jsx)(n.code,{children:".ammonite"})," directory.\nIt's recommended to exclude these directories and files\nfrom version control systems like git."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sh",children:"# ~/.gitignore\n.metals/\n.bloop/\n.ammonite/\nmetals.sbt\n"})}),"\n",(0,t.jsx)(n.h2,{id:"worksheets",children:"Worksheets"}),"\n",(0,t.jsxs)(n.p,{children:["Worksheets are a great way to explore an api, try out an idea, or code\nup an example and quickly see the evaluated expression or result. Behind\nthe scenes worksheets are powered by the great work done in\n",(0,t.jsx)(n.a,{href:"https://scalameta.org/mdoc/",children:"mdoc"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"getting-started-with-worksheets",children:"Getting started with Worksheets"}),"\n",(0,t.jsxs)(n.p,{children:["To get started with a worksheet you can either use the ",(0,t.jsx)(n.code,{children:"metals.new-scala-file"}),"\ncommand and select ",(0,t.jsx)(n.em,{children:"Worksheet"})," or create a file called ",(0,t.jsx)(n.code,{children:"*.worksheet.sc"}),".\nThis format is important since this is what tells Metals that it's meant to be\ntreated as a worksheet and not just a Scala script. Where you create the\nscript also matters. If you'd like to use classes and values from your\nproject, you need to make sure the worksheet is created inside of your sources next to any existing Scala files.\ndirectory. You can still create a worksheet in other places, but you will\nonly have access to the standard library and your dependencies."]}),"\n",(0,t.jsx)(n.h3,{id:"evaluations",children:"Evaluations"}),"\n",(0,t.jsx)(n.p,{children:"After saving you'll see the result of the expression as a comment as the end of the line.\nYou may not see the full result for example if it's too long, so you are also\nable to hover on the comment to expand."}),"\n",(0,t.jsxs)(n.p,{children:["Keep in mind that you don't need to wrap your code in an ",(0,t.jsx)(n.code,{children:"object"}),". In worksheets\neverything can be evaluated at the top level."]}),"\n",(0,t.jsx)(n.h3,{id:"using-dependencies-in-worksheets",children:"Using dependencies in worksheets"}),"\n",(0,t.jsx)(n.p,{children:"You are able to include an external dependency in your worksheet by including\nit in one of the following two ways."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-scala",children:"// $dep.`organisation`::artifact:version` style\nimport $dep.`com.lihaoyi::scalatags:0.7.0`\n\n// $ivy.`organisation::artifact:version` style\nimport $ivy.`com.lihaoyi::scalatags:0.7.0`\n"})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"::"})," is the same as ",(0,t.jsx)(n.code,{children:"%%"})," in sbt, which will append the current Scala binary version\nto the artifact name."]}),"\n",(0,t.jsxs)(n.p,{children:["You can also import ",(0,t.jsx)(n.code,{children:"scalac"})," options in a special ",(0,t.jsx)(n.code,{children:"$scalac"})," import like below:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-scala",children:"import $scalac.`-Ywarn-unused`\n"})}),"\n",(0,t.jsx)(n.h3,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,t.jsx)(n.p,{children:"Since worksheets are not standard Scala files, you may run into issues with some constructs.\nFor example, you may see an error like this:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"value classes may not be a member of another class - mdoc\n"})}),"\n",(0,t.jsx)(n.p,{children:"This means that one of the classes defined in the worksheet extends AnyVal, which is\nnot currently supported. You can work around this by moving the class to a separate file or removing\nthe AnyVal parent."}),"\n",(0,t.jsx)(n.h2,{id:"running-scalafix-rules",children:"Running scalafix rules"}),"\n",(0,t.jsxs)(n.p,{children:["Scalafix allows users to specify some refactoring and linting rules that can be applied to your\ncodebase. Please checkout the ",(0,t.jsx)(n.a,{href:"https://scalacenter.github.io/scalafix",children:"scalafix website"})," for more information."]}),"\n",(0,t.jsxs)(n.p,{children:["Since Metals v0.11.7 it's now possible to run scalafix rules using a special\ncommand ",(0,t.jsx)(n.code,{children:"metals.scalafix-run"}),".\nThis should run all the rules defined in your ",(0,t.jsx)(n.code,{children:".scalafix.conf"})," file. All built-in rules\nand the ",(0,t.jsx)(n.a,{href:"https://scalacenter.github.io/scalafix/docs/rules/community-rules.html#hygiene-rules",children:"community hygiene ones"})," can\nbe run without any additional settings. However, for all the other rules users need to\nadd an additional dependency in the ",(0,t.jsx)(n.code,{children:"metals.scalafixRulesDependencies"})," user setting.\nThose rules need to be in form of strings such as ",(0,t.jsx)(n.code,{children:"com.github.liancheng::organize-imports:0.6.0"}),", which\nfollows the same convention as ",(0,t.jsx)(n.a,{href:"https://get-coursier.io/",children:"coursier dependencies"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"A sample scalafix configuration can be seen below:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-hocon",children:'rules = [\n OrganizeImports,\n ExplicitResultTypes,\n RemoveUnused\n]\n\nRemoveUnused.imports = false\n\nOrganizeImports.groupedImports = Explode\nOrganizeImports.expandRelative = true\nOrganizeImports.removeUnused = true\nOrganizeImports.groups = [\n "re:javax?\\."\n "scala."\n "scala.meta."\n "*"\n]\n\n'})})]})}function p(e={}){const{wrapper:n}={...(0,a.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},1151:(e,n,s)=>{s.d(n,{Z:()=>l,a:()=>i});var t=s(7294);const a={},o=t.createContext(a);function i(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
+"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6520],{9913:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>r,contentTitle:()=>i,default:()=>p,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var t=s(5893),a=s(1151);const o={id:"emacs",title:"Emacs"},i=void 0,l={id:"editors/emacs",title:"Emacs",description:"Metals works in Emacs thanks to the",source:"@site/target/docs/editors/emacs.md",sourceDirName:"editors",slug:"/editors/emacs",permalink:"/metals/docs/editors/emacs",draft:!1,unlisted:!1,editUrl:"https://github.com/scalameta/metals/edit/main/docs/editors/emacs.md",tags:[],version:"current",frontMatter:{id:"emacs",title:"Emacs"},sidebar:"docs",previous:{title:"Sublime Text",permalink:"/metals/docs/editors/sublime"},next:{title:"Online IDEs",permalink:"/metals/docs/editors/online-ides"}},r={},c=[{value:"Requirements",id:"requirements",level:2},{value:"Installation",id:"installation",level:2},{value:"Importing a build",id:"importing-a-build",level:2},{value:"Custom sbt launcher",id:"custom-sbt-launcher",level:3},{value:"Speeding up import",id:"speeding-up-import",level:3},{value:"Importing changes",id:"importing-changes",level:3},{value:"LSP Tips",id:"lsp-tips",level:2},{value:"Show navigable stack trace",id:"show-navigable-stack-trace",level:3},{value:"Reference",id:"reference",level:3},{value:"Manually trigger build import",id:"manually-trigger-build-import",level:2},{value:"Run doctor",id:"run-doctor",level:2},{value:"eglot",id:"eglot",level:3},{value:"Files and Directories to include in your Gitignore",id:"files-and-directories-to-include-in-your-gitignore",level:2},{value:"Worksheets",id:"worksheets",level:2},{value:"Getting started with Worksheets",id:"getting-started-with-worksheets",level:3},{value:"Evaluations",id:"evaluations",level:3},{value:"Using dependencies in worksheets",id:"using-dependencies-in-worksheets",level:3},{value:"Troubleshooting",id:"troubleshooting",level:3},{value:"Running scalafix rules",id:"running-scalafix-rules",level:2}];function d(e){const n={a:"a",blockquote:"blockquote",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:["Metals works in Emacs thanks to the\n",(0,t.jsx)(n.a,{href:"https://github.com/emacs-lsp/lsp-mode",children:(0,t.jsx)(n.code,{children:"lsp-mode"})})," package (another option is the ",(0,t.jsx)(n.a,{href:"#eglot",children:"Eglot"})," package)."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/KJQLMZ7.gif",alt:"Emacs demo"})}),"\n",(0,t.jsx)(n.h2,{id:"requirements",children:"Requirements"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Java 8, 11, 17 provided by OpenJDK or Oracle"}),". Eclipse OpenJ9 is not\nsupported, please make sure the ",(0,t.jsx)(n.code,{children:"JAVA_HOME"})," environment variable\npoints to a valid Java 8, 11 or 17 installation."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"macOS, Linux or Windows"}),". Metals is developed on many operating systems and\nevery PR is tested on Ubuntu, Windows and MacOS."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Scala 2.13, 2.12, 2.11 and Scala 3"}),". Metals supports these Scala versions:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Scala 2.13"}),":\n2.13.12, 2.13.11, 2.13.10, 2.13.9, 2.13.8, 2.13.7, 2.13.6, 2.13.5"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Scala 2.12"}),":\n2.12.18, 2.12.17, 2.12.16, 2.12.15, 2.12.14, 2.12.13, 2.12.12, 2.12.11"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Scala 2.11"}),":\n2.11.12"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Scala 3"}),":\n3.3.1, 3.3.0, 3.2.2, 3.2.1, 3.2.0, 3.1.3, 3.1.2, 3.1.1, 3.1.0"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Note that 2.11.x support is deprecated and it will be removed in future releases.\nIt's recommended to upgrade to Scala 2.12 or Scala 2.13"}),"\n",(0,t.jsx)(n.h2,{id:"installation",children:"Installation"}),"\n",(0,t.jsxs)(n.p,{children:["To use Metals in Emacs, place this snippet in your Emacs configuration (for example .emacs.d/init.el) to load\n",(0,t.jsx)(n.code,{children:"lsp-mode"})," along with its dependencies:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-elisp",children:'(require \'package)\n\n;; Add melpa to your packages repositories\n(add-to-list \'package-archives \'("melpa" . "https://melpa.org/packages/") t)\n\n(package-initialize)\n\n;; Install use-package if not already installed\n(unless (package-installed-p \'use-package)\n (package-refresh-contents)\n (package-install \'use-package))\n\n(require \'use-package)\n\n;; Enable defer and ensure by default for use-package\n;; Keep auto-save/backup files separate from source code: https://github.com/scalameta/metals/issues/1027\n(setq use-package-always-defer t\n use-package-always-ensure t\n backup-directory-alist `((".*" . ,temporary-file-directory))\n auto-save-file-name-transforms `((".*" ,temporary-file-directory t)))\n\n;; Enable scala-mode for highlighting, indentation and motion commands\n(use-package scala-mode\n :interpreter ("scala" . scala-mode))\n\n;; Enable sbt mode for executing sbt commands\n(use-package sbt-mode\n :commands sbt-start sbt-command\n :config\n ;; WORKAROUND: https://github.com/ensime/emacs-sbt-mode/issues/31\n ;; allows using SPACE when in the minibuffer\n (substitute-key-definition\n \'minibuffer-complete-word\n \'self-insert-command\n minibuffer-local-completion-map)\n ;; sbt-supershell kills sbt-mode: https://github.com/hvesalai/emacs-sbt-mode/issues/152\n (setq sbt:program-options \'("-Dsbt.supershell=false")))\n\n;; Enable nice rendering of diagnostics like compile errors.\n(use-package flycheck\n :init (global-flycheck-mode))\n\n(use-package lsp-mode\n ;; Optional - enable lsp-mode automatically in scala files\n ;; You could also swap out lsp for lsp-deffered in order to defer loading\n :hook (scala-mode . lsp)\n (lsp-mode . lsp-lens-mode)\n :config\n ;; Uncomment following section if you would like to tune lsp-mode performance according to\n ;; https://emacs-lsp.github.io/lsp-mode/page/performance/\n ;; (setq gc-cons-threshold 100000000) ;; 100mb\n ;; (setq read-process-output-max (* 1024 1024)) ;; 1mb\n ;; (setq lsp-idle-delay 0.500)\n ;; (setq lsp-log-io nil)\n ;; (setq lsp-completion-provider :capf)\n (setq lsp-prefer-flymake nil)\n ;; Makes LSP shutdown the metals server when all buffers in the project are closed.\n ;; https://emacs-lsp.github.io/lsp-mode/page/settings/mode/#lsp-keep-workspace-alive\n (setq lsp-keep-workspace-alive nil))\n\n;; Add metals backend for lsp-mode\n(use-package lsp-metals)\n\n;; Enable nice rendering of documentation on hover\n;; Warning: on some systems this package can reduce your emacs responsiveness significally.\n;; (See: https://emacs-lsp.github.io/lsp-mode/page/performance/)\n;; In that case you have to not only disable this but also remove from the packages since\n;; lsp-mode can activate it automatically.\n(use-package lsp-ui)\n\n;; lsp-mode supports snippets, but in order for them to work you need to use yasnippet\n;; If you don\'t want to use snippets set lsp-enable-snippet to nil in your lsp-mode settings\n;; to avoid odd behavior with snippets and indentation\n(use-package yasnippet)\n\n;; Use company-capf as a completion provider.\n;;\n;; To Company-lsp users:\n;; Company-lsp is no longer maintained and has been removed from MELPA.\n;; Please migrate to company-capf.\n(use-package company\n :hook (scala-mode . company-mode)\n :config\n (setq lsp-completion-provider :capf))\n\n;; Posframe is a pop-up tool that must be manually installed for dap-mode\n(use-package posframe)\n\n;; Use the Debug Adapter Protocol for running tests and debugging\n(use-package dap-mode\n :hook\n (lsp-mode . dap-mode)\n (lsp-mode . dap-ui-mode))\n'})}),"\n",(0,t.jsxs)(n.blockquote,{children:["\n",(0,t.jsxs)(n.p,{children:["You may need to disable other packages like ",(0,t.jsx)(n.code,{children:"ensime"})," or sbt server to prevent\nconflicts with Metals."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Next you have to install metals server. Emacs can do it for you when ",(0,t.jsx)(n.code,{children:"lsp-mode"}),"\nis enabled in a scala buffer or via ",(0,t.jsx)(n.code,{children:"lsp-install-server"})," command. Also you can\ndo it manually executing ",(0,t.jsx)(n.code,{children:"coursier install metals"})," and configuring ",(0,t.jsx)(n.code,{children:"$PATH"}),"\nvariable properly."]}),"\n",(0,t.jsx)(n.h2,{id:"importing-a-build",children:"Importing a build"}),"\n",(0,t.jsxs)(n.p,{children:['The first time you open Metals in a new workspace it prompts you to import the build.\nType "Import build" or press ',(0,t.jsx)(n.code,{children:"Tab"}),' and select "Import build" to start the installation step.']}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/UdwMQFk.png",alt:"Import build"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:'"Not now" disables this prompt for 2 minutes.'}),"\n",(0,t.jsxs)(n.li,{children:['"Don\'t show again" disables this prompt forever, use ',(0,t.jsx)(n.code,{children:"rm -rf .metals/"})," to re-enable\nthe prompt."]}),"\n",(0,t.jsxs)(n.li,{children:["Use ",(0,t.jsx)(n.code,{children:"tail -f .metals/metals.log"})," to watch the build import progress."]}),"\n",(0,t.jsxs)(n.li,{children:["Behind the scenes, Metals uses ",(0,t.jsx)(n.a,{href:"https://scalacenter.github.io/bloop/",children:"Bloop"})," to\nimport sbt builds, but you don't need Bloop installed on your machine to run this step."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Once the import step completes, compilation starts for your open ",(0,t.jsx)(n.code,{children:"*.scala"}),"\nfiles."]}),"\n",(0,t.jsx)(n.p,{children:"Once the sources have compiled successfully, you can navigate the codebase with\ngoto definition."}),"\n",(0,t.jsx)(n.h3,{id:"custom-sbt-launcher",children:"Custom sbt launcher"}),"\n",(0,t.jsxs)(n.p,{children:["By default, Metals runs an embedded ",(0,t.jsx)(n.code,{children:"sbt-launch.jar"})," launcher that respects ",(0,t.jsx)(n.code,{children:".sbtopts"})," and ",(0,t.jsx)(n.code,{children:".jvmopts"}),".\nHowever, the environment variables ",(0,t.jsx)(n.code,{children:"SBT_OPTS"})," and ",(0,t.jsx)(n.code,{children:"JAVA_OPTS"})," are not respected."]}),"\n",(0,t.jsxs)(n.p,{children:["Update the server property ",(0,t.jsx)(n.code,{children:"-Dmetals.sbt-script=/path/to/sbt"})," to use a custom\n",(0,t.jsx)(n.code,{children:"sbt"})," script instead of the default Metals launcher if you need further\ncustomizations like reading environment variables."]}),"\n",(0,t.jsx)(n.h3,{id:"speeding-up-import",children:"Speeding up import"}),"\n",(0,t.jsx)(n.p,{children:'The "Import build" step can take a long time, especially the first time you\nrun it in a new build. The exact time depends on the complexity of the build and\nif library dependencies need to be downloaded. For example, this step can take\neverything from 10 seconds in small cached builds up to 10-15 minutes in large\nuncached builds.'}),"\n",(0,t.jsxs)(n.p,{children:["Consult the ",(0,t.jsx)(n.a,{href:"https://scalacenter.github.io/bloop/docs/build-tools/sbt#speeding-up-build-export",children:"Bloop documentation"}),"\nto learn how to speed up build import."]}),"\n",(0,t.jsx)(n.h3,{id:"importing-changes",children:"Importing changes"}),"\n",(0,t.jsxs)(n.p,{children:["When you change ",(0,t.jsx)(n.code,{children:"build.sbt"})," or sources under ",(0,t.jsx)(n.code,{children:"project/"}),", you will be prompted to\nre-import the build."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/UFK0p8i.png",alt:"Import sbt changes"})}),"\n",(0,t.jsx)(n.h2,{id:"lsp-tips",children:"LSP Tips"}),"\n",(0,t.jsx)(n.h3,{id:"show-navigable-stack-trace",children:"Show navigable stack trace"}),"\n",(0,t.jsxs)(n.p,{children:["You can annotate your stack trace with code lenses (which requires the\nfollowing bit of configuration mentioned earlier: ",(0,t.jsx)(n.code,{children:"(lsp-mode . lsp-lens-mode)"}),").\nThese allow you to run actions from your code."]}),"\n",(0,t.jsx)(n.p,{children:"One of these actions allow you to navigate your stack trace."}),"\n",(0,t.jsxs)(n.p,{children:["You can annotate any stack trace by marking a stack trace with your\nregion and using ",(0,t.jsx)(n.code,{children:"M-x lsp-metals-analyze-stacktrace"})," on it."]}),"\n",(0,t.jsx)(n.p,{children:'This will open a new Scala buffer that has code lenses annotations:\njust click on the small "open" annotation to navigate to the source\ncode relative to your stack trace.'}),"\n",(0,t.jsxs)(n.p,{children:["This will work as long as the buffer you are marking your stack trace\non exists within the project directory tracked by ",(0,t.jsx)(n.code,{children:"lsp-mode"}),", because\n",(0,t.jsx)(n.code,{children:"lsp-metals-analyze-stacktrace"})," needs the ",(0,t.jsx)(n.code,{children:"lsp"})," workspace to find the\nlocation of your errors."]}),"\n",(0,t.jsxs)(n.p,{children:["Note that if you try to do that from ",(0,t.jsx)(n.code,{children:"sbt-mode"}),", you may get an error\nunless you patch ",(0,t.jsx)(n.code,{children:"lsp-find-workspace"})," with the following:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-elisp",children:'(defun lsp-find-workspace (server-id &optional file-name)\n "Find workspace for SERVER-ID for FILE-NAME."\n (-when-let* ((session (lsp-session))\n (folder->servers (lsp-session-folder->servers session))\n (workspaces (if file-name\n (let* ((folder (lsp-find-session-folder session file-name))\n (folder-last-char (substring folder (- (length folder) 1) (length folder)))\n (key (if (string= folder-last-char "/") (substring folder 0 (- (length folder) 1)) folder)))\n (gethash key folder->servers))\n (lsp--session-workspaces session))))\n\n (--first (eq (lsp--client-server-id (lsp--workspace-client it)) server-id) workspaces)))\n'})}),"\n",(0,t.jsxs)(n.p,{children:["The above shall become unnecessary once ",(0,t.jsx)(n.a,{href:"https://github.com/emacs-lsp/lsp-mode/issues/2610",children:"this issue"})," is solved."]}),"\n",(0,t.jsx)(n.h3,{id:"reference",children:"Reference"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://www.youtube.com/watch?v=x7ey0ifcqAg&feature=youtu.be",children:"Yurii Ostapchuk at #ScalaUA\u200b - How I learned to stop worrying and love LSP (and Emacs :))"})}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"manually-trigger-build-import",children:"Manually trigger build import"}),"\n",(0,t.jsxs)(n.p,{children:["To manually trigger a build import, run ",(0,t.jsx)(n.code,{children:"M-x lsp-metals-build-import"}),"."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/SvGXJDK.png",alt:"Import build command"})}),"\n",(0,t.jsx)(n.h2,{id:"run-doctor",children:"Run doctor"}),"\n",(0,t.jsxs)(n.p,{children:["Run ",(0,t.jsx)(n.code,{children:"M-x lsp-metals-doctor-run"})," to troubleshoot potential configuration problems\nin your build."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/yelm0jd.png",alt:"Run doctor command"})}),"\n",(0,t.jsx)(n.h3,{id:"eglot",children:"eglot"}),"\n",(0,t.jsxs)(n.p,{children:["There is an alternative LSP client called\n",(0,t.jsx)(n.a,{href:"https://github.com/joaotavora/eglot",children:"eglot"})," that might be worth trying out if\nyou want to use an alternative to lsp-mode."]}),"\n",(0,t.jsx)(n.p,{children:"To configure Eglot with Metals:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-elisp",children:"(require 'package)\n\n;; Add melpa-stable to your packages repositories\n(add-to-list 'package-archives '(\"melpa-stable\" . \"https://stable.melpa.org/packages/\") t)\n\n(package-initialize)\n\n;; Install use-package if not already installed\n(unless (package-installed-p 'use-package)\n (package-refresh-contents)\n (package-install 'use-package))\n\n(require 'use-package)\n\n;; Enable defer and ensure by default for use-package\n(setq use-package-always-defer t\n use-package-always-ensure t)\n\n;; Enable scala-mode and sbt-mode\n(use-package scala-mode\n :interpreter (\"scala\" . scala-mode))\n\n;; Enable sbt mode for executing sbt commands\n(use-package sbt-mode\n :commands sbt-start sbt-command\n :config\n ;; WORKAROUND: https://github.com/ensime/emacs-sbt-mode/issues/31\n ;; allows using SPACE when in the minibuffer\n (substitute-key-definition\n 'minibuffer-complete-word\n 'self-insert-command\n minibuffer-local-completion-map)\n ;; sbt-supershell kills sbt-mode: https://github.com/hvesalai/emacs-sbt-mode/issues/152\n (setq sbt:program-options '(\"-Dsbt.supershell=false\")))\n\n(use-package eglot\n :pin melpa-stable\n ;; (optional) Automatically start metals for Scala files.\n :hook (scala-mode . eglot-ensure))\n"})}),"\n",(0,t.jsxs)(n.p,{children:["If you start Emacs now then it will fail since the ",(0,t.jsx)(n.code,{children:"metals-emacs"})," binary does\nnot exist yet."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sh",children:"coursier bootstrap org.scalameta:metals_2.13:1.2.0 -o metals -f\n"})}),"\n",(0,t.jsx)(n.p,{children:"(optional) It's recommended to enable JVM string de-duplication and provide a\ngenerous stack size and memory options."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sh",children:"coursier bootstrap \\\n --java-opt -XX:+UseG1GC \\\n --java-opt -XX:+UseStringDeduplication \\\n --java-opt -Xss4m \\\n --java-opt -Xms100m \\\n org.scalameta:metals_2.13:1.2.0 -o metals -f\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"-Dmetals.client=emacs"})," flag is important since it configures Metals for\nusage with Emacs."]}),"\n",(0,t.jsx)(n.h2,{id:"files-and-directories-to-include-in-your-gitignore",children:"Files and Directories to include in your Gitignore"}),"\n",(0,t.jsxs)(n.p,{children:["The Metals server places logs and other files in the ",(0,t.jsx)(n.code,{children:".metals"})," directory. The\nBloop compile server places logs and compilation artifacts in the ",(0,t.jsx)(n.code,{children:".bloop"}),"\ndirectory. The Bloop plugin that generates Bloop configuration is added in the\n",(0,t.jsx)(n.code,{children:"metals.sbt"})," file, which is added at ",(0,t.jsx)(n.code,{children:"project/metals.sbt"})," as well as further\n",(0,t.jsx)(n.code,{children:"project"})," directories depending on how deep ",(0,t.jsx)(n.code,{children:"*.sbt"})," files need to be supported.\nTo support each ",(0,t.jsx)(n.code,{children:"*.sbt"})," file Metals needs to create an additional file at\n",(0,t.jsx)(n.code,{children:"./project/project/metals.sbt"})," relative to the sbt file.\nWorking with Ammonite scripts will place compiled scripts into the ",(0,t.jsx)(n.code,{children:".ammonite"})," directory.\nIt's recommended to exclude these directories and files\nfrom version control systems like git."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sh",children:"# ~/.gitignore\n.metals/\n.bloop/\n.ammonite/\nmetals.sbt\n"})}),"\n",(0,t.jsx)(n.h2,{id:"worksheets",children:"Worksheets"}),"\n",(0,t.jsxs)(n.p,{children:["Worksheets are a great way to explore an api, try out an idea, or code\nup an example and quickly see the evaluated expression or result. Behind\nthe scenes worksheets are powered by the great work done in\n",(0,t.jsx)(n.a,{href:"https://scalameta.org/mdoc/",children:"mdoc"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"getting-started-with-worksheets",children:"Getting started with Worksheets"}),"\n",(0,t.jsxs)(n.p,{children:["To get started with a worksheet you can either use the ",(0,t.jsx)(n.code,{children:"metals.new-scala-file"}),"\ncommand and select ",(0,t.jsx)(n.em,{children:"Worksheet"})," or create a file called ",(0,t.jsx)(n.code,{children:"*.worksheet.sc"}),".\nThis format is important since this is what tells Metals that it's meant to be\ntreated as a worksheet and not just a Scala script. Where you create the\nscript also matters. If you'd like to use classes and values from your\nproject, you need to make sure the worksheet is created inside of your sources next to any existing Scala files.\ndirectory. You can still create a worksheet in other places, but you will\nonly have access to the standard library and your dependencies."]}),"\n",(0,t.jsx)(n.h3,{id:"evaluations",children:"Evaluations"}),"\n",(0,t.jsx)(n.p,{children:"After saving you'll see the result of the expression as a comment as the end of the line.\nYou may not see the full result for example if it's too long, so you are also\nable to hover on the comment to expand."}),"\n",(0,t.jsxs)(n.p,{children:["Keep in mind that you don't need to wrap your code in an ",(0,t.jsx)(n.code,{children:"object"}),". In worksheets\neverything can be evaluated at the top level."]}),"\n",(0,t.jsx)(n.h3,{id:"using-dependencies-in-worksheets",children:"Using dependencies in worksheets"}),"\n",(0,t.jsx)(n.p,{children:"You are able to include an external dependency in your worksheet by including\nit in one of the following two ways."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-scala",children:"// $dep.`organisation`::artifact:version` style\nimport $dep.`com.lihaoyi::scalatags:0.7.0`\n\n// $ivy.`organisation::artifact:version` style\nimport $ivy.`com.lihaoyi::scalatags:0.7.0`\n"})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"::"})," is the same as ",(0,t.jsx)(n.code,{children:"%%"})," in sbt, which will append the current Scala binary version\nto the artifact name."]}),"\n",(0,t.jsxs)(n.p,{children:["You can also import ",(0,t.jsx)(n.code,{children:"scalac"})," options in a special ",(0,t.jsx)(n.code,{children:"$scalac"})," import like below:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-scala",children:"import $scalac.`-Ywarn-unused`\n"})}),"\n",(0,t.jsx)(n.h3,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,t.jsx)(n.p,{children:"Since worksheets are not standard Scala files, you may run into issues with some constructs.\nFor example, you may see an error like this:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"value classes may not be a member of another class - mdoc\n"})}),"\n",(0,t.jsx)(n.p,{children:"This means that one of the classes defined in the worksheet extends AnyVal, which is\nnot currently supported. You can work around this by moving the class to a separate file or removing\nthe AnyVal parent."}),"\n",(0,t.jsx)(n.h2,{id:"running-scalafix-rules",children:"Running scalafix rules"}),"\n",(0,t.jsxs)(n.p,{children:["Scalafix allows users to specify some refactoring and linting rules that can be applied to your\ncodebase. Please checkout the ",(0,t.jsx)(n.a,{href:"https://scalacenter.github.io/scalafix",children:"scalafix website"})," for more information."]}),"\n",(0,t.jsxs)(n.p,{children:["Since Metals v0.11.7 it's now possible to run scalafix rules using a special\ncommand ",(0,t.jsx)(n.code,{children:"metals.scalafix-run"}),".\nThis should run all the rules defined in your ",(0,t.jsx)(n.code,{children:".scalafix.conf"})," file. All built-in rules\nand the ",(0,t.jsx)(n.a,{href:"https://scalacenter.github.io/scalafix/docs/rules/community-rules.html#hygiene-rules",children:"community hygiene ones"})," can\nbe run without any additional settings. However, for all the other rules users need to\nadd an additional dependency in the ",(0,t.jsx)(n.code,{children:"metals.scalafixRulesDependencies"})," user setting.\nThose rules need to be in form of strings such as ",(0,t.jsx)(n.code,{children:"com.github.liancheng::organize-imports:0.6.0"}),", which\nfollows the same convention as ",(0,t.jsx)(n.a,{href:"https://get-coursier.io/",children:"coursier dependencies"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"A sample scalafix configuration can be seen below:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-hocon",children:'rules = [\n OrganizeImports,\n ExplicitResultTypes,\n RemoveUnused\n]\n\nRemoveUnused.imports = false\n\nOrganizeImports.groupedImports = Explode\nOrganizeImports.expandRelative = true\nOrganizeImports.removeUnused = true\nOrganizeImports.groups = [\n "re:javax?\\."\n "scala."\n "scala.meta."\n "*"\n]\n\n'})})]})}function p(e={}){const{wrapper:n}={...(0,a.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},1151:(e,n,s)=>{s.d(n,{Z:()=>l,a:()=>i});var t=s(7294);const a={},o=t.createContext(a);function i(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/970a5f4e.154c41bc.js b/assets/js/970a5f4e.154c41bc.js
new file mode 100644
index 00000000000..1cd0de23981
--- /dev/null
+++ b/assets/js/970a5f4e.154c41bc.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6561],{9557:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>a,toc:()=>c});var t=s(5893),i=s(1151);const o={id:"vscode",sidebar_label:"VS Code",title:"Visual Studio Code"},r=void 0,a={id:"editors/vscode",title:"Visual Studio Code",description:"Goto Definition",source:"@site/target/docs/editors/vscode.md",sourceDirName:"editors",slug:"/editors/vscode",permalink:"/metals/docs/editors/vscode",draft:!1,unlisted:!1,editUrl:"https://github.com/scalameta/metals/edit/main/docs/editors/vscode.md",tags:[],version:"current",frontMatter:{id:"vscode",sidebar_label:"VS Code",title:"Visual Studio Code"},sidebar:"docs",previous:{title:"Overview",permalink:"/metals/docs/"},next:{title:"Vim",permalink:"/metals/docs/editors/vim"}},l={},c=[{value:"Requirements",id:"requirements",level:2},{value:"Installation",id:"installation",level:2},{value:"Importing a build",id:"importing-a-build",level:2},{value:"Custom sbt launcher",id:"custom-sbt-launcher",level:3},{value:"Speeding up import",id:"speeding-up-import",level:3},{value:"Importing changes",id:"importing-changes",level:3},{value:"Manually trigger build import",id:"manually-trigger-build-import",level:3},{value:"Run doctor",id:"run-doctor",level:2},{value:"Configure Java version",id:"configure-java-version",level:2},{value:"macOS",id:"macos",level:3},{value:"Custom artifact repositories (Maven or Ivy resolvers)",id:"custom-artifact-repositories-maven-or-ivy-resolvers",level:2},{value:"HTTP proxy",id:"http-proxy",level:2},{value:"Using latest Metals SNAPSHOT",id:"using-latest-metals-snapshot",level:2},{value:"Files and Directories to include in your Gitignore",id:"files-and-directories-to-include-in-your-gitignore",level:2},{value:"Show document symbols",id:"show-document-symbols",level:2},{value:"Go to parent code lenses",id:"go-to-parent-code-lenses",level:2},{value:"Create new project from template",id:"create-new-project-from-template",level:2},{value:"Running and debugging your code",id:"running-and-debugging-your-code",level:2},{value:"via code lenses",id:"via-code-lenses",level:3},{value:"via a launch.json configuration",id:"via-a-launchjson-configuration",level:3},{value:"via Metals' commands",id:"via-metals-commands",level:3},{value:"On type formatting for multiline string formatting",id:"on-type-formatting-for-multiline-string-formatting",level:2},{value:"Formatting on paste for multiline strings",id:"formatting-on-paste-for-multiline-strings",level:2},{value:"Worksheets",id:"worksheets",level:2},{value:"Getting started with Worksheets",id:"getting-started-with-worksheets",level:3},{value:"Evaluations",id:"evaluations",level:3},{value:"Using dependencies in worksheets",id:"using-dependencies-in-worksheets",level:3},{value:"Troubleshooting",id:"troubleshooting",level:3},{value:"Running scalafix rules",id:"running-scalafix-rules",level:2},{value:"Searching a symbol in the workspace",id:"searching-a-symbol-in-the-workspace",level:2},{value:"Test Explorer",id:"test-explorer",level:2},{value:"Coming from IntelliJ",id:"coming-from-intellij",level:2},{value:"GitHub Codespaces and GitHub.dev support",id:"github-codespaces-and-githubdev-support",level:2}];function d(e){const n={a:"a",blockquote:"blockquote",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://user-images.githubusercontent.com/1408093/48776422-1f764f00-ecd0-11e8-96d1-170f2354d50e.gif",alt:"Goto Definition"})}),"\n",(0,t.jsx)(n.h2,{id:"requirements",children:"Requirements"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Java 8, 11, 17 provided by OpenJDK or Oracle"}),". Eclipse OpenJ9 is not\nsupported, please make sure the ",(0,t.jsx)(n.code,{children:"JAVA_HOME"})," environment variable\npoints to a valid Java 8, 11 or 17 installation."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"macOS, Linux or Windows"}),". Metals is developed on many operating systems and\nevery PR is tested on Ubuntu, Windows and MacOS."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Scala 2.13, 2.12, 2.11 and Scala 3"}),". Metals supports these Scala versions:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Scala 2.13"}),":\n2.13.12, 2.13.11, 2.13.10, 2.13.9, 2.13.8, 2.13.7, 2.13.6, 2.13.5"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Scala 2.12"}),":\n2.12.18, 2.12.17, 2.12.16, 2.12.15, 2.12.14, 2.12.13, 2.12.12, 2.12.11"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Scala 2.11"}),":\n2.11.12"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Scala 3"}),":\n3.3.1, 3.3.0, 3.2.2, 3.2.1, 3.2.0, 3.1.3, 3.1.2, 3.1.1, 3.1.0"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Note that 2.11.x support is deprecated and it will be removed in future releases.\nIt's recommended to upgrade to Scala 2.12 or Scala 2.13"}),"\n",(0,t.jsx)(n.h2,{id:"installation",children:"Installation"}),"\n",(0,t.jsxs)(n.p,{children:["Install the Metals extension from the\n",(0,t.jsx)(n.a,{href:"https://marketplace.visualstudio.com/items?itemName=scalameta.metals",children:"Marketplace"})," by clicking on this badge ",(0,t.jsx)(n.a,{href:"vscode:extension/scalameta.metals",children:(0,t.jsx)(n.img,{src:"https://img.shields.io/badge/metals-vscode-blue.png",alt:"Install Metals extension"})})," or via the VS Code editor:"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://imgur.com/Qew0fNH.png",alt:"install stable version"})}),"\n",(0,t.jsxs)(n.blockquote,{children:["\n",(0,t.jsxs)(n.p,{children:["Make sure to disable the extensions\n",(0,t.jsx)(n.a,{href:"https://marketplace.visualstudio.com/items?itemName=dragos.scala-lsp",children:"Scala Language Server"}),"\nand\n",(0,t.jsx)(n.a,{href:"https://marketplace.visualstudio.com/items?itemName=lightbend.vscode-sbt-scala",children:"Scala (sbt)"}),"\nif they are installed. The\n",(0,t.jsx)(n.a,{href:"https://marketplace.visualstudio.com/items?itemName=lampepfl.dotty",children:"Dotty Language Server"}),"\ndoes ",(0,t.jsx)(n.strong,{children:"not"})," need to be disabled because the Metals and Dotty extensions don't\nconflict with each other. However, if you want to work on Scala 3 code in a\nworkspace that was previously opened with ",(0,t.jsx)(n.code,{children:"Dotty Language Server"})," you need to\nfirst remove ",(0,t.jsx)(n.code,{children:".dotty-ide-artifact"})," before opening the workspace with Metals."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Next, open a directory containing your Scala code. The extension activates when\nthe main directory contains ",(0,t.jsx)(n.code,{children:"build.sbt"})," or ",(0,t.jsx)(n.code,{children:"build.sc"})," file, a Scala file is\nopened, which includes ",(0,t.jsx)(n.code,{children:"*.sbt"}),", ",(0,t.jsx)(n.code,{children:"*.scala"})," and ",(0,t.jsx)(n.code,{children:"*.sc"})," file, or a standard Scala\ndirectory structure ",(0,t.jsx)(n.code,{children:"src/main/scala"})," is detected."]}),"\n",(0,t.jsxs)(n.p,{children:["It is also possible to opt in to install the pre-release version and try out the latest cutting edge features from Metals server.\nApart from new features, pre-release versions also include many bugfixes. It's encouraged to use them with ",(0,t.jsx)(n.a,{href:"#SNAPSHOT",children:"SNAPSHOT"})," releases of Metals server. Using pre-release versions may result in less stable experience and it is not indented for beginners.\nPre-release versions follow ",(0,t.jsx)(n.code,{children:"major.minor.PATCH"})," versioning."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://imgur.com/CzOTleE.png",alt:"Install the pre-release extension"})}),"\n",(0,t.jsx)(n.h2,{id:"importing-a-build",children:"Importing a build"}),"\n",(0,t.jsx)(n.p,{children:'The first time you open Metals in a new workspace it prompts you to import the build.\nClick "Import build" to start the installation step.'}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/0VqZWay.png",alt:"Import build"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:'"Not now" disables this prompt for 2 minutes.'}),"\n",(0,t.jsxs)(n.li,{children:['"Don\'t show again" disables this prompt forever, use ',(0,t.jsx)(n.code,{children:"rm -rf .metals/"})," to re-enable\nthe prompt."]}),"\n",(0,t.jsxs)(n.li,{children:["Use ",(0,t.jsx)(n.code,{children:"tail -f .metals/metals.log"})," to watch the build import progress."]}),"\n",(0,t.jsxs)(n.li,{children:["Behind the scenes, Metals uses ",(0,t.jsx)(n.a,{href:"https://scalacenter.github.io/bloop/",children:"Bloop"})," to\nimport sbt builds, but you don't need Bloop installed on your machine to run this step."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Once the import step completes, compilation starts for your open ",(0,t.jsx)(n.code,{children:"*.scala"}),"\nfiles."]}),"\n",(0,t.jsx)(n.p,{children:"Once the sources have compiled successfully, you can navigate the codebase with\ngoto definition."}),"\n",(0,t.jsx)(n.h3,{id:"custom-sbt-launcher",children:"Custom sbt launcher"}),"\n",(0,t.jsxs)(n.p,{children:["By default, Metals runs an embedded ",(0,t.jsx)(n.code,{children:"sbt-launch.jar"})," launcher that respects ",(0,t.jsx)(n.code,{children:".sbtopts"})," and ",(0,t.jsx)(n.code,{children:".jvmopts"}),".\nHowever, the environment variables ",(0,t.jsx)(n.code,{children:"SBT_OPTS"})," and ",(0,t.jsx)(n.code,{children:"JAVA_OPTS"})," are not respected."]}),"\n",(0,t.jsxs)(n.p,{children:['Update the "Sbt Script" setting to use a custom ',(0,t.jsx)(n.code,{children:"sbt"})," script instead of the\ndefault Metals launcher if you need further customizations like reading environment\nvariables."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/NuwEBe4.png",alt:"Sbt Launcher"})}),"\n",(0,t.jsx)(n.h3,{id:"speeding-up-import",children:"Speeding up import"}),"\n",(0,t.jsx)(n.p,{children:'The "Import build" step can take a long time, especially the first time you\nrun it in a new build. The exact time depends on the complexity of the build and\nif library dependencies need to be downloaded. For example, this step can take\neverything from 10 seconds in small cached builds up to 10-15 minutes in large\nuncached builds.'}),"\n",(0,t.jsxs)(n.p,{children:["Consult the ",(0,t.jsx)(n.a,{href:"https://scalacenter.github.io/bloop/docs/build-tools/sbt#speeding-up-build-export",children:"Bloop documentation"}),"\nto learn how to speed up build import."]}),"\n",(0,t.jsx)(n.h3,{id:"importing-changes",children:"Importing changes"}),"\n",(0,t.jsxs)(n.p,{children:["When you change ",(0,t.jsx)(n.code,{children:"build.sbt"})," or sources under ",(0,t.jsx)(n.code,{children:"project/"}),", you will be prompted to\nre-import the build."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/72kdZkL.png",alt:"Import sbt changes"})}),"\n",(0,t.jsx)(n.h3,{id:"manually-trigger-build-import",children:"Manually trigger build import"}),"\n",(0,t.jsxs)(n.p,{children:['To manually trigger a build import, execute the "Import build" command through\nthe command palette (',(0,t.jsx)(n.code,{children:"Cmd + Shift + P"}),")."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/QHLKt8u.png",alt:"Import build command"})}),"\n",(0,t.jsx)(n.h2,{id:"run-doctor",children:"Run doctor"}),"\n",(0,t.jsx)(n.p,{children:'Execute the "Run Doctor" through the command palette to troubleshoot potential\nconfiguration problems in your workspace.'}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/K02g0UM.png",alt:"Run doctor command"})}),"\n",(0,t.jsx)(n.h2,{id:"configure-java-version",children:"Configure Java version"}),"\n",(0,t.jsxs)(n.p,{children:["The VS Code plugin uses by default the ",(0,t.jsx)(n.code,{children:"JAVA_HOME"})," environment variable (via\n",(0,t.jsx)(n.a,{href:"https://www.npmjs.com/package/locate-java-home",children:(0,t.jsx)(n.code,{children:"locate-java-home"})}),") to locate\nthe ",(0,t.jsx)(n.code,{children:"java"}),' executable. To override the default Java home location, update the\n"Java Home" variable in the settings menu.']}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/sKrPKk2.png",alt:"Java Home setting"})}),"\n",(0,t.jsxs)(n.p,{children:["If this setting is defined, the VS Code plugin uses the custom path instead of\nthe ",(0,t.jsx)(n.code,{children:"JAVA_HOME"})," environment variable."]}),"\n",(0,t.jsx)(n.h3,{id:"macos",children:"macOS"}),"\n",(0,t.jsxs)(n.p,{children:["To globally configure ",(0,t.jsx)(n.code,{children:"$JAVA_HOME"})," for all GUI applications, see\n",(0,t.jsx)(n.a,{href:"https://stackoverflow.com/questions/135688/setting-environment-variables-on-os-x",children:"this Stackoverflow answer"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"If you prefer to manually configure Java home through VS Code, run the following\ncommand to copy the Java 8 home path."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sh",children:"/usr/libexec/java_home -v 1.8 | pbcopy\n"})}),"\n",(0,t.jsx)(n.h2,{id:"custom-artifact-repositories-maven-or-ivy-resolvers",children:"Custom artifact repositories (Maven or Ivy resolvers)"}),"\n",(0,t.jsxs)(n.p,{children:["Use the 'Custom Repositories' setting for the Metals VS Code extension to tell\n",(0,t.jsx)(n.a,{href:"https://get-coursier.io/docs/other-proxy",children:"Coursier"})," to try to download Metals\nartifacts from your private artifact repository."]}),"\n",(0,t.jsxs)(n.p,{children:["Use ",(0,t.jsx)(n.code,{children:".jvmopts"})," to set sbt options\n(",(0,t.jsx)(n.a,{href:"https://www.scala-sbt.org/1.0/docs/Proxy-Repositories.html",children:"https://www.scala-sbt.org/1.0/docs/Proxy-Repositories.html"}),") for\n",(0,t.jsx)(n.code,{children:"sbt bloopInstall"})," which resolves library dependencies. You can also provide a\ncustom sbt script (see 'Custom sbt launcher')."]}),"\n",(0,t.jsx)(n.h2,{id:"http-proxy",children:"HTTP proxy"}),"\n",(0,t.jsxs)(n.p,{children:["Metals uses ",(0,t.jsx)(n.a,{href:"https://get-coursier.io/docs/other-proxy",children:"Coursier"})," to download\nartifacts from Maven Central. To use Metals behind an HTTP proxy, configure the\nsystem properties ",(0,t.jsx)(n.code,{children:"-Dhttps.proxyHost=\u2026 -Dhttps.proxyPort=\u2026"})," in one of the\nfollowing locations:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:".jvmopts"})," file in the workspace directory."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"JAVA_OPTS"})," environment variable, make sure to start ",(0,t.jsx)(n.code,{children:"code"})," from your terminal\nwhen using this option since environment variables don't always propagate\ncorrectly when opening VS Code as a GUI application outside a terminal."]}),"\n",(0,t.jsx)(n.li,{children:'"Server Properties" setting for the Metals VS Code extension, which can be\nconfigured per-workspace or per-user.'}),"\n"]}),"\n",(0,t.jsxs)(n.h2,{id:"using-latest-metals-snapshot",children:["Using latest Metals ",(0,t.jsx)("a",{name:"SNAPSHOT",children:"SNAPSHOT"})]}),"\n",(0,t.jsx)(n.p,{children:'Update the "Server Version" setting to try out the latest pending Metals\nfeatures.'}),"\n",(0,t.jsxs)("table",{children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:"Version"}),(0,t.jsx)("th",{children:"Published"})]})}),(0,t.jsxs)("tbody",{children:[(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"1.2.0"}),(0,t.jsx)("td",{children:"12 Dec 2023 10:36"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"1.2.0+14-72692d2c-SNAPSHOT"}),(0,t.jsx)("td",{children:"18 Dec 2023 10:59"})]})]})]}),"\n",(0,t.jsx)(n.p,{children:'Run the "Reload Window" command after updating the setting for the new version\nto take effect.'}),"\n",(0,t.jsx)(n.h2,{id:"files-and-directories-to-include-in-your-gitignore",children:"Files and Directories to include in your Gitignore"}),"\n",(0,t.jsxs)(n.p,{children:["The Metals server places logs and other files in the ",(0,t.jsx)(n.code,{children:".metals"})," directory. The\nBloop compile server places logs and compilation artifacts in the ",(0,t.jsx)(n.code,{children:".bloop"}),"\ndirectory. The Bloop plugin that generates Bloop configuration is added in the\n",(0,t.jsx)(n.code,{children:"metals.sbt"})," file, which is added at ",(0,t.jsx)(n.code,{children:"project/metals.sbt"})," as well as further\n",(0,t.jsx)(n.code,{children:"project"})," directories depending on how deep ",(0,t.jsx)(n.code,{children:"*.sbt"})," files need to be supported.\nTo support each ",(0,t.jsx)(n.code,{children:"*.sbt"})," file Metals needs to create an additional file at\n",(0,t.jsx)(n.code,{children:"./project/project/metals.sbt"})," relative to the sbt file.\nWorking with Ammonite scripts will place compiled scripts into the ",(0,t.jsx)(n.code,{children:".ammonite"})," directory.\nIt's recommended to exclude these directories and files\nfrom version control systems like git."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sh",children:"# ~/.gitignore\n.metals/\n.bloop/\n.ammonite/\nmetals.sbt\n"})}),"\n",(0,t.jsx)(n.h2,{id:"show-document-symbols",children:"Show document symbols"}),"\n",(0,t.jsx)(n.p,{children:'Run the "Explorer: Focus on Outline View" command to open the symbol outline for\nthe current file in the sidebar.'}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/T0kVJsr.gif",alt:"Document Symbols Outline"})}),"\n",(0,t.jsx)(n.p,{children:'Run the "Open Symbol in File" command to search for a symbol in the current file\nwithout opening the sidebar.'}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/0PJ4brd.png",alt:"Document Symbols Command"})}),"\n",(0,t.jsxs)(n.p,{children:["As you type, the symbol outline is also visible at the top of the file.\n",(0,t.jsx)(n.img,{src:"https://i.imgur.com/L217n4q.png",alt:"Document Symbols Outline"})]}),"\n",(0,t.jsx)(n.h2,{id:"go-to-parent-code-lenses",children:"Go to parent code lenses"}),"\n",(0,t.jsx)(n.p,{children:"Metals has the ability to display code lenses that, when invoked,\nwill go to the parent class that contains the definition of the method or symbol.\nUnfortunately, it might cause some lag in larger code bases,\nwhich is why it is not enabled currently by default."}),"\n",(0,t.jsxs)(n.p,{children:["To enable the feature you need to modify the setting ",(0,t.jsx)(n.code,{children:"metals.superMethodLensesEnabled"})," to ",(0,t.jsx)(n.code,{children:"true"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"Even without using the code lenses it's still possible to navigate the method hierarchy\nusing two commands:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"Metals: Go to super method"})," - immediately goes to the parent of the method the cursor is pointing to"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"Metals: Reveal super method hierachy"})," - displays the full method hierachy and enables to move to any parent,\nit is best used with the Metals Quick Pick extension."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"You can also bind those commands to a shortcut."}),"\n",(0,t.jsx)(n.h2,{id:"create-new-project-from-template",children:"Create new project from template"}),"\n",(0,t.jsxs)(n.p,{children:["It is possible using Metals to easily setup a new project using the exiting ",(0,t.jsx)(n.a,{href:"https://github.com/foundweekends/giter8/wiki/giter8-templates",children:"giter8"})," templates.\nThis is an equivalent to the ",(0,t.jsx)(n.code,{children:"sbt new"})," command, which uses the same mechanism.\nThere is a great number of templates already available and it should be easy to find something for yourself.\nTo start the setup you can use the Metals: New Scala project command, which works as following:"]}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Choose the template and then:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"Use the proposed templates."}),"\n",(0,t.jsx)(n.li,{children:'Choose "Discover more" and then choose from the list downloaded from the Giter8 wiki page.'}),"\n",(0,t.jsxs)(n.li,{children:["Input a custom Github repository following the ",(0,t.jsx)(n.code,{children:"organization/repo"})," schema."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Navigate to the parent directory that you want to create your new project in."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Choose the name or accept the default one."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Choose whether to open a new window for the created project or use the existing one."}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:'The same command will be invoked when clicking the "New Scala Project" button in the Metals view.'}),"\n",(0,t.jsxs)(n.p,{children:["If you feel like a template should be included in the default displayed ones do not hesitate to create a\n",(0,t.jsx)(n.a,{href:"https://github.com/scalameta/metals/blob/cda5b8c2029e5f201fb8d0636e0365d796407bd9/metals/src/main/scala/scala/meta/internal/builds/NewProjectProvider.scala#L308",children:"PR"}),"\nor file an issue."]}),"\n",(0,t.jsx)(n.h2,{id:"running-and-debugging-your-code",children:"Running and debugging your code"}),"\n",(0,t.jsxs)(n.p,{children:["Metals supports running and debugging tests and main methods via the\n",(0,t.jsx)(n.a,{href:"https://microsoft.github.io/debug-adapter-protocol/",children:"Debug Adapter Protocol"}),".\nThe protocol is used to communicate between the editor and debugger, which means\nthat applications can be run the same as for any other language in the natively\nsupported ",(0,t.jsx)(n.code,{children:"Run"})," view. When using Metals the debugger itself is\n",(0,t.jsx)(n.a,{href:"https://scalacenter.github.io/bloop/",children:"Bloop"}),", which is also responsible for\nstarting the actual process."]}),"\n",(0,t.jsx)(n.p,{children:"Users can begin the debugging session in two ways:"}),"\n",(0,t.jsx)(n.h3,{id:"via-code-lenses",children:"via code lenses"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/5nTnrcS.png",alt:"lenses"})}),"\n",(0,t.jsxs)(n.p,{children:["For each main or test class Metals shows two code lenses ",(0,t.jsx)(n.code,{children:"run | debug"})," or\n",(0,t.jsx)(n.code,{children:"test | test debug"}),", which show up above the definition as a kind of virtual\ntext. Clicking ",(0,t.jsx)(n.code,{children:"run"})," or ",(0,t.jsx)(n.code,{children:"test"})," will start running the main class or test without\nstopping at any breakpoints, while clicking ",(0,t.jsx)(n.code,{children:"debug"})," or ",(0,t.jsx)(n.code,{children:"test debug"})," will pause\nonce any of them are hit. It's not possible to add any arguments or java\nproperties when running using this method."]}),"\n",(0,t.jsxs)(n.h3,{id:"via-a-launchjson-configuration",children:["via a ",(0,t.jsx)(n.code,{children:"launch.json"})," configuration"]}),"\n",(0,t.jsxs)(n.p,{children:["Visual Studio Code uses ",(0,t.jsx)(n.code,{children:".vscode/launch.json"})," to store user defined\nconfigurations, which can be run using:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.code,{children:"Run -> Start Debugging"})," menu item or ",(0,t.jsx)(n.code,{children:"workbench.action.debug.start"}),"\nshortcut."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.code,{children:"Run -> Run Without Debugging"})," menu item or ",(0,t.jsx)(n.code,{children:"workbench.action.debug.run"}),"\nshortcut."]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"If a user doesn't have anything yet saved, a configuration wizard will pop up to\nguide them. In the end users should end up with something like this:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "version": "0.2.0",\n "configurations": [\n // Main class configuration\n {\n "type": "scala",\n "request": "launch",\n // configuration name visible for the user\n "name": "Launch Main",\n // full name of the class to run\n "mainClass": "com.example.Main",\n // optional arguments for the main class\n "args": [],\n // optional jvm properties to use\n "jvmOptions": []\n },\n // Test class configuration\n {\n "type": "scala",\n "request": "launch",\n // configuration name visible for the user\n "name": "Launch Test",\n // full name of the class to run\n "testClass": "com.example.Test"\n },\n // Attach debugger when running via:\n // `-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=localhost:5005`\n {\n "type": "scala",\n "request": "attach",\n "name": "Attach debugger",\n // name of the module that is being debugging\n "buildTarget": "root",\n // Host of the jvm to connect to\n "hostName": "localhost",\n // Port to connect to\n "port": 5005\n }\n ]\n}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["You can also add an optional build target name, which is needed in case there\nare more than one class with the same name or when launching a class from\noutside the project. Inside ",(0,t.jsx)(n.code,{children:'"configurations":'})," add the key ",(0,t.jsx)(n.code,{children:"buildTarget"})," with\nyour target name, e.g. ",(0,t.jsx)(n.code,{children:"root"}),":"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:' "buildTarget": "root"\n'})}),"\n",(0,t.jsxs)(n.p,{children:["The build target name corresponds to your project name. For example in sbt for\n",(0,t.jsx)(n.code,{children:"lazy val interfaces = project"})," the name of the build target will be\n",(0,t.jsx)(n.code,{children:"interfaces"})," for sources and ",(0,t.jsx)(n.code,{children:"interfaces-test"})," for tests. To make sure you have\nthe correct target names please run the command ",(0,t.jsx)(n.code,{children:"Metals: Run Doctor"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["Multiple configurations can be stored in that file and can be chosen either\nmanually in the ",(0,t.jsx)(n.code,{children:"Run"})," view or can be picked by invoking a shortcut defined under\n",(0,t.jsx)(n.code,{children:"workbench.action.debug.selectandstart"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"via-metals-commands",children:"via Metals' commands"}),"\n",(0,t.jsx)(n.p,{children:"You can also use commands that can be easily bound to shortcuts:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"metals.run-current-file"})," - Run main class in the current file."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"metals.test-current-file"})," - Run test class in the current file"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"metals.test-current-target"})," - Run all tests in the current project."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["To assign shortcuts just go to the Keyboard Shortcuts page (",(0,t.jsx)(n.code,{children:"File"})," ->\n",(0,t.jsx)(n.code,{children:"Preferences"})," -> ",(0,t.jsx)(n.code,{children:"Keyboard Shortcuts"}),") and search for a command, click on it and\nuse your preferred shortcut."]}),"\n",(0,t.jsx)(n.h2,{id:"on-type-formatting-for-multiline-string-formatting",children:"On type formatting for multiline string formatting"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://imgur.com/a0O2vCs.gif",alt:"on-type"})}),"\n",(0,t.jsxs)(n.p,{children:["To properly support adding ",(0,t.jsx)(n.code,{children:"|"})," in multiline strings we are using the\n",(0,t.jsx)(n.code,{children:"onTypeFormatting"})," method. The functionality is enabled by default, but you can\ndisable/enable ",(0,t.jsx)(n.code,{children:"onTypeFormatting"})," inside Visual Studio Code settings by checking\n",(0,t.jsx)(n.code,{children:"Editor: Format On Type"}),":"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/s6nT9rC.png",alt:"on-type-setting"})}),"\n",(0,t.jsx)(n.h2,{id:"formatting-on-paste-for-multiline-strings",children:"Formatting on paste for multiline strings"}),"\n",(0,t.jsxs)(n.p,{children:["Whenever text is paste into a multiline string with ",(0,t.jsx)(n.code,{children:"|"})," it will be properly\nformatted by Metals:"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/fF0XWYC.gif",alt:"format-on-paste"})}),"\n",(0,t.jsxs)(n.p,{children:["This feature is enabled by default. If you need to disable/enable formatting on\npaste in Visual Studio Code you can check the ",(0,t.jsx)(n.code,{children:"Editor: Format On Paste"})," setting:"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/rMrk27F.png",alt:"format-on-paste-setting"})}),"\n",(0,t.jsx)(n.h2,{id:"worksheets",children:"Worksheets"}),"\n",(0,t.jsxs)(n.p,{children:["Worksheets are a great way to explore an api, try out an idea, or code\nup an example and quickly see the evaluated expression or result. Behind\nthe scenes worksheets are powered by the great work done in\n",(0,t.jsx)(n.a,{href:"https://scalameta.org/mdoc/",children:"mdoc"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"getting-started-with-worksheets",children:"Getting started with Worksheets"}),"\n",(0,t.jsxs)(n.p,{children:["To get started with a worksheet you can either use the ",(0,t.jsx)(n.code,{children:"metals.new-scala-file"}),"\ncommand and select ",(0,t.jsx)(n.em,{children:"Worksheet"})," or create a file called ",(0,t.jsx)(n.code,{children:"*.worksheet.sc"}),".\nThis format is important since this is what tells Metals that it's meant to be\ntreated as a worksheet and not just a Scala script. Where you create the\nscript also matters. If you'd like to use classes and values from your\nproject, you need to make sure the worksheet is created inside of your sources next to any existing Scala files.\ndirectory. You can still create a worksheet in other places, but you will\nonly have access to the standard library and your dependencies."]}),"\n",(0,t.jsx)(n.h3,{id:"evaluations",children:"Evaluations"}),"\n",(0,t.jsx)(n.p,{children:"After saving you'll see the result of the expression as a decoration at the end of the line.\nYou may not see the full result for example if it's too long, so you are also\nable to hover on the decoration to expand the decoration."}),"\n",(0,t.jsxs)(n.p,{children:["Keep in mind that you don't need to wrap your code in an ",(0,t.jsx)(n.code,{children:"object"}),". In worksheets\neverything can be evaluated at the top level."]}),"\n",(0,t.jsx)(n.h3,{id:"using-dependencies-in-worksheets",children:"Using dependencies in worksheets"}),"\n",(0,t.jsx)(n.p,{children:"You are able to include an external dependency in your worksheet by including\nit in one of the following two ways."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-scala",children:"// $dep.`organisation`::artifact:version` style\nimport $dep.`com.lihaoyi::scalatags:0.7.0`\n\n// $ivy.`organisation::artifact:version` style\nimport $ivy.`com.lihaoyi::scalatags:0.7.0`\n"})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"::"})," is the same as ",(0,t.jsx)(n.code,{children:"%%"})," in sbt, which will append the current Scala binary version\nto the artifact name."]}),"\n",(0,t.jsxs)(n.p,{children:["You can also import ",(0,t.jsx)(n.code,{children:"scalac"})," options in a special ",(0,t.jsx)(n.code,{children:"$scalac"})," import like below:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-scala",children:"import $scalac.`-Ywarn-unused`\n"})}),"\n",(0,t.jsx)(n.h3,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,t.jsx)(n.p,{children:"Since worksheets are not standard Scala files, you may run into issues with some constructs.\nFor example, you may see an error like this:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"value classes may not be a member of another class - mdoc\n"})}),"\n",(0,t.jsx)(n.p,{children:"This means that one of the classes defined in the worksheet extends AnyVal, which is\nnot currently supported. You can work around this by moving the class to a separate file or removing\nthe AnyVal parent."}),"\n",(0,t.jsx)(n.h2,{id:"running-scalafix-rules",children:"Running scalafix rules"}),"\n",(0,t.jsxs)(n.p,{children:["Scalafix allows users to specify some refactoring and linting rules that can be applied to your\ncodebase. Please checkout the ",(0,t.jsx)(n.a,{href:"https://scalacenter.github.io/scalafix",children:"scalafix website"})," for more information."]}),"\n",(0,t.jsxs)(n.p,{children:["Since Metals v0.11.7 it's now possible to run scalafix rules using a special\ncommand ",(0,t.jsx)(n.code,{children:"metals.scalafix-run"}),". In VS Code can be also run using the default shortcut of ",(0,t.jsx)(n.code,{children:"shift + alt + ctrl + o"}),".\nThis should run all the rules defined in your ",(0,t.jsx)(n.code,{children:".scalafix.conf"})," file. All built-in rules\nand the ",(0,t.jsx)(n.a,{href:"https://scalacenter.github.io/scalafix/docs/rules/community-rules.html#hygiene-rules",children:"community hygiene ones"})," can\nbe run without any additional settings. However, for all the other rules users need to\nadd an additional dependency in the ",(0,t.jsx)(n.code,{children:"metals.scalafixRulesDependencies"})," user setting.\nThose rules need to be in form of strings such as ",(0,t.jsx)(n.code,{children:"com.github.liancheng::organize-imports:0.6.0"}),", which\nfollows the same convention as ",(0,t.jsx)(n.a,{href:"https://get-coursier.io/",children:"coursier dependencies"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"A sample scalafix configuration can be seen below:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-hocon",children:'rules = [\n OrganizeImports,\n ExplicitResultTypes,\n RemoveUnused\n]\n\nRemoveUnused.imports = false\n\nOrganizeImports.groupedImports = Explode\nOrganizeImports.expandRelative = true\nOrganizeImports.removeUnused = true\nOrganizeImports.groups = [\n "re:javax?\\."\n "scala."\n "scala.meta."\n "*"\n]\n\n'})}),"\n",(0,t.jsx)(n.h2,{id:"searching-a-symbol-in-the-workspace",children:"Searching a symbol in the workspace"}),"\n",(0,t.jsxs)(n.p,{children:['Metals provides an alternative command to the native "Go to symbol in workspace..." command, in order to work around some VS Code limitations (see ',(0,t.jsx)(n.a,{href:"https://github.com/microsoft/vscode/issues/98125",children:"this issue"})," for more context) and provide richer search capabilities."]}),"\n",(0,t.jsx)(n.p,{children:'You can invoke this command from the command palette (look for "Metals: Search symbol in workspace").\nOptionally you can also bind this command to a shortcut. For example, if you want to replace the native command with the Metals one you can configure this shortcut:'}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-js",children:' {\n "key": "ctrl+t", // or "cmd+t" if you\'re on macOS\n "command": "metals.symbol-search",\n "when": "editorLangId == scala"\n }\n'})}),"\n",(0,t.jsx)(n.h2,{id:"test-explorer",children:"Test Explorer"}),"\n",(0,t.jsxs)(n.p,{children:["Metals 0.11.0 implements Visual Studio Code's ",(0,t.jsx)(n.a,{href:"https://code.visualstudio.com/api/extension-guides/testing",children:"Testing API"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"Test Explorer UI is a new default way to run/debug test suites and replaces Code\nLenses. The new UI adds a testing view, which shows all test suites declared in\nproject's modules. From this panel it's possible to"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"view all discovered test suites grouped by build targets (modules) and filter them"}),"\n",(0,t.jsx)(n.li,{children:"run/debug test"}),"\n",(0,t.jsx)(n.li,{children:"navigate to test's definition."}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/Z3VtS0O.gif",alt:"test-explorer"})}),"\n",(0,t.jsx)(n.p,{children:"NOTE: While Metals detects test suites for most of existing testing\nframeworks, support for recognizing individual tests is more limited.\nMetals supports the current set of test frameworks when it comes to\nindividual test discovery:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Junit"}),"\n",(0,t.jsx)(n.li,{children:"MUnit"}),"\n",(0,t.jsxs)(n.li,{children:["ScalatestIf you encounter an error, create an ",(0,t.jsx)(n.a,{href:"https://github.com/scalameta/metals/issues",children:"issue"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"coming-from-intellij",children:"Coming from IntelliJ"}),"\n",(0,t.jsxs)(n.p,{children:["Install the\n",(0,t.jsx)(n.a,{href:"https://marketplace.visualstudio.com/items?itemName=k--kato.intellij-idea-keybindings",children:"IntelliJ IDEA Keybindings"}),"\nextension to use default IntelliJ shortcuts with VS Code."]}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"IntelliJ"}),(0,t.jsx)(n.th,{children:"VS Code"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Go to class"}),(0,t.jsx)(n.td,{children:"Go to symbol in workspace"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Parameter info"}),(0,t.jsx)(n.td,{children:"Trigger parameter hints"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Basic completion"}),(0,t.jsx)(n.td,{children:"Trigger suggest"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Type info"}),(0,t.jsx)(n.td,{children:"Show hover"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Expand"}),(0,t.jsx)(n.td,{children:"Fold"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Extend Selection"}),(0,t.jsx)(n.td,{children:"Expand selection"})]})]})]}),"\n",(0,t.jsx)(n.h2,{id:"github-codespaces-and-githubdev-support",children:"GitHub Codespaces and GitHub.dev support"}),"\n",(0,t.jsxs)(n.p,{children:["See ",(0,t.jsx)(n.a,{href:"https://scalameta.org/metals/docs/editors/online-ides#github-codespaces-and-githubdev",children:"https://scalameta.org/metals/docs/editors/online-ides#github-codespaces-and-githubdev"})]})]})}function h(e={}){const{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},1151:(e,n,s)=>{s.d(n,{Z:()=>a,a:()=>r});var t=s(7294);const i={},o=t.createContext(i);function r(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/970a5f4e.af88a397.js b/assets/js/970a5f4e.af88a397.js
deleted file mode 100644
index 85f03d21ee7..00000000000
--- a/assets/js/970a5f4e.af88a397.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6561],{9557:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>a,toc:()=>c});var t=s(5893),i=s(1151);const o={id:"vscode",sidebar_label:"VS Code",title:"Visual Studio Code"},r=void 0,a={id:"editors/vscode",title:"Visual Studio Code",description:"Goto Definition",source:"@site/target/docs/editors/vscode.md",sourceDirName:"editors",slug:"/editors/vscode",permalink:"/metals/docs/editors/vscode",draft:!1,unlisted:!1,editUrl:"https://github.com/scalameta/metals/edit/main/docs/editors/vscode.md",tags:[],version:"current",frontMatter:{id:"vscode",sidebar_label:"VS Code",title:"Visual Studio Code"},sidebar:"docs",previous:{title:"Overview",permalink:"/metals/docs/"},next:{title:"Vim",permalink:"/metals/docs/editors/vim"}},l={},c=[{value:"Requirements",id:"requirements",level:2},{value:"Installation",id:"installation",level:2},{value:"Importing a build",id:"importing-a-build",level:2},{value:"Custom sbt launcher",id:"custom-sbt-launcher",level:3},{value:"Speeding up import",id:"speeding-up-import",level:3},{value:"Importing changes",id:"importing-changes",level:3},{value:"Manually trigger build import",id:"manually-trigger-build-import",level:3},{value:"Run doctor",id:"run-doctor",level:2},{value:"Configure Java version",id:"configure-java-version",level:2},{value:"macOS",id:"macos",level:3},{value:"Custom artifact repositories (Maven or Ivy resolvers)",id:"custom-artifact-repositories-maven-or-ivy-resolvers",level:2},{value:"HTTP proxy",id:"http-proxy",level:2},{value:"Using latest Metals SNAPSHOT",id:"using-latest-metals-snapshot",level:2},{value:"Files and Directories to include in your Gitignore",id:"files-and-directories-to-include-in-your-gitignore",level:2},{value:"Show document symbols",id:"show-document-symbols",level:2},{value:"Go to parent code lenses",id:"go-to-parent-code-lenses",level:2},{value:"Create new project from template",id:"create-new-project-from-template",level:2},{value:"Running and debugging your code",id:"running-and-debugging-your-code",level:2},{value:"via code lenses",id:"via-code-lenses",level:3},{value:"via a launch.json configuration",id:"via-a-launchjson-configuration",level:3},{value:"via Metals' commands",id:"via-metals-commands",level:3},{value:"On type formatting for multiline string formatting",id:"on-type-formatting-for-multiline-string-formatting",level:2},{value:"Formatting on paste for multiline strings",id:"formatting-on-paste-for-multiline-strings",level:2},{value:"Worksheets",id:"worksheets",level:2},{value:"Getting started with Worksheets",id:"getting-started-with-worksheets",level:3},{value:"Evaluations",id:"evaluations",level:3},{value:"Using dependencies in worksheets",id:"using-dependencies-in-worksheets",level:3},{value:"Troubleshooting",id:"troubleshooting",level:3},{value:"Running scalafix rules",id:"running-scalafix-rules",level:2},{value:"Searching a symbol in the workspace",id:"searching-a-symbol-in-the-workspace",level:2},{value:"Test Explorer",id:"test-explorer",level:2},{value:"Coming from IntelliJ",id:"coming-from-intellij",level:2},{value:"GitHub Codespaces and GitHub.dev support",id:"github-codespaces-and-githubdev-support",level:2}];function d(e){const n={a:"a",blockquote:"blockquote",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://user-images.githubusercontent.com/1408093/48776422-1f764f00-ecd0-11e8-96d1-170f2354d50e.gif",alt:"Goto Definition"})}),"\n",(0,t.jsx)(n.h2,{id:"requirements",children:"Requirements"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Java 8, 11, 17 provided by OpenJDK or Oracle"}),". Eclipse OpenJ9 is not\nsupported, please make sure the ",(0,t.jsx)(n.code,{children:"JAVA_HOME"})," environment variable\npoints to a valid Java 8, 11 or 17 installation."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"macOS, Linux or Windows"}),". Metals is developed on many operating systems and\nevery PR is tested on Ubuntu, Windows and MacOS."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Scala 2.13, 2.12, 2.11 and Scala 3"}),". Metals supports these Scala versions:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Scala 2.13"}),":\n2.13.12, 2.13.11, 2.13.10, 2.13.9, 2.13.8, 2.13.7, 2.13.6, 2.13.5"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Scala 2.12"}),":\n2.12.18, 2.12.17, 2.12.16, 2.12.15, 2.12.14, 2.12.13, 2.12.12, 2.12.11"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Scala 2.11"}),":\n2.11.12"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Scala 3"}),":\n3.3.1, 3.3.0, 3.2.2, 3.2.1, 3.2.0, 3.1.3, 3.1.2, 3.1.1, 3.1.0"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Note that 2.11.x support is deprecated and it will be removed in future releases.\nIt's recommended to upgrade to Scala 2.12 or Scala 2.13"}),"\n",(0,t.jsx)(n.h2,{id:"installation",children:"Installation"}),"\n",(0,t.jsxs)(n.p,{children:["Install the Metals extension from the\n",(0,t.jsx)(n.a,{href:"https://marketplace.visualstudio.com/items?itemName=scalameta.metals",children:"Marketplace"})," by clicking on this badge ",(0,t.jsx)(n.a,{href:"vscode:extension/scalameta.metals",children:(0,t.jsx)(n.img,{src:"https://img.shields.io/badge/metals-vscode-blue.png",alt:"Install Metals extension"})})," or via the VS Code editor:"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://imgur.com/Qew0fNH.png",alt:"install stable version"})}),"\n",(0,t.jsxs)(n.blockquote,{children:["\n",(0,t.jsxs)(n.p,{children:["Make sure to disable the extensions\n",(0,t.jsx)(n.a,{href:"https://marketplace.visualstudio.com/items?itemName=dragos.scala-lsp",children:"Scala Language Server"}),"\nand\n",(0,t.jsx)(n.a,{href:"https://marketplace.visualstudio.com/items?itemName=lightbend.vscode-sbt-scala",children:"Scala (sbt)"}),"\nif they are installed. The\n",(0,t.jsx)(n.a,{href:"https://marketplace.visualstudio.com/items?itemName=lampepfl.dotty",children:"Dotty Language Server"}),"\ndoes ",(0,t.jsx)(n.strong,{children:"not"})," need to be disabled because the Metals and Dotty extensions don't\nconflict with each other. However, if you want to work on Scala 3 code in a\nworkspace that was previously opened with ",(0,t.jsx)(n.code,{children:"Dotty Language Server"})," you need to\nfirst remove ",(0,t.jsx)(n.code,{children:".dotty-ide-artifact"})," before opening the workspace with Metals."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Next, open a directory containing your Scala code. The extension activates when\nthe main directory contains ",(0,t.jsx)(n.code,{children:"build.sbt"})," or ",(0,t.jsx)(n.code,{children:"build.sc"})," file, a Scala file is\nopened, which includes ",(0,t.jsx)(n.code,{children:"*.sbt"}),", ",(0,t.jsx)(n.code,{children:"*.scala"})," and ",(0,t.jsx)(n.code,{children:"*.sc"})," file, or a standard Scala\ndirectory structure ",(0,t.jsx)(n.code,{children:"src/main/scala"})," is detected."]}),"\n",(0,t.jsxs)(n.p,{children:["It is also possible to opt in to install the pre-release version and try out the latest cutting edge features from Metals server.\nApart from new features, pre-release versions also include many bugfixes. It's encouraged to use them with ",(0,t.jsx)(n.a,{href:"#SNAPSHOT",children:"SNAPSHOT"})," releases of Metals server. Using pre-release versions may result in less stable experience and it is not indented for beginners.\nPre-release versions follow ",(0,t.jsx)(n.code,{children:"major.minor.PATCH"})," versioning."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://imgur.com/CzOTleE.png",alt:"Install the pre-release extension"})}),"\n",(0,t.jsx)(n.h2,{id:"importing-a-build",children:"Importing a build"}),"\n",(0,t.jsx)(n.p,{children:'The first time you open Metals in a new workspace it prompts you to import the build.\nClick "Import build" to start the installation step.'}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/0VqZWay.png",alt:"Import build"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:'"Not now" disables this prompt for 2 minutes.'}),"\n",(0,t.jsxs)(n.li,{children:['"Don\'t show again" disables this prompt forever, use ',(0,t.jsx)(n.code,{children:"rm -rf .metals/"})," to re-enable\nthe prompt."]}),"\n",(0,t.jsxs)(n.li,{children:["Use ",(0,t.jsx)(n.code,{children:"tail -f .metals/metals.log"})," to watch the build import progress."]}),"\n",(0,t.jsxs)(n.li,{children:["Behind the scenes, Metals uses ",(0,t.jsx)(n.a,{href:"https://scalacenter.github.io/bloop/",children:"Bloop"})," to\nimport sbt builds, but you don't need Bloop installed on your machine to run this step."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Once the import step completes, compilation starts for your open ",(0,t.jsx)(n.code,{children:"*.scala"}),"\nfiles."]}),"\n",(0,t.jsx)(n.p,{children:"Once the sources have compiled successfully, you can navigate the codebase with\ngoto definition."}),"\n",(0,t.jsx)(n.h3,{id:"custom-sbt-launcher",children:"Custom sbt launcher"}),"\n",(0,t.jsxs)(n.p,{children:["By default, Metals runs an embedded ",(0,t.jsx)(n.code,{children:"sbt-launch.jar"})," launcher that respects ",(0,t.jsx)(n.code,{children:".sbtopts"})," and ",(0,t.jsx)(n.code,{children:".jvmopts"}),".\nHowever, the environment variables ",(0,t.jsx)(n.code,{children:"SBT_OPTS"})," and ",(0,t.jsx)(n.code,{children:"JAVA_OPTS"})," are not respected."]}),"\n",(0,t.jsxs)(n.p,{children:['Update the "Sbt Script" setting to use a custom ',(0,t.jsx)(n.code,{children:"sbt"})," script instead of the\ndefault Metals launcher if you need further customizations like reading environment\nvariables."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/NuwEBe4.png",alt:"Sbt Launcher"})}),"\n",(0,t.jsx)(n.h3,{id:"speeding-up-import",children:"Speeding up import"}),"\n",(0,t.jsx)(n.p,{children:'The "Import build" step can take a long time, especially the first time you\nrun it in a new build. The exact time depends on the complexity of the build and\nif library dependencies need to be downloaded. For example, this step can take\neverything from 10 seconds in small cached builds up to 10-15 minutes in large\nuncached builds.'}),"\n",(0,t.jsxs)(n.p,{children:["Consult the ",(0,t.jsx)(n.a,{href:"https://scalacenter.github.io/bloop/docs/build-tools/sbt#speeding-up-build-export",children:"Bloop documentation"}),"\nto learn how to speed up build import."]}),"\n",(0,t.jsx)(n.h3,{id:"importing-changes",children:"Importing changes"}),"\n",(0,t.jsxs)(n.p,{children:["When you change ",(0,t.jsx)(n.code,{children:"build.sbt"})," or sources under ",(0,t.jsx)(n.code,{children:"project/"}),", you will be prompted to\nre-import the build."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/72kdZkL.png",alt:"Import sbt changes"})}),"\n",(0,t.jsx)(n.h3,{id:"manually-trigger-build-import",children:"Manually trigger build import"}),"\n",(0,t.jsxs)(n.p,{children:['To manually trigger a build import, execute the "Import build" command through\nthe command palette (',(0,t.jsx)(n.code,{children:"Cmd + Shift + P"}),")."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/QHLKt8u.png",alt:"Import build command"})}),"\n",(0,t.jsx)(n.h2,{id:"run-doctor",children:"Run doctor"}),"\n",(0,t.jsx)(n.p,{children:'Execute the "Run Doctor" through the command palette to troubleshoot potential\nconfiguration problems in your workspace.'}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/K02g0UM.png",alt:"Run doctor command"})}),"\n",(0,t.jsx)(n.h2,{id:"configure-java-version",children:"Configure Java version"}),"\n",(0,t.jsxs)(n.p,{children:["The VS Code plugin uses by default the ",(0,t.jsx)(n.code,{children:"JAVA_HOME"})," environment variable (via\n",(0,t.jsx)(n.a,{href:"https://www.npmjs.com/package/locate-java-home",children:(0,t.jsx)(n.code,{children:"locate-java-home"})}),") to locate\nthe ",(0,t.jsx)(n.code,{children:"java"}),' executable. To override the default Java home location, update the\n"Java Home" variable in the settings menu.']}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/sKrPKk2.png",alt:"Java Home setting"})}),"\n",(0,t.jsxs)(n.p,{children:["If this setting is defined, the VS Code plugin uses the custom path instead of\nthe ",(0,t.jsx)(n.code,{children:"JAVA_HOME"})," environment variable."]}),"\n",(0,t.jsx)(n.h3,{id:"macos",children:"macOS"}),"\n",(0,t.jsxs)(n.p,{children:["To globally configure ",(0,t.jsx)(n.code,{children:"$JAVA_HOME"})," for all GUI applications, see\n",(0,t.jsx)(n.a,{href:"https://stackoverflow.com/questions/135688/setting-environment-variables-on-os-x",children:"this Stackoverflow answer"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"If you prefer to manually configure Java home through VS Code, run the following\ncommand to copy the Java 8 home path."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sh",children:"/usr/libexec/java_home -v 1.8 | pbcopy\n"})}),"\n",(0,t.jsx)(n.h2,{id:"custom-artifact-repositories-maven-or-ivy-resolvers",children:"Custom artifact repositories (Maven or Ivy resolvers)"}),"\n",(0,t.jsxs)(n.p,{children:["Use the 'Custom Repositories' setting for the Metals VS Code extension to tell\n",(0,t.jsx)(n.a,{href:"https://get-coursier.io/docs/other-proxy",children:"Coursier"})," to try to download Metals\nartifacts from your private artifact repository."]}),"\n",(0,t.jsxs)(n.p,{children:["Use ",(0,t.jsx)(n.code,{children:".jvmopts"})," to set sbt options\n(",(0,t.jsx)(n.a,{href:"https://www.scala-sbt.org/1.0/docs/Proxy-Repositories.html",children:"https://www.scala-sbt.org/1.0/docs/Proxy-Repositories.html"}),") for\n",(0,t.jsx)(n.code,{children:"sbt bloopInstall"})," which resolves library dependencies. You can also provide a\ncustom sbt script (see 'Custom sbt launcher')."]}),"\n",(0,t.jsx)(n.h2,{id:"http-proxy",children:"HTTP proxy"}),"\n",(0,t.jsxs)(n.p,{children:["Metals uses ",(0,t.jsx)(n.a,{href:"https://get-coursier.io/docs/other-proxy",children:"Coursier"})," to download\nartifacts from Maven Central. To use Metals behind an HTTP proxy, configure the\nsystem properties ",(0,t.jsx)(n.code,{children:"-Dhttps.proxyHost=\u2026 -Dhttps.proxyPort=\u2026"})," in one of the\nfollowing locations:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:".jvmopts"})," file in the workspace directory."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"JAVA_OPTS"})," environment variable, make sure to start ",(0,t.jsx)(n.code,{children:"code"})," from your terminal\nwhen using this option since environment variables don't always propagate\ncorrectly when opening VS Code as a GUI application outside a terminal."]}),"\n",(0,t.jsx)(n.li,{children:'"Server Properties" setting for the Metals VS Code extension, which can be\nconfigured per-workspace or per-user.'}),"\n"]}),"\n",(0,t.jsxs)(n.h2,{id:"using-latest-metals-snapshot",children:["Using latest Metals ",(0,t.jsx)("a",{name:"SNAPSHOT",children:"SNAPSHOT"})]}),"\n",(0,t.jsx)(n.p,{children:'Update the "Server Version" setting to try out the latest pending Metals\nfeatures.'}),"\n",(0,t.jsxs)("table",{children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:"Version"}),(0,t.jsx)("th",{children:"Published"})]})}),(0,t.jsxs)("tbody",{children:[(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"1.2.0+13-615add64-SNAPSHOT"}),(0,t.jsx)("td",{children:"15 Dec 2023 18:44"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"1.2.0+13-615add64-SNAPSHOT"}),(0,t.jsx)("td",{children:"15 Dec 2023 18:29"})]})]})]}),"\n",(0,t.jsx)(n.p,{children:'Run the "Reload Window" command after updating the setting for the new version\nto take effect.'}),"\n",(0,t.jsx)(n.h2,{id:"files-and-directories-to-include-in-your-gitignore",children:"Files and Directories to include in your Gitignore"}),"\n",(0,t.jsxs)(n.p,{children:["The Metals server places logs and other files in the ",(0,t.jsx)(n.code,{children:".metals"})," directory. The\nBloop compile server places logs and compilation artifacts in the ",(0,t.jsx)(n.code,{children:".bloop"}),"\ndirectory. The Bloop plugin that generates Bloop configuration is added in the\n",(0,t.jsx)(n.code,{children:"metals.sbt"})," file, which is added at ",(0,t.jsx)(n.code,{children:"project/metals.sbt"})," as well as further\n",(0,t.jsx)(n.code,{children:"project"})," directories depending on how deep ",(0,t.jsx)(n.code,{children:"*.sbt"})," files need to be supported.\nTo support each ",(0,t.jsx)(n.code,{children:"*.sbt"})," file Metals needs to create an additional file at\n",(0,t.jsx)(n.code,{children:"./project/project/metals.sbt"})," relative to the sbt file.\nWorking with Ammonite scripts will place compiled scripts into the ",(0,t.jsx)(n.code,{children:".ammonite"})," directory.\nIt's recommended to exclude these directories and files\nfrom version control systems like git."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sh",children:"# ~/.gitignore\n.metals/\n.bloop/\n.ammonite/\nmetals.sbt\n"})}),"\n",(0,t.jsx)(n.h2,{id:"show-document-symbols",children:"Show document symbols"}),"\n",(0,t.jsx)(n.p,{children:'Run the "Explorer: Focus on Outline View" command to open the symbol outline for\nthe current file in the sidebar.'}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/T0kVJsr.gif",alt:"Document Symbols Outline"})}),"\n",(0,t.jsx)(n.p,{children:'Run the "Open Symbol in File" command to search for a symbol in the current file\nwithout opening the sidebar.'}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/0PJ4brd.png",alt:"Document Symbols Command"})}),"\n",(0,t.jsxs)(n.p,{children:["As you type, the symbol outline is also visible at the top of the file.\n",(0,t.jsx)(n.img,{src:"https://i.imgur.com/L217n4q.png",alt:"Document Symbols Outline"})]}),"\n",(0,t.jsx)(n.h2,{id:"go-to-parent-code-lenses",children:"Go to parent code lenses"}),"\n",(0,t.jsx)(n.p,{children:"Metals has the ability to display code lenses that, when invoked,\nwill go to the parent class that contains the definition of the method or symbol.\nUnfortunately, it might cause some lag in larger code bases,\nwhich is why it is not enabled currently by default."}),"\n",(0,t.jsxs)(n.p,{children:["To enable the feature you need to modify the setting ",(0,t.jsx)(n.code,{children:"metals.superMethodLensesEnabled"})," to ",(0,t.jsx)(n.code,{children:"true"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"Even without using the code lenses it's still possible to navigate the method hierarchy\nusing two commands:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"Metals: Go to super method"})," - immediately goes to the parent of the method the cursor is pointing to"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"Metals: Reveal super method hierachy"})," - displays the full method hierachy and enables to move to any parent,\nit is best used with the Metals Quick Pick extension."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"You can also bind those commands to a shortcut."}),"\n",(0,t.jsx)(n.h2,{id:"create-new-project-from-template",children:"Create new project from template"}),"\n",(0,t.jsxs)(n.p,{children:["It is possible using Metals to easily setup a new project using the exiting ",(0,t.jsx)(n.a,{href:"https://github.com/foundweekends/giter8/wiki/giter8-templates",children:"giter8"})," templates.\nThis is an equivalent to the ",(0,t.jsx)(n.code,{children:"sbt new"})," command, which uses the same mechanism.\nThere is a great number of templates already available and it should be easy to find something for yourself.\nTo start the setup you can use the Metals: New Scala project command, which works as following:"]}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Choose the template and then:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"Use the proposed templates."}),"\n",(0,t.jsx)(n.li,{children:'Choose "Discover more" and then choose from the list downloaded from the Giter8 wiki page.'}),"\n",(0,t.jsxs)(n.li,{children:["Input a custom Github repository following the ",(0,t.jsx)(n.code,{children:"organization/repo"})," schema."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Navigate to the parent directory that you want to create your new project in."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Choose the name or accept the default one."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Choose whether to open a new window for the created project or use the existing one."}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:'The same command will be invoked when clicking the "New Scala Project" button in the Metals view.'}),"\n",(0,t.jsxs)(n.p,{children:["If you feel like a template should be included in the default displayed ones do not hesitate to create a\n",(0,t.jsx)(n.a,{href:"https://github.com/scalameta/metals/blob/cda5b8c2029e5f201fb8d0636e0365d796407bd9/metals/src/main/scala/scala/meta/internal/builds/NewProjectProvider.scala#L308",children:"PR"}),"\nor file an issue."]}),"\n",(0,t.jsx)(n.h2,{id:"running-and-debugging-your-code",children:"Running and debugging your code"}),"\n",(0,t.jsxs)(n.p,{children:["Metals supports running and debugging tests and main methods via the\n",(0,t.jsx)(n.a,{href:"https://microsoft.github.io/debug-adapter-protocol/",children:"Debug Adapter Protocol"}),".\nThe protocol is used to communicate between the editor and debugger, which means\nthat applications can be run the same as for any other language in the natively\nsupported ",(0,t.jsx)(n.code,{children:"Run"})," view. When using Metals the debugger itself is\n",(0,t.jsx)(n.a,{href:"https://scalacenter.github.io/bloop/",children:"Bloop"}),", which is also responsible for\nstarting the actual process."]}),"\n",(0,t.jsx)(n.p,{children:"Users can begin the debugging session in two ways:"}),"\n",(0,t.jsx)(n.h3,{id:"via-code-lenses",children:"via code lenses"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/5nTnrcS.png",alt:"lenses"})}),"\n",(0,t.jsxs)(n.p,{children:["For each main or test class Metals shows two code lenses ",(0,t.jsx)(n.code,{children:"run | debug"})," or\n",(0,t.jsx)(n.code,{children:"test | test debug"}),", which show up above the definition as a kind of virtual\ntext. Clicking ",(0,t.jsx)(n.code,{children:"run"})," or ",(0,t.jsx)(n.code,{children:"test"})," will start running the main class or test without\nstopping at any breakpoints, while clicking ",(0,t.jsx)(n.code,{children:"debug"})," or ",(0,t.jsx)(n.code,{children:"test debug"})," will pause\nonce any of them are hit. It's not possible to add any arguments or java\nproperties when running using this method."]}),"\n",(0,t.jsxs)(n.h3,{id:"via-a-launchjson-configuration",children:["via a ",(0,t.jsx)(n.code,{children:"launch.json"})," configuration"]}),"\n",(0,t.jsxs)(n.p,{children:["Visual Studio Code uses ",(0,t.jsx)(n.code,{children:".vscode/launch.json"})," to store user defined\nconfigurations, which can be run using:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.code,{children:"Run -> Start Debugging"})," menu item or ",(0,t.jsx)(n.code,{children:"workbench.action.debug.start"}),"\nshortcut."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.code,{children:"Run -> Run Without Debugging"})," menu item or ",(0,t.jsx)(n.code,{children:"workbench.action.debug.run"}),"\nshortcut."]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"If a user doesn't have anything yet saved, a configuration wizard will pop up to\nguide them. In the end users should end up with something like this:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "version": "0.2.0",\n "configurations": [\n // Main class configuration\n {\n "type": "scala",\n "request": "launch",\n // configuration name visible for the user\n "name": "Launch Main",\n // full name of the class to run\n "mainClass": "com.example.Main",\n // optional arguments for the main class\n "args": [],\n // optional jvm properties to use\n "jvmOptions": []\n },\n // Test class configuration\n {\n "type": "scala",\n "request": "launch",\n // configuration name visible for the user\n "name": "Launch Test",\n // full name of the class to run\n "testClass": "com.example.Test"\n },\n // Attach debugger when running via:\n // `-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=localhost:5005`\n {\n "type": "scala",\n "request": "attach",\n "name": "Attach debugger",\n // name of the module that is being debugging\n "buildTarget": "root",\n // Host of the jvm to connect to\n "hostName": "localhost",\n // Port to connect to\n "port": 5005\n }\n ]\n}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["You can also add an optional build target name, which is needed in case there\nare more than one class with the same name or when launching a class from\noutside the project. Inside ",(0,t.jsx)(n.code,{children:'"configurations":'})," add the key ",(0,t.jsx)(n.code,{children:"buildTarget"})," with\nyour target name, e.g. ",(0,t.jsx)(n.code,{children:"root"}),":"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:' "buildTarget": "root"\n'})}),"\n",(0,t.jsxs)(n.p,{children:["The build target name corresponds to your project name. For example in sbt for\n",(0,t.jsx)(n.code,{children:"lazy val interfaces = project"})," the name of the build target will be\n",(0,t.jsx)(n.code,{children:"interfaces"})," for sources and ",(0,t.jsx)(n.code,{children:"interfaces-test"})," for tests. To make sure you have\nthe correct target names please run the command ",(0,t.jsx)(n.code,{children:"Metals: Run Doctor"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["Multiple configurations can be stored in that file and can be chosen either\nmanually in the ",(0,t.jsx)(n.code,{children:"Run"})," view or can be picked by invoking a shortcut defined under\n",(0,t.jsx)(n.code,{children:"workbench.action.debug.selectandstart"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"via-metals-commands",children:"via Metals' commands"}),"\n",(0,t.jsx)(n.p,{children:"You can also use commands that can be easily bound to shortcuts:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"metals.run-current-file"})," - Run main class in the current file."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"metals.test-current-file"})," - Run test class in the current file"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"metals.test-current-target"})," - Run all tests in the current project."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["To assign shortcuts just go to the Keyboard Shortcuts page (",(0,t.jsx)(n.code,{children:"File"})," ->\n",(0,t.jsx)(n.code,{children:"Preferences"})," -> ",(0,t.jsx)(n.code,{children:"Keyboard Shortcuts"}),") and search for a command, click on it and\nuse your preferred shortcut."]}),"\n",(0,t.jsx)(n.h2,{id:"on-type-formatting-for-multiline-string-formatting",children:"On type formatting for multiline string formatting"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://imgur.com/a0O2vCs.gif",alt:"on-type"})}),"\n",(0,t.jsxs)(n.p,{children:["To properly support adding ",(0,t.jsx)(n.code,{children:"|"})," in multiline strings we are using the\n",(0,t.jsx)(n.code,{children:"onTypeFormatting"})," method. The functionality is enabled by default, but you can\ndisable/enable ",(0,t.jsx)(n.code,{children:"onTypeFormatting"})," inside Visual Studio Code settings by checking\n",(0,t.jsx)(n.code,{children:"Editor: Format On Type"}),":"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/s6nT9rC.png",alt:"on-type-setting"})}),"\n",(0,t.jsx)(n.h2,{id:"formatting-on-paste-for-multiline-strings",children:"Formatting on paste for multiline strings"}),"\n",(0,t.jsxs)(n.p,{children:["Whenever text is paste into a multiline string with ",(0,t.jsx)(n.code,{children:"|"})," it will be properly\nformatted by Metals:"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/fF0XWYC.gif",alt:"format-on-paste"})}),"\n",(0,t.jsxs)(n.p,{children:["This feature is enabled by default. If you need to disable/enable formatting on\npaste in Visual Studio Code you can check the ",(0,t.jsx)(n.code,{children:"Editor: Format On Paste"})," setting:"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/rMrk27F.png",alt:"format-on-paste-setting"})}),"\n",(0,t.jsx)(n.h2,{id:"worksheets",children:"Worksheets"}),"\n",(0,t.jsxs)(n.p,{children:["Worksheets are a great way to explore an api, try out an idea, or code\nup an example and quickly see the evaluated expression or result. Behind\nthe scenes worksheets are powered by the great work done in\n",(0,t.jsx)(n.a,{href:"https://scalameta.org/mdoc/",children:"mdoc"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"getting-started-with-worksheets",children:"Getting started with Worksheets"}),"\n",(0,t.jsxs)(n.p,{children:["To get started with a worksheet you can either use the ",(0,t.jsx)(n.code,{children:"metals.new-scala-file"}),"\ncommand and select ",(0,t.jsx)(n.em,{children:"Worksheet"})," or create a file called ",(0,t.jsx)(n.code,{children:"*.worksheet.sc"}),".\nThis format is important since this is what tells Metals that it's meant to be\ntreated as a worksheet and not just a Scala script. Where you create the\nscript also matters. If you'd like to use classes and values from your\nproject, you need to make sure the worksheet is created inside of your sources next to any existing Scala files.\ndirectory. You can still create a worksheet in other places, but you will\nonly have access to the standard library and your dependencies."]}),"\n",(0,t.jsx)(n.h3,{id:"evaluations",children:"Evaluations"}),"\n",(0,t.jsx)(n.p,{children:"After saving you'll see the result of the expression as a decoration at the end of the line.\nYou may not see the full result for example if it's too long, so you are also\nable to hover on the decoration to expand the decoration."}),"\n",(0,t.jsxs)(n.p,{children:["Keep in mind that you don't need to wrap your code in an ",(0,t.jsx)(n.code,{children:"object"}),". In worksheets\neverything can be evaluated at the top level."]}),"\n",(0,t.jsx)(n.h3,{id:"using-dependencies-in-worksheets",children:"Using dependencies in worksheets"}),"\n",(0,t.jsx)(n.p,{children:"You are able to include an external dependency in your worksheet by including\nit in one of the following two ways."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-scala",children:"// $dep.`organisation`::artifact:version` style\nimport $dep.`com.lihaoyi::scalatags:0.7.0`\n\n// $ivy.`organisation::artifact:version` style\nimport $ivy.`com.lihaoyi::scalatags:0.7.0`\n"})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"::"})," is the same as ",(0,t.jsx)(n.code,{children:"%%"})," in sbt, which will append the current Scala binary version\nto the artifact name."]}),"\n",(0,t.jsxs)(n.p,{children:["You can also import ",(0,t.jsx)(n.code,{children:"scalac"})," options in a special ",(0,t.jsx)(n.code,{children:"$scalac"})," import like below:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-scala",children:"import $scalac.`-Ywarn-unused`\n"})}),"\n",(0,t.jsx)(n.h3,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,t.jsx)(n.p,{children:"Since worksheets are not standard Scala files, you may run into issues with some constructs.\nFor example, you may see an error like this:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"value classes may not be a member of another class - mdoc\n"})}),"\n",(0,t.jsx)(n.p,{children:"This means that one of the classes defined in the worksheet extends AnyVal, which is\nnot currently supported. You can work around this by moving the class to a separate file or removing\nthe AnyVal parent."}),"\n",(0,t.jsx)(n.h2,{id:"running-scalafix-rules",children:"Running scalafix rules"}),"\n",(0,t.jsxs)(n.p,{children:["Scalafix allows users to specify some refactoring and linting rules that can be applied to your\ncodebase. Please checkout the ",(0,t.jsx)(n.a,{href:"https://scalacenter.github.io/scalafix",children:"scalafix website"})," for more information."]}),"\n",(0,t.jsxs)(n.p,{children:["Since Metals v0.11.7 it's now possible to run scalafix rules using a special\ncommand ",(0,t.jsx)(n.code,{children:"metals.scalafix-run"}),". In VS Code can be also run using the default shortcut of ",(0,t.jsx)(n.code,{children:"shift + alt + ctrl + o"}),".\nThis should run all the rules defined in your ",(0,t.jsx)(n.code,{children:".scalafix.conf"})," file. All built-in rules\nand the ",(0,t.jsx)(n.a,{href:"https://scalacenter.github.io/scalafix/docs/rules/community-rules.html#hygiene-rules",children:"community hygiene ones"})," can\nbe run without any additional settings. However, for all the other rules users need to\nadd an additional dependency in the ",(0,t.jsx)(n.code,{children:"metals.scalafixRulesDependencies"})," user setting.\nThose rules need to be in form of strings such as ",(0,t.jsx)(n.code,{children:"com.github.liancheng::organize-imports:0.6.0"}),", which\nfollows the same convention as ",(0,t.jsx)(n.a,{href:"https://get-coursier.io/",children:"coursier dependencies"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"A sample scalafix configuration can be seen below:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-hocon",children:'rules = [\n OrganizeImports,\n ExplicitResultTypes,\n RemoveUnused\n]\n\nRemoveUnused.imports = false\n\nOrganizeImports.groupedImports = Explode\nOrganizeImports.expandRelative = true\nOrganizeImports.removeUnused = true\nOrganizeImports.groups = [\n "re:javax?\\."\n "scala."\n "scala.meta."\n "*"\n]\n\n'})}),"\n",(0,t.jsx)(n.h2,{id:"searching-a-symbol-in-the-workspace",children:"Searching a symbol in the workspace"}),"\n",(0,t.jsxs)(n.p,{children:['Metals provides an alternative command to the native "Go to symbol in workspace..." command, in order to work around some VS Code limitations (see ',(0,t.jsx)(n.a,{href:"https://github.com/microsoft/vscode/issues/98125",children:"this issue"})," for more context) and provide richer search capabilities."]}),"\n",(0,t.jsx)(n.p,{children:'You can invoke this command from the command palette (look for "Metals: Search symbol in workspace").\nOptionally you can also bind this command to a shortcut. For example, if you want to replace the native command with the Metals one you can configure this shortcut:'}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-js",children:' {\n "key": "ctrl+t", // or "cmd+t" if you\'re on macOS\n "command": "metals.symbol-search",\n "when": "editorLangId == scala"\n }\n'})}),"\n",(0,t.jsx)(n.h2,{id:"test-explorer",children:"Test Explorer"}),"\n",(0,t.jsxs)(n.p,{children:["Metals 0.11.0 implements Visual Studio Code's ",(0,t.jsx)(n.a,{href:"https://code.visualstudio.com/api/extension-guides/testing",children:"Testing API"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"Test Explorer UI is a new default way to run/debug test suites and replaces Code\nLenses. The new UI adds a testing view, which shows all test suites declared in\nproject's modules. From this panel it's possible to"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"view all discovered test suites grouped by build targets (modules) and filter them"}),"\n",(0,t.jsx)(n.li,{children:"run/debug test"}),"\n",(0,t.jsx)(n.li,{children:"navigate to test's definition."}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/Z3VtS0O.gif",alt:"test-explorer"})}),"\n",(0,t.jsx)(n.p,{children:"NOTE: While Metals detects test suites for most of existing testing\nframeworks, support for recognizing individual tests is more limited.\nMetals supports the current set of test frameworks when it comes to\nindividual test discovery:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Junit"}),"\n",(0,t.jsx)(n.li,{children:"MUnit"}),"\n",(0,t.jsxs)(n.li,{children:["ScalatestIf you encounter an error, create an ",(0,t.jsx)(n.a,{href:"https://github.com/scalameta/metals/issues",children:"issue"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"coming-from-intellij",children:"Coming from IntelliJ"}),"\n",(0,t.jsxs)(n.p,{children:["Install the\n",(0,t.jsx)(n.a,{href:"https://marketplace.visualstudio.com/items?itemName=k--kato.intellij-idea-keybindings",children:"IntelliJ IDEA Keybindings"}),"\nextension to use default IntelliJ shortcuts with VS Code."]}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"IntelliJ"}),(0,t.jsx)(n.th,{children:"VS Code"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Go to class"}),(0,t.jsx)(n.td,{children:"Go to symbol in workspace"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Parameter info"}),(0,t.jsx)(n.td,{children:"Trigger parameter hints"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Basic completion"}),(0,t.jsx)(n.td,{children:"Trigger suggest"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Type info"}),(0,t.jsx)(n.td,{children:"Show hover"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Expand"}),(0,t.jsx)(n.td,{children:"Fold"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Extend Selection"}),(0,t.jsx)(n.td,{children:"Expand selection"})]})]})]}),"\n",(0,t.jsx)(n.h2,{id:"github-codespaces-and-githubdev-support",children:"GitHub Codespaces and GitHub.dev support"}),"\n",(0,t.jsxs)(n.p,{children:["See ",(0,t.jsx)(n.a,{href:"https://scalameta.org/metals/docs/editors/online-ides#github-codespaces-and-githubdev",children:"https://scalameta.org/metals/docs/editors/online-ides#github-codespaces-and-githubdev"})]})]})}function h(e={}){const{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},1151:(e,n,s)=>{s.d(n,{Z:()=>a,a:()=>r});var t=s(7294);const i={},o=t.createContext(i);function r(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/9b4a23be.047090c6.js b/assets/js/9b4a23be.047090c6.js
deleted file mode 100644
index 90a362affde..00000000000
--- a/assets/js/9b4a23be.047090c6.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5688],{6573:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>r,metadata:()=>d,toc:()=>o});var t=i(5893),s=i(1151);const r={id:"overview",title:"Text Editors",sidebar_label:"Overview",slug:"/"},l=void 0,d={id:"editors/overview",title:"Text Editors",description:"Latest Metals server versions",source:"@site/target/docs/editors/overview.md",sourceDirName:"editors",slug:"/",permalink:"/metals/docs/",draft:!1,unlisted:!1,editUrl:"https://github.com/scalameta/metals/edit/main/docs/editors/overview.md",tags:[],version:"current",frontMatter:{id:"overview",title:"Text Editors",sidebar_label:"Overview",slug:"/"},sidebar:"docs",next:{title:"VS Code",permalink:"/metals/docs/editors/vscode"}},c={},o=[{value:"Latest Metals server versions",id:"latest-metals-server-versions",level:2},{value:"Editor support",id:"editor-support",level:2},{value:"Installation",id:"installation",level:2},{value:"Build import",id:"build-import",level:2},{value:"Diagnostics",id:"diagnostics",level:2},{value:"Known limitations",id:"known-limitations",level:3},{value:"Goto definition",id:"goto-definition",level:2},{value:"Known limitations",id:"known-limitations-1",level:3},{value:"Completions",id:"completions",level:2},{value:"Known limitations",id:"known-limitations-2",level:3},{value:"Hover (aka. type at point)",id:"hover-aka-type-at-point",level:2},{value:"Signature help (aka. parameter hints)",id:"signature-help-aka-parameter-hints",level:2},{value:"Find references",id:"find-references",level:2},{value:"Known limitations",id:"known-limitations-3",level:3},{value:"Worksheets",id:"worksheets",level:2},{value:"Document symbols",id:"document-symbols",level:2},{value:"Workspace symbols",id:"workspace-symbols",level:2},{value:"Formatting",id:"formatting",level:2},{value:"Code folding",id:"code-folding",level:2},{value:"Document highlight",id:"document-highlight",level:2},{value:"Package explorer",id:"package-explorer",level:2},{value:"Test Explorer",id:"test-explorer",level:2},{value:"Running Tests",id:"running-tests",level:3},{value:"Metals Extensions",id:"metals-extensions",level:2},{value:"Implicit decorations",id:"implicit-decorations",level:2},{value:"Additional file types",id:"additional-file-types",level:2}];function a(e){const n={a:"a",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"latest-metals-server-versions",children:"Latest Metals server versions"}),"\n",(0,t.jsx)(n.p,{children:"To find out how to set the version in your editor please check out the editor\nspecific sections."}),"\n",(0,t.jsxs)("table",{children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:"Version"}),(0,t.jsx)("th",{children:"Published"})]})}),(0,t.jsxs)("tbody",{children:[(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"1.2.0+13-615add64-SNAPSHOT"}),(0,t.jsx)("td",{children:"15 Dec 2023 18:44"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"1.2.0+13-615add64-SNAPSHOT"}),(0,t.jsx)("td",{children:"15 Dec 2023 18:29"})]})]})]}),"\n",(0,t.jsx)(n.p,{children:"Snapshot releases are not guaranteed to work."}),"\n",(0,t.jsx)(n.h2,{id:"editor-support",children:"Editor support"}),"\n",(0,t.jsx)(n.p,{children:"Metals works with the following text editors with varying degree of\nfunctionality."}),"\n",(0,t.jsxs)("table",{children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{}),(0,t.jsx)("td",{align:"center",children:"Visual Studio Code"}),(0,t.jsx)("td",{align:"center",children:"Vim"}),(0,t.jsx)("td",{align:"center",children:"Sublime Text"}),(0,t.jsx)("td",{align:"center",children:"Emacs"})]})}),(0,t.jsxs)("tbody",{children:[(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Installation"}),(0,t.jsx)("td",{align:"center",children:"Single click"}),(0,t.jsx)("td",{align:"center",children:"Single click"}),(0,t.jsx)("td",{align:"center",children:"Single click"}),(0,t.jsx)("td",{align:"center",children:"Single click"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Build import"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Diagnostics"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Goto definition"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Goto type definition"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Completions"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705*"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Hover"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Hover for selection"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u274c"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Parameter hints"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Find references"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Run/Debug"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Find implementations"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Rename symbol"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Code actions"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Worksheets"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Document symbols"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"Flat"}),(0,t.jsx)("td",{align:"center",children:"Flat"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Workspace symbols"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Formatting"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Folding"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Highlight"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Metals Extensions"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"Status bar, Input box, Decoration protocol, Did focus"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Organize imports"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Implicit decorations"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"Shown in hover"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Source file analyzer"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Find text in dependency JAR files"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u274c"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Run scalafix rules"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]})]})]}),"\n",(0,t.jsx)(n.h2,{id:"installation",children:"Installation"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Single click"}),": Metals is easy to install and requires minimal configuration\nout-of-the-box."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Few steps"}),": installing Metals requires a few custom steps and minimal\nconfiguration to work."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.em,{children:"You can find instructions on how to install Metals for your editor on its\nspecific page."})}),"\n",(0,t.jsx)(n.h2,{id:"build-import",children:"Build import"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"\u2705"}),": it is possible to import a build such as an sbt project directly from\nthe editor."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Requires browser"}),": importing a build requires additional steps in a web\nbrowser using a localhost server. It is not possible to import a build within\nthe editor."]}),"\n",(0,t.jsx)(n.h2,{id:"diagnostics",children:"Diagnostics"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"\u2705"}),": Diagnostics are correctly published on compile."]}),"\n",(0,t.jsx)(n.p,{children:"Compile errors are reported as red squiggles in the editor. Compilation is\ntriggered on file save for the build target (project/module) containing the\nfocused text file."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://user-images.githubusercontent.com/1408093/48774587-f4d5c780-ecca-11e8-8087-acca5a05ca78.png",alt:"Diagnostics"})}),"\n",(0,t.jsx)(n.h3,{id:"known-limitations",children:"Known limitations"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Slow feedback for type errors. Syntax errors are published as you type but\ntype errors are handled by the build tool, meaning diagnostics may take a\nwhile to publish for large projects."}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"goto-definition",children:"Goto definition"}),"\n",(0,t.jsx)(n.p,{children:"Navigate to symbol definitions for project sources and Scala/Java library\ndependencies."}),"\n",(0,t.jsx)(n.p,{children:"Symbols are resolved according to the last successful compilation in the build\ntool and navigation continues to work despite syntax errors in the open unsaved\nbuffer."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://user-images.githubusercontent.com/1408093/48776422-1f764f00-ecd0-11e8-96d1-170f2354d50e.gif",alt:"Goto Definition"})}),"\n",(0,t.jsx)(n.h3,{id:"known-limitations-1",children:"Known limitations"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Navigation does not work for buffers that do not tokenize, for example due to\nunclosed string literals."}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://github.com/scalameta/scalameta/issues/1802",children:"scalameta/scalameta#1802"}),"\nreflective invocations (methods calls on structural types) do not resolve to a\ndefinition."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"completions",children:"Completions"}),"\n",(0,t.jsx)(n.p,{children:"Use code completions to explore APIs, implement interfaces, generate exhaustive\npattern matches and more."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://user-images.githubusercontent.com/1408093/56036958-725bac00-5d2e-11e9-9cf7-46249125494a.gif",alt:"2019-04-12 14 19 39"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Auto-import"}),": imports are inserted at the bottom of the global import list.\nImports still need to be sorted and grouped manually, we are exploring ways to\nautomate this workflow in the future."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Override def"}),": implement methods from the super class."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Exhaustive match"}),": generate an exhaustive pattern match for sealed types."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"String interpolator"}),": automatically convert string literals into string\ninterpolators."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Filename"}),": complete classnames based on the enclosing file."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Documentation"}),": read the docstring for method symbols by pressing\nctrl+space in VS Code."]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"known-limitations-2",children:"Known limitations"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"completion results don't include symbols that have just been typed in separate\nfiles without a successful compilation in the build tool."}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"hover-aka-type-at-point",children:"Hover (aka. type at point)"}),"\n",(0,t.jsx)(n.p,{children:"See the expression type and symbol signature under the cursor."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/2MfQvsM.gif",alt:""})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Expression type"}),": shows the non-generic type of the highlighted expression."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Symbol signature"}),": shows the generic signature of symbol under the cursor\nalong with its docstring, if available."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"signature-help-aka-parameter-hints",children:"Signature help (aka. parameter hints)"}),"\n",(0,t.jsx)(n.p,{children:"View a method signature and method overloads as you fill in the arguments."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/DAWIrHu.gif",alt:""})}),"\n",(0,t.jsx)(n.h2,{id:"find-references",children:"Find references"}),"\n",(0,t.jsxs)(n.p,{children:["Find symbol references in project sources. References include implicits,\ninferred ",(0,t.jsx)(n.code,{children:".apply"}),", desugared ",(0,t.jsx)(n.code,{children:".flatMap"})," from for comprehensions and other\nsymbols that may not be explicitly written in source, making it possible to\ndiscover usages of difficult-to-grep symbols. The Metals navigation index is\nlow-overhead and should only require a few megabytes of memory even for large\nprojects."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://user-images.githubusercontent.com/1408093/51089190-75fc8880-1769-11e9-819c-95262205e95c.png",alt:"Find references"})}),"\n",(0,t.jsx)(n.h3,{id:"known-limitations-3",children:"Known limitations"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:['References to overridden methods are not included in the results. For example,\nif you run "find references" on the method ',(0,t.jsx)(n.code,{children:"Dog.name()"})," then it won't include\nreferences to the super method ",(0,t.jsx)(n.code,{children:"Animal.name()"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"worksheets",children:"Worksheets"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"\u2705"}),": Worksheets work via the Decoration protocol and are added as a\nnon-editable side decoration."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Comments"}),": Worksheets work via ",(0,t.jsx)(n.code,{children:"workspace/applyEdit"})," by adding comments to\nthe source code and support hover to show larger output. You can find more\ninformation about worksheets under the editor specific worksheet section. For\nexample, ",(0,t.jsx)(n.a,{href:"/metals/docs/editors/vscode#worksheets",children:"here for VS Code"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"document-symbols",children:"Document symbols"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"\u2705"}),": Document symbols are displayed in a hierarchical outline."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Flat"}),": Document symbols are displayed in a flat outline."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://user-images.githubusercontent.com/1408093/50635569-014c7180-0f53-11e9-8898-62803898781c.gif",alt:"Document Symbols"})}),"\n",(0,t.jsx)(n.h2,{id:"workspace-symbols",children:"Workspace symbols"}),"\n",(0,t.jsx)(n.p,{children:"Fuzzy search a symbol in the workspace of library dependencies by its name."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"All-lowercase queries are treated as case-insensitive searches."}),"\n",(0,t.jsxs)(n.li,{children:["Queries ending with a dot ",(0,t.jsx)(n.code,{children:"."})," list nested symbols."]}),"\n",(0,t.jsxs)(n.li,{children:["Queries containing a semicolon ",(0,t.jsx)(n.code,{children:";"})," search library dependencies."]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/w5yrK1w.gif",alt:"Fuzzy symbol search example"})}),"\n",(0,t.jsx)(n.h2,{id:"formatting",children:"Formatting"}),"\n",(0,t.jsxs)(n.p,{children:["Metals uses Scalafmt to respond to formatting requests from the editor,\naccording to the configuration defined in ",(0,t.jsx)(n.code,{children:".scalafmt.conf"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["Learn how to configure Scalafmt at\n",(0,t.jsx)(n.a,{href:"https://scalameta.org/scalafmt/docs/configuration.html",children:"https://scalameta.org/scalafmt/docs/configuration.html"}),"."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://user-images.githubusercontent.com/1408093/50635748-b0894880-0f53-11e9-913b-acfd5f505351.gif",alt:"Formatting"})}),"\n",(0,t.jsx)(n.h2,{id:"code-folding",children:"Code folding"}),"\n",(0,t.jsx)(n.p,{children:"Fold ranges such as large multi-line expressions, import groups and comments."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://camo.githubusercontent.com/3fdd7ae28907ac61c0a1ac5fdc07d085245957aa/68747470733a2f2f692e696d6775722e636f6d2f667149554a54472e676966",alt:""})}),"\n",(0,t.jsx)(n.h2,{id:"document-highlight",children:"Document highlight"}),"\n",(0,t.jsx)(n.p,{children:"Highlight references to the same symbol in the open file."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/0uhc9P5.gif",alt:""})}),"\n",(0,t.jsx)(n.h2,{id:"package-explorer",children:"Package explorer"}),"\n",(0,t.jsx)(n.p,{children:"Browse packages, classes and methods in the workspace and library dependencies\nusing the Metals sidebar. This feature is only implemented in VS Code."}),"\n",(0,t.jsx)(n.h2,{id:"test-explorer",children:"Test Explorer"}),"\n",(0,t.jsxs)(n.p,{children:["Test Explorer is a feature that allows editors to display tests as a separate\ntree representation of tests. Although it was implemented in order to use Visual\nStudio Code's\n",(0,t.jsx)(n.a,{href:"https://code.visualstudio.com/api/extension-guides/testing",children:"Testing API"}),". The Test\nExplorer API is editor agnostic and can be used by other editors than just VS\nCode. ",(0,t.jsx)(n.img,{src:"https://i.imgur.com/Z3VtS0O.gif",alt:"test-explorer"})]}),"\n",(0,t.jsx)(n.p,{children:"Work on the Test Explorer is still in progress and the feature has some known\nlimitations:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Test Explorer is able to discover single test cases only for JUnit4 test\nclasses. Support for other test frameworks is being worked on."}),"\n",(0,t.jsxs)(n.li,{children:["detecting suites in cross scala-version projects is inconsistent, see\n",(0,t.jsx)(n.a,{href:"https://github.com/scalameta/metals/issues/3503",children:"this issue"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["there is no support for JS and Native platforms. For any changes subscribe to\nthe related\n",(0,t.jsx)(n.a,{href:"https://github.com/scalameta/metals-feature-requests/issues/256",children:"feature request"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["You can find more information about Test Explorer under the\n",(0,t.jsx)(n.a,{href:"/metals/docs/editors/vscode#test-explorer",children:"VS Code"})," specific section."]}),"\n",(0,t.jsx)(n.h3,{id:"running-tests",children:"Running Tests"}),"\n",(0,t.jsxs)(n.p,{children:["Both run and debug under the hood use BSP's debug request. More information\nabout it can be found at\n",(0,t.jsx)(n.a,{href:"https://github.com/scalacenter/bloop/blob/master/docs/assets/dap-example-metals.png",children:"Bloop DAP diagram"}),"\nor\n",(0,t.jsx)(n.a,{href:"https://build-server-protocol.github.io/docs/specification.html#debug-request",children:"BSP specification"}),"\nwebsite."]}),"\n",(0,t.jsx)(n.h2,{id:"metals-extensions",children:"Metals Extensions"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Status bar"}),": Editor client implements the ",(0,t.jsx)(n.code,{children:"metals/status"})," notification."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Decoration protocol"}),": Editor client implements the\n",(0,t.jsx)(n.a,{href:"/metals/docs/integrations/decoration-protocol",children:"Decoration Protocol"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Tree view"}),": Editor client implements the\n",(0,t.jsx)(n.a,{href:"/metals/docs/integrations/tree-view-protocol",children:"Tree View Protocol"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Did focus"}),": Editor client implements the ",(0,t.jsx)(n.code,{children:"metals/didFocusTextDocument"}),"\nnotification."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Slow task"}),": Editor client implements the ",(0,t.jsx)(n.code,{children:"metals/slowTask"})," request."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Input box"}),": Editor client implements the ",(0,t.jsx)(n.code,{children:"metals/inputBox"})," request."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Quick pick"}),": Editor client implements the ",(0,t.jsx)(n.code,{children:"metals/quickPick"})," request."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Window state"}),": Editor client implements the ",(0,t.jsx)(n.code,{children:"metals/windowStateDidChange"}),"\nnotification."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"\u2705"}),": Editor implements all Metals extension endpoints."]}),"\n",(0,t.jsxs)(n.p,{children:["The Metals language server supports custom extensions that are not part of the\nLanguage Server Protocol (LSP). These extensions are not necessary for Metals to\nfunction but they improve the user experience. To learn more about Metals\nextensions, see ",(0,t.jsx)(n.a,{href:"/metals/docs/integrations/new-editor",children:"integrating a new editor"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"implicit-decorations",children:"Implicit decorations"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"\u2705"}),": Additional information inferred from the code can be show within the\ncode using virtual text."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Shown in hover"}),": Additional information inferred from the code can be show\nwhen hovering over a specific line. That hover only shows the additional symbols\non the current line."]}),"\n",(0,t.jsx)(n.h2,{id:"additional-file-types",children:"Additional file types"}),"\n",(0,t.jsx)(n.p,{children:"Not all features are supported in all possible scenarios, especially when it\ncomes to non-standard Scala files like Ammonite scripts, worksheets or sbt\nscripts."}),"\n",(0,t.jsxs)("table",{children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{}),(0,t.jsx)("td",{align:"center",children:"sbt scripts"}),(0,t.jsx)("td",{align:"center",children:"Worksheets"}),(0,t.jsx)("td",{align:"center",children:"Ammonite scripts*"}),(0,t.jsx)("td",{align:"center",children:"Standalone Scala files"})]})}),(0,t.jsxs)("tbody",{children:[(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Diagnostics"}),(0,t.jsx)("td",{align:"center",children:"\u2705*"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705*"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Goto definition"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Completions"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Hover"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Parameter hints"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Find references"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Run/Debug"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Find implementations"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Rename symbol"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Code actions"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Document symbols"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Workspace symbols"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"All symbols are local"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Formatting"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Folding"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Highlight"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Organize imports"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Implicit decorations"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Decode file (cfr, semanticdb, tasty, javap)"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center"})]})]})]}),"\n",(0,t.jsxs)(n.p,{children:["* Note that there are some specific Ammonite features that aren't supported\nlike ",(0,t.jsx)(n.a,{href:"https://ammonite.io/#Multi-stageScripts",children:"multi-stage"})," scripts. Currently\nAmmonite support is also limited to Scala 2."]}),"\n",(0,t.jsx)(n.p,{children:"* Diagnostics for sbt script and standalone Scala files will only show parsing\nerrors, but not diagnostics coming from the compiler."})]})}function h(e={}){const{wrapper:n}={...(0,s.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(a,{...e})}):a(e)}},1151:(e,n,i)=>{i.d(n,{Z:()=>d,a:()=>l});var t=i(7294);const s={},r=t.createContext(s);function l(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/9b4a23be.1a3a56c5.js b/assets/js/9b4a23be.1a3a56c5.js
new file mode 100644
index 00000000000..93b5c35121a
--- /dev/null
+++ b/assets/js/9b4a23be.1a3a56c5.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5688],{6573:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>r,metadata:()=>d,toc:()=>o});var t=i(5893),s=i(1151);const r={id:"overview",title:"Text Editors",sidebar_label:"Overview",slug:"/"},l=void 0,d={id:"editors/overview",title:"Text Editors",description:"Latest Metals server versions",source:"@site/target/docs/editors/overview.md",sourceDirName:"editors",slug:"/",permalink:"/metals/docs/",draft:!1,unlisted:!1,editUrl:"https://github.com/scalameta/metals/edit/main/docs/editors/overview.md",tags:[],version:"current",frontMatter:{id:"overview",title:"Text Editors",sidebar_label:"Overview",slug:"/"},sidebar:"docs",next:{title:"VS Code",permalink:"/metals/docs/editors/vscode"}},c={},o=[{value:"Latest Metals server versions",id:"latest-metals-server-versions",level:2},{value:"Editor support",id:"editor-support",level:2},{value:"Installation",id:"installation",level:2},{value:"Build import",id:"build-import",level:2},{value:"Diagnostics",id:"diagnostics",level:2},{value:"Known limitations",id:"known-limitations",level:3},{value:"Goto definition",id:"goto-definition",level:2},{value:"Known limitations",id:"known-limitations-1",level:3},{value:"Completions",id:"completions",level:2},{value:"Known limitations",id:"known-limitations-2",level:3},{value:"Hover (aka. type at point)",id:"hover-aka-type-at-point",level:2},{value:"Signature help (aka. parameter hints)",id:"signature-help-aka-parameter-hints",level:2},{value:"Find references",id:"find-references",level:2},{value:"Known limitations",id:"known-limitations-3",level:3},{value:"Worksheets",id:"worksheets",level:2},{value:"Document symbols",id:"document-symbols",level:2},{value:"Workspace symbols",id:"workspace-symbols",level:2},{value:"Formatting",id:"formatting",level:2},{value:"Code folding",id:"code-folding",level:2},{value:"Document highlight",id:"document-highlight",level:2},{value:"Package explorer",id:"package-explorer",level:2},{value:"Test Explorer",id:"test-explorer",level:2},{value:"Running Tests",id:"running-tests",level:3},{value:"Metals Extensions",id:"metals-extensions",level:2},{value:"Implicit decorations",id:"implicit-decorations",level:2},{value:"Additional file types",id:"additional-file-types",level:2}];function a(e){const n={a:"a",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"latest-metals-server-versions",children:"Latest Metals server versions"}),"\n",(0,t.jsx)(n.p,{children:"To find out how to set the version in your editor please check out the editor\nspecific sections."}),"\n",(0,t.jsxs)("table",{children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:"Version"}),(0,t.jsx)("th",{children:"Published"})]})}),(0,t.jsxs)("tbody",{children:[(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"1.2.0"}),(0,t.jsx)("td",{children:"12 Dec 2023 10:36"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"1.2.0+14-72692d2c-SNAPSHOT"}),(0,t.jsx)("td",{children:"18 Dec 2023 10:59"})]})]})]}),"\n",(0,t.jsx)(n.p,{children:"Snapshot releases are not guaranteed to work."}),"\n",(0,t.jsx)(n.h2,{id:"editor-support",children:"Editor support"}),"\n",(0,t.jsx)(n.p,{children:"Metals works with the following text editors with varying degree of\nfunctionality."}),"\n",(0,t.jsxs)("table",{children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{}),(0,t.jsx)("td",{align:"center",children:"Visual Studio Code"}),(0,t.jsx)("td",{align:"center",children:"Vim"}),(0,t.jsx)("td",{align:"center",children:"Sublime Text"}),(0,t.jsx)("td",{align:"center",children:"Emacs"})]})}),(0,t.jsxs)("tbody",{children:[(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Installation"}),(0,t.jsx)("td",{align:"center",children:"Single click"}),(0,t.jsx)("td",{align:"center",children:"Single click"}),(0,t.jsx)("td",{align:"center",children:"Single click"}),(0,t.jsx)("td",{align:"center",children:"Single click"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Build import"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Diagnostics"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Goto definition"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Goto type definition"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Completions"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705*"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Hover"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Hover for selection"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u274c"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Parameter hints"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Find references"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Run/Debug"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Find implementations"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Rename symbol"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Code actions"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Worksheets"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Document symbols"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"Flat"}),(0,t.jsx)("td",{align:"center",children:"Flat"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Workspace symbols"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Formatting"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Folding"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Highlight"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Metals Extensions"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"Status bar, Input box, Decoration protocol, Did focus"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Organize imports"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Implicit decorations"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"Shown in hover"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Source file analyzer"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Find text in dependency JAR files"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u274c"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Run scalafix rules"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]})]})]}),"\n",(0,t.jsx)(n.h2,{id:"installation",children:"Installation"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Single click"}),": Metals is easy to install and requires minimal configuration\nout-of-the-box."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Few steps"}),": installing Metals requires a few custom steps and minimal\nconfiguration to work."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.em,{children:"You can find instructions on how to install Metals for your editor on its\nspecific page."})}),"\n",(0,t.jsx)(n.h2,{id:"build-import",children:"Build import"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"\u2705"}),": it is possible to import a build such as an sbt project directly from\nthe editor."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Requires browser"}),": importing a build requires additional steps in a web\nbrowser using a localhost server. It is not possible to import a build within\nthe editor."]}),"\n",(0,t.jsx)(n.h2,{id:"diagnostics",children:"Diagnostics"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"\u2705"}),": Diagnostics are correctly published on compile."]}),"\n",(0,t.jsx)(n.p,{children:"Compile errors are reported as red squiggles in the editor. Compilation is\ntriggered on file save for the build target (project/module) containing the\nfocused text file."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://user-images.githubusercontent.com/1408093/48774587-f4d5c780-ecca-11e8-8087-acca5a05ca78.png",alt:"Diagnostics"})}),"\n",(0,t.jsx)(n.h3,{id:"known-limitations",children:"Known limitations"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Slow feedback for type errors. Syntax errors are published as you type but\ntype errors are handled by the build tool, meaning diagnostics may take a\nwhile to publish for large projects."}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"goto-definition",children:"Goto definition"}),"\n",(0,t.jsx)(n.p,{children:"Navigate to symbol definitions for project sources and Scala/Java library\ndependencies."}),"\n",(0,t.jsx)(n.p,{children:"Symbols are resolved according to the last successful compilation in the build\ntool and navigation continues to work despite syntax errors in the open unsaved\nbuffer."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://user-images.githubusercontent.com/1408093/48776422-1f764f00-ecd0-11e8-96d1-170f2354d50e.gif",alt:"Goto Definition"})}),"\n",(0,t.jsx)(n.h3,{id:"known-limitations-1",children:"Known limitations"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Navigation does not work for buffers that do not tokenize, for example due to\nunclosed string literals."}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://github.com/scalameta/scalameta/issues/1802",children:"scalameta/scalameta#1802"}),"\nreflective invocations (methods calls on structural types) do not resolve to a\ndefinition."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"completions",children:"Completions"}),"\n",(0,t.jsx)(n.p,{children:"Use code completions to explore APIs, implement interfaces, generate exhaustive\npattern matches and more."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://user-images.githubusercontent.com/1408093/56036958-725bac00-5d2e-11e9-9cf7-46249125494a.gif",alt:"2019-04-12 14 19 39"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Auto-import"}),": imports are inserted at the bottom of the global import list.\nImports still need to be sorted and grouped manually, we are exploring ways to\nautomate this workflow in the future."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Override def"}),": implement methods from the super class."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Exhaustive match"}),": generate an exhaustive pattern match for sealed types."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"String interpolator"}),": automatically convert string literals into string\ninterpolators."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Filename"}),": complete classnames based on the enclosing file."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Documentation"}),": read the docstring for method symbols by pressing\nctrl+space in VS Code."]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"known-limitations-2",children:"Known limitations"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"completion results don't include symbols that have just been typed in separate\nfiles without a successful compilation in the build tool."}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"hover-aka-type-at-point",children:"Hover (aka. type at point)"}),"\n",(0,t.jsx)(n.p,{children:"See the expression type and symbol signature under the cursor."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/2MfQvsM.gif",alt:""})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Expression type"}),": shows the non-generic type of the highlighted expression."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Symbol signature"}),": shows the generic signature of symbol under the cursor\nalong with its docstring, if available."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"signature-help-aka-parameter-hints",children:"Signature help (aka. parameter hints)"}),"\n",(0,t.jsx)(n.p,{children:"View a method signature and method overloads as you fill in the arguments."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/DAWIrHu.gif",alt:""})}),"\n",(0,t.jsx)(n.h2,{id:"find-references",children:"Find references"}),"\n",(0,t.jsxs)(n.p,{children:["Find symbol references in project sources. References include implicits,\ninferred ",(0,t.jsx)(n.code,{children:".apply"}),", desugared ",(0,t.jsx)(n.code,{children:".flatMap"})," from for comprehensions and other\nsymbols that may not be explicitly written in source, making it possible to\ndiscover usages of difficult-to-grep symbols. The Metals navigation index is\nlow-overhead and should only require a few megabytes of memory even for large\nprojects."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://user-images.githubusercontent.com/1408093/51089190-75fc8880-1769-11e9-819c-95262205e95c.png",alt:"Find references"})}),"\n",(0,t.jsx)(n.h3,{id:"known-limitations-3",children:"Known limitations"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:['References to overridden methods are not included in the results. For example,\nif you run "find references" on the method ',(0,t.jsx)(n.code,{children:"Dog.name()"})," then it won't include\nreferences to the super method ",(0,t.jsx)(n.code,{children:"Animal.name()"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"worksheets",children:"Worksheets"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"\u2705"}),": Worksheets work via the Decoration protocol and are added as a\nnon-editable side decoration."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Comments"}),": Worksheets work via ",(0,t.jsx)(n.code,{children:"workspace/applyEdit"})," by adding comments to\nthe source code and support hover to show larger output. You can find more\ninformation about worksheets under the editor specific worksheet section. For\nexample, ",(0,t.jsx)(n.a,{href:"/metals/docs/editors/vscode#worksheets",children:"here for VS Code"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"document-symbols",children:"Document symbols"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"\u2705"}),": Document symbols are displayed in a hierarchical outline."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Flat"}),": Document symbols are displayed in a flat outline."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://user-images.githubusercontent.com/1408093/50635569-014c7180-0f53-11e9-8898-62803898781c.gif",alt:"Document Symbols"})}),"\n",(0,t.jsx)(n.h2,{id:"workspace-symbols",children:"Workspace symbols"}),"\n",(0,t.jsx)(n.p,{children:"Fuzzy search a symbol in the workspace of library dependencies by its name."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"All-lowercase queries are treated as case-insensitive searches."}),"\n",(0,t.jsxs)(n.li,{children:["Queries ending with a dot ",(0,t.jsx)(n.code,{children:"."})," list nested symbols."]}),"\n",(0,t.jsxs)(n.li,{children:["Queries containing a semicolon ",(0,t.jsx)(n.code,{children:";"})," search library dependencies."]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/w5yrK1w.gif",alt:"Fuzzy symbol search example"})}),"\n",(0,t.jsx)(n.h2,{id:"formatting",children:"Formatting"}),"\n",(0,t.jsxs)(n.p,{children:["Metals uses Scalafmt to respond to formatting requests from the editor,\naccording to the configuration defined in ",(0,t.jsx)(n.code,{children:".scalafmt.conf"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["Learn how to configure Scalafmt at\n",(0,t.jsx)(n.a,{href:"https://scalameta.org/scalafmt/docs/configuration.html",children:"https://scalameta.org/scalafmt/docs/configuration.html"}),"."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://user-images.githubusercontent.com/1408093/50635748-b0894880-0f53-11e9-913b-acfd5f505351.gif",alt:"Formatting"})}),"\n",(0,t.jsx)(n.h2,{id:"code-folding",children:"Code folding"}),"\n",(0,t.jsx)(n.p,{children:"Fold ranges such as large multi-line expressions, import groups and comments."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://camo.githubusercontent.com/3fdd7ae28907ac61c0a1ac5fdc07d085245957aa/68747470733a2f2f692e696d6775722e636f6d2f667149554a54472e676966",alt:""})}),"\n",(0,t.jsx)(n.h2,{id:"document-highlight",children:"Document highlight"}),"\n",(0,t.jsx)(n.p,{children:"Highlight references to the same symbol in the open file."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:"https://i.imgur.com/0uhc9P5.gif",alt:""})}),"\n",(0,t.jsx)(n.h2,{id:"package-explorer",children:"Package explorer"}),"\n",(0,t.jsx)(n.p,{children:"Browse packages, classes and methods in the workspace and library dependencies\nusing the Metals sidebar. This feature is only implemented in VS Code."}),"\n",(0,t.jsx)(n.h2,{id:"test-explorer",children:"Test Explorer"}),"\n",(0,t.jsxs)(n.p,{children:["Test Explorer is a feature that allows editors to display tests as a separate\ntree representation of tests. Although it was implemented in order to use Visual\nStudio Code's\n",(0,t.jsx)(n.a,{href:"https://code.visualstudio.com/api/extension-guides/testing",children:"Testing API"}),". The Test\nExplorer API is editor agnostic and can be used by other editors than just VS\nCode. ",(0,t.jsx)(n.img,{src:"https://i.imgur.com/Z3VtS0O.gif",alt:"test-explorer"})]}),"\n",(0,t.jsx)(n.p,{children:"Work on the Test Explorer is still in progress and the feature has some known\nlimitations:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Test Explorer is able to discover single test cases only for JUnit4 test\nclasses. Support for other test frameworks is being worked on."}),"\n",(0,t.jsxs)(n.li,{children:["detecting suites in cross scala-version projects is inconsistent, see\n",(0,t.jsx)(n.a,{href:"https://github.com/scalameta/metals/issues/3503",children:"this issue"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["there is no support for JS and Native platforms. For any changes subscribe to\nthe related\n",(0,t.jsx)(n.a,{href:"https://github.com/scalameta/metals-feature-requests/issues/256",children:"feature request"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["You can find more information about Test Explorer under the\n",(0,t.jsx)(n.a,{href:"/metals/docs/editors/vscode#test-explorer",children:"VS Code"})," specific section."]}),"\n",(0,t.jsx)(n.h3,{id:"running-tests",children:"Running Tests"}),"\n",(0,t.jsxs)(n.p,{children:["Both run and debug under the hood use BSP's debug request. More information\nabout it can be found at\n",(0,t.jsx)(n.a,{href:"https://github.com/scalacenter/bloop/blob/master/docs/assets/dap-example-metals.png",children:"Bloop DAP diagram"}),"\nor\n",(0,t.jsx)(n.a,{href:"https://build-server-protocol.github.io/docs/specification.html#debug-request",children:"BSP specification"}),"\nwebsite."]}),"\n",(0,t.jsx)(n.h2,{id:"metals-extensions",children:"Metals Extensions"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Status bar"}),": Editor client implements the ",(0,t.jsx)(n.code,{children:"metals/status"})," notification."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Decoration protocol"}),": Editor client implements the\n",(0,t.jsx)(n.a,{href:"/metals/docs/integrations/decoration-protocol",children:"Decoration Protocol"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Tree view"}),": Editor client implements the\n",(0,t.jsx)(n.a,{href:"/metals/docs/integrations/tree-view-protocol",children:"Tree View Protocol"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Did focus"}),": Editor client implements the ",(0,t.jsx)(n.code,{children:"metals/didFocusTextDocument"}),"\nnotification."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Slow task"}),": Editor client implements the ",(0,t.jsx)(n.code,{children:"metals/slowTask"})," request."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Input box"}),": Editor client implements the ",(0,t.jsx)(n.code,{children:"metals/inputBox"})," request."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Quick pick"}),": Editor client implements the ",(0,t.jsx)(n.code,{children:"metals/quickPick"})," request."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Window state"}),": Editor client implements the ",(0,t.jsx)(n.code,{children:"metals/windowStateDidChange"}),"\nnotification."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"\u2705"}),": Editor implements all Metals extension endpoints."]}),"\n",(0,t.jsxs)(n.p,{children:["The Metals language server supports custom extensions that are not part of the\nLanguage Server Protocol (LSP). These extensions are not necessary for Metals to\nfunction but they improve the user experience. To learn more about Metals\nextensions, see ",(0,t.jsx)(n.a,{href:"/metals/docs/integrations/new-editor",children:"integrating a new editor"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"implicit-decorations",children:"Implicit decorations"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"\u2705"}),": Additional information inferred from the code can be show within the\ncode using virtual text."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Shown in hover"}),": Additional information inferred from the code can be show\nwhen hovering over a specific line. That hover only shows the additional symbols\non the current line."]}),"\n",(0,t.jsx)(n.h2,{id:"additional-file-types",children:"Additional file types"}),"\n",(0,t.jsx)(n.p,{children:"Not all features are supported in all possible scenarios, especially when it\ncomes to non-standard Scala files like Ammonite scripts, worksheets or sbt\nscripts."}),"\n",(0,t.jsxs)("table",{children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{}),(0,t.jsx)("td",{align:"center",children:"sbt scripts"}),(0,t.jsx)("td",{align:"center",children:"Worksheets"}),(0,t.jsx)("td",{align:"center",children:"Ammonite scripts*"}),(0,t.jsx)("td",{align:"center",children:"Standalone Scala files"})]})}),(0,t.jsxs)("tbody",{children:[(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Diagnostics"}),(0,t.jsx)("td",{align:"center",children:"\u2705*"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705*"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Goto definition"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Completions"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Hover"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Parameter hints"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Find references"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Run/Debug"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Find implementations"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Rename symbol"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Code actions"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Document symbols"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Workspace symbols"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"All symbols are local"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Formatting"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Folding"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Highlight"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Organize imports"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Implicit decorations"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center",children:"\u2705"}),(0,t.jsx)("td",{align:"center",children:"\u2705"})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:"Decode file (cfr, semanticdb, tasty, javap)"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center"}),(0,t.jsx)("td",{align:"center"})]})]})]}),"\n",(0,t.jsxs)(n.p,{children:["* Note that there are some specific Ammonite features that aren't supported\nlike ",(0,t.jsx)(n.a,{href:"https://ammonite.io/#Multi-stageScripts",children:"multi-stage"})," scripts. Currently\nAmmonite support is also limited to Scala 2."]}),"\n",(0,t.jsx)(n.p,{children:"* Diagnostics for sbt script and standalone Scala files will only show parsing\nerrors, but not diagnostics coming from the compiler."})]})}function h(e={}){const{wrapper:n}={...(0,s.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(a,{...e})}):a(e)}},1151:(e,n,i)=>{i.d(n,{Z:()=>d,a:()=>l});var t=i(7294);const s={},r=t.createContext(s);function l(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/runtime~main.5a984eeb.js b/assets/js/runtime~main.58ba9853.js
similarity index 97%
rename from assets/js/runtime~main.5a984eeb.js
rename to assets/js/runtime~main.58ba9853.js
index b2bb630c7ef..f3b13813a80 100644
--- a/assets/js/runtime~main.5a984eeb.js
+++ b/assets/js/runtime~main.58ba9853.js
@@ -1 +1 @@
-(()=>{"use strict";var e,a,c,d,f={},b={};function r(e){var a=b[e];if(void 0!==a)return a.exports;var c=b[e]={exports:{}};return f[e].call(c.exports,c,c.exports,r),c.exports}r.m=f,e=[],r.O=(a,c,d,f)=>{if(!c){var b=1/0;for(i=0;i=f)&&Object.keys(r.O).every((e=>r.O[e](c[o])))?c.splice(o--,1):(t=!1,f0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[c,d,f]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a:a}),a},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,d){if(1&d&&(e=this(e)),8&d)return e;if("object"==typeof e&&e){if(4&d&&e.__esModule)return e;if(16&d&&"function"==typeof e.then)return e}var f=Object.create(null);r.r(f);var b={};a=a||[null,c({}),c([]),c(c)];for(var t=2&d&&e;"object"==typeof t&&!~a.indexOf(t);t=c(t))Object.getOwnPropertyNames(t).forEach((a=>b[a]=()=>e[a]));return b.default=()=>e,r.d(f,b),f},r.d=(e,a)=>{for(var c in a)r.o(a,c)&&!r.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:a[c]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,c)=>(r.f[c](e,a),a)),[])),r.u=e=>"assets/js/"+({48:"55a95aa3",50:"f9150bb6",53:"935f2afb",98:"53c82ccc",119:"143cbec3",190:"0c485ec1",198:"0c130405",202:"77892e30",224:"73043cbc",363:"e2e5f5d1",366:"35db43ad",382:"99d7db30",448:"3d6e158a",450:"df53e5ec",463:"7475f9e7",490:"6079a6bf",504:"56bbb0f8",517:"00813942",569:"1512f001",600:"ef96a7a2",608:"e9356b00",713:"99d3dc3a",758:"c7875d0d",833:"6722346e",867:"bfd27103",984:"643c52ed",989:"794071d8",1046:"c278e024",1157:"bdc47ac0",1181:"bdea20ec",1228:"f1a7d268",1239:"a935f661",1295:"74f6f7a6",1457:"b04d5738",1557:"786192e2",1566:"56cef870",1648:"28906591",1650:"d8176b79",1667:"8f9f6130",1733:"7d4f68c1",1753:"309b8d38",1976:"abf165a1",1977:"1a1ad967",2010:"82e8fb15",2036:"2387c651",2041:"2e1ac853",2057:"cb899f97",2063:"0d8e09e6",2172:"ef440da7",2174:"9a7faebf",2240:"404bab64",2246:"f315a94a",2287:"9349bfb9",2535:"814f3328",2604:"af8d2261",2665:"bc8294f9",2726:"f87b843d",2822:"17a26cd8",2823:"5c04405b",2847:"ad57a4da",2859:"4ad5693c",2882:"3839ad99",2884:"80d94b51",2975:"4844a7cd",2994:"c424153c",3089:"a6aa9e1f",3104:"64912a2b",3164:"0d7cd0de",3214:"15b090c7",3282:"6999e097",3290:"d8cf581d",3315:"01706c44",3333:"515fa385",3351:"27feb48a",3470:"7af95c3c",3553:"17823fa5",3608:"9e4087bc",3621:"9b49e051",3681:"25446b1f",3707:"b28f3685",3710:"39178d36",3726:"75d4c63e",3733:"a4b63d05",3737:"9ae6eeaa",3740:"9ea6b57a",3758:"fb11efee",3808:"eac4f91f",3827:"f3503827",3980:"22c2c9b0",4015:"4e26f5de",4019:"2c5862c4",4073:"cabfa371",4100:"49773175",4117:"cfe9f849",4131:"c109e00d",4167:"1a79d8f3",4195:"c4f5d8e4",4256:"0e2b725e",4307:"ac2e449c",4355:"e38d6f3f",4368:"a94703ab",4372:"db18f655",4391:"8ead6264",4408:"3cf1e930",4583:"a64b4ddf",4663:"bb177581",4694:"48a1d228",4766:"c4083f57",4782:"8a0b8ece",4797:"70f9df55",4807:"f922820e",4839:"97ce67ef",5014:"400a1ae3",5016:"243d370e",5061:"81c1ce9e",5130:"8947246e",5264:"26934d81",5358:"8ac2579a",5359:"ab2e7d85",5372:"7745fd32",5411:"e82430ca",5430:"7c0269a6",5518:"905a60c6",5555:"da363e62",5561:"801caf39",5642:"21dcb4fb",5688:"9b4a23be",5780:"d11fc459",5865:"57d9d0fa",5890:"560d1d3c",5949:"03b2a692",5975:"022bb252",6002:"0529b5a5",6013:"627fd629",6103:"ccc49370",6105:"d3dc0327",6162:"6a60bac4",6251:"2d522398",6275:"e882c012",6290:"e68a2502",6373:"d4d282d4",6466:"6a125964",6469:"3f977ffc",6499:"96a3e035",6520:"94015cb6",6561:"970a5f4e",6573:"38b82327",6583:"7d61c055",6596:"bd301d6b",6622:"0d126b35",6633:"e8c5917f",6776:"88d8e9a5",6999:"6ea6fc78",7031:"ad29d74f",7099:"01456d3b",7205:"291a747b",7372:"30083153",7429:"36958d65",7457:"eae80572",7472:"674a37b6",7528:"b3904d08",7591:"e879be1f",7602:"a4c9fa90",7631:"fda909f7",7696:"c6da16b1",7705:"0beb67bc",7769:"b79c2638",7785:"79920604",7792:"d94b0c5c",7918:"17896441",7920:"1a4e3797",7962:"f78a808a",8031:"07ab39c8",8059:"94cc8923",8131:"07c8b2d8",8180:"d7024f94",8225:"dd4c9461",8255:"d24c97fd",8313:"cc1c03c7",8377:"64d6e9a7",8476:"4af6d88b",8518:"a7bd4aaa",8534:"dc0c48b3",8563:"5346cb4e",8607:"6ed4e313",8778:"205a1816",8784:"c64e8655",8797:"2131c61b",8821:"08b44b83",8840:"2ff5ad1b",8858:"cc709768",8933:"8b7e7f73",8978:"9a20f037",8984:"752eae27",8988:"43bfba49",9025:"ed7c6679",9026:"b0577adc",9043:"2328fd63",9135:"1ed82af1",9191:"432804b2",9242:"995bfa6d",9253:"2216edbc",9282:"5d80abc8",9289:"f0507210",9423:"bdbe54cc",9505:"adce20d1",9537:"5ec07b8b",9567:"a1f1bc88",9604:"d8beb153",9624:"1b9d5eae",9632:"35bd5843",9641:"a91b50a6",9661:"5e95c892",9707:"5980cb66",9732:"bd78ee39",9748:"bcb36622",9766:"b54e7820",9774:"7ea62e57",9777:"71846d42",9783:"615063b9",9820:"5d99d17c",9952:"508e58e7",9959:"adb52a11",9981:"a81ab01c"}[e]||e)+"."+{48:"42f043f5",50:"db2c4c30",53:"ae7a5bc0",98:"0bb9301e",119:"0e61175d",130:"f8f20161",190:"c8d7e127",198:"4befce7e",202:"f8cc7368",224:"fd900b2a",363:"556c808e",366:"d12ed6c4",382:"2ebcd820",448:"fc2c1bf0",450:"05ff02df",463:"00757cfa",490:"515430b3",504:"bdd34659",517:"a7ba0c74",569:"15994868",600:"97ffe142",608:"fddc805e",713:"7b1bebfa",758:"cc50cbee",833:"23caaa2a",867:"d6ab4a43",984:"26b7bfa2",989:"9d31d53a",1046:"ebeede98",1157:"2e882a07",1181:"4b4db856",1228:"0c15f1f7",1239:"54ca023f",1295:"5fb8cb91",1457:"35e3ecbd",1557:"95300729",1566:"edefe357",1648:"c115c0f4",1650:"955975ec",1667:"d64fe1e6",1733:"1d8c1b94",1753:"9148cc3d",1772:"857c6a61",1976:"a80fe6a6",1977:"177db65c",2010:"2ab83e15",2036:"5f801935",2041:"93892216",2057:"6f0b85c5",2063:"3d10b7c7",2172:"82776d6f",2174:"3aa6e3cc",2240:"aaa341dc",2246:"a5f78082",2287:"2d795b3a",2535:"d5f752fe",2604:"9cfff6f5",2665:"bb76be72",2726:"29747dce",2822:"a5dad10d",2823:"c110d23e",2847:"c849c209",2859:"3ac6cf58",2882:"05e324b3",2884:"cc220ef0",2975:"f52a13f2",2994:"aaa5741b",3089:"17675f3f",3104:"07624ced",3164:"2d20a961",3214:"b3921c14",3282:"4a77525f",3290:"2bbbba4d",3315:"e5243e31",3333:"d70b2be1",3351:"c3706ced",3470:"3b7f563d",3553:"2d8449ea",3608:"3f62f523",3621:"6f64e2de",3681:"b9231a4d",3707:"434fe367",3710:"fcd5c61a",3726:"0c02db02",3733:"7d64216e",3737:"b6fd0df2",3740:"28c8a5a7",3758:"6a35c593",3808:"460a2a59",3827:"e99eaf73",3890:"2107840f",3980:"9facad4d",4015:"0aa35c24",4019:"861d2927",4073:"8d48884d",4100:"1bc1e418",4117:"422993ed",4131:"729c9154",4167:"cc0a4adf",4195:"620eebd1",4256:"15ffae58",4307:"13c50bde",4355:"324c49ce",4368:"2e43e6e5",4372:"620d8908",4391:"29427bf9",4408:"1541b5d5",4583:"68f6d2f8",4663:"be50f81e",4694:"4b6c8c40",4766:"8219cd73",4782:"b4cabaaf",4797:"ff6294ea",4807:"8a680b20",4839:"c3695cb2",5014:"aef2d2c7",5016:"45eca05d",5061:"11c546da",5130:"121e72cd",5264:"dda2acee",5358:"45cfadb8",5359:"6f8586bc",5372:"b5a0d406",5411:"340c4767",5430:"e740a831",5518:"419564c8",5525:"83bf4f45",5555:"8b3fbcff",5561:"03257b4e",5642:"112e9efc",5688:"047090c6",5780:"14663490",5865:"ea08c93b",5890:"9b07f339",5949:"c07fb85d",5975:"93c9cb05",6002:"743f6348",6013:"9e561218",6103:"cc8f7d32",6105:"f82f6f34",6162:"678e5615",6251:"ae3a4098",6275:"0a84885d",6290:"ce8de943",6373:"428fcf3f",6466:"908d9965",6469:"6693edc4",6499:"57b2898f",6520:"910478de",6561:"af88a397",6573:"c8a0be11",6583:"cdf3f526",6596:"8433db70",6622:"cc470163",6633:"0085eae7",6776:"a85a0ffa",6999:"389d066b",7031:"ef881b7b",7099:"d4073d51",7205:"0b222975",7372:"b4b9cd19",7429:"b1f5f9a8",7457:"7ca5f97b",7472:"014c22c9",7528:"a847ae8a",7591:"a12b43d8",7602:"5bf11ef6",7631:"e1a3f709",7696:"af5b90ab",7705:"844fa734",7769:"346c9ee9",7785:"8d37f710",7792:"5b4a45f2",7918:"cd5f506c",7920:"4f3da6ff",7962:"bcbe7852",8031:"bbd04079",8059:"9bc39ffe",8131:"3c55aeb9",8180:"9ade05c3",8225:"164446c1",8255:"5d0ddfb6",8313:"6b51a824",8377:"c804bc28",8443:"85386328",8476:"f4ad3d6c",8518:"15939e15",8534:"acffebb6",8563:"9381b554",8607:"eb2bdc64",8778:"9efbfe44",8784:"475a09f2",8797:"d58943db",8821:"740225ec",8840:"7a0c6f0f",8858:"8bdc645c",8933:"a47efed6",8978:"ce68b8e8",8984:"15fe5569",8988:"fc4cfda0",9025:"842acfeb",9026:"452b2ad9",9043:"25e43f8c",9135:"7cdb8a50",9191:"b3505a58",9242:"eabad777",9253:"fac392f2",9282:"3c48f506",9289:"00c7369e",9423:"50f75d87",9505:"bc8ace66",9537:"fa83b7b9",9567:"eac2e9b4",9604:"c4355469",9624:"a416d339",9632:"980b3371",9641:"3dd7d625",9661:"8a4b1184",9707:"22816828",9732:"26292ca6",9748:"9d4bbcb6",9766:"ebba03db",9774:"8412949f",9777:"49dacd79",9783:"c232b9ba",9820:"85bba3bc",9952:"030a5290",9959:"e2f8fed9",9981:"f5f3cf76"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),d={},r.l=(e,a,c,f)=>{if(d[e])d[e].push(a);else{var b,t;if(void 0!==c)for(var o=document.getElementsByTagName("script"),n=0;n{b.onerror=b.onload=null,clearTimeout(l);var f=d[e];if(delete d[e],b.parentNode&&b.parentNode.removeChild(b),f&&f.forEach((e=>e(c))),a)return a(c)},l=setTimeout(u.bind(null,void 0,{type:"timeout",target:b}),12e4);b.onerror=u.bind(null,b.onerror),b.onload=u.bind(null,b.onload),t&&document.head.appendChild(b)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/metals/",r.gca=function(e){return e={17896441:"7918",28906591:"1648",30083153:"7372",49773175:"4100",79920604:"7785","55a95aa3":"48",f9150bb6:"50","935f2afb":"53","53c82ccc":"98","143cbec3":"119","0c485ec1":"190","0c130405":"198","77892e30":"202","73043cbc":"224",e2e5f5d1:"363","35db43ad":"366","99d7db30":"382","3d6e158a":"448",df53e5ec:"450","7475f9e7":"463","6079a6bf":"490","56bbb0f8":"504","00813942":"517","1512f001":"569",ef96a7a2:"600",e9356b00:"608","99d3dc3a":"713",c7875d0d:"758","6722346e":"833",bfd27103:"867","643c52ed":"984","794071d8":"989",c278e024:"1046",bdc47ac0:"1157",bdea20ec:"1181",f1a7d268:"1228",a935f661:"1239","74f6f7a6":"1295",b04d5738:"1457","786192e2":"1557","56cef870":"1566",d8176b79:"1650","8f9f6130":"1667","7d4f68c1":"1733","309b8d38":"1753",abf165a1:"1976","1a1ad967":"1977","82e8fb15":"2010","2387c651":"2036","2e1ac853":"2041",cb899f97:"2057","0d8e09e6":"2063",ef440da7:"2172","9a7faebf":"2174","404bab64":"2240",f315a94a:"2246","9349bfb9":"2287","814f3328":"2535",af8d2261:"2604",bc8294f9:"2665",f87b843d:"2726","17a26cd8":"2822","5c04405b":"2823",ad57a4da:"2847","4ad5693c":"2859","3839ad99":"2882","80d94b51":"2884","4844a7cd":"2975",c424153c:"2994",a6aa9e1f:"3089","64912a2b":"3104","0d7cd0de":"3164","15b090c7":"3214","6999e097":"3282",d8cf581d:"3290","01706c44":"3315","515fa385":"3333","27feb48a":"3351","7af95c3c":"3470","17823fa5":"3553","9e4087bc":"3608","9b49e051":"3621","25446b1f":"3681",b28f3685:"3707","39178d36":"3710","75d4c63e":"3726",a4b63d05:"3733","9ae6eeaa":"3737","9ea6b57a":"3740",fb11efee:"3758",eac4f91f:"3808",f3503827:"3827","22c2c9b0":"3980","4e26f5de":"4015","2c5862c4":"4019",cabfa371:"4073",cfe9f849:"4117",c109e00d:"4131","1a79d8f3":"4167",c4f5d8e4:"4195","0e2b725e":"4256",ac2e449c:"4307",e38d6f3f:"4355",a94703ab:"4368",db18f655:"4372","8ead6264":"4391","3cf1e930":"4408",a64b4ddf:"4583",bb177581:"4663","48a1d228":"4694",c4083f57:"4766","8a0b8ece":"4782","70f9df55":"4797",f922820e:"4807","97ce67ef":"4839","400a1ae3":"5014","243d370e":"5016","81c1ce9e":"5061","8947246e":"5130","26934d81":"5264","8ac2579a":"5358",ab2e7d85:"5359","7745fd32":"5372",e82430ca:"5411","7c0269a6":"5430","905a60c6":"5518",da363e62:"5555","801caf39":"5561","21dcb4fb":"5642","9b4a23be":"5688",d11fc459:"5780","57d9d0fa":"5865","560d1d3c":"5890","03b2a692":"5949","022bb252":"5975","0529b5a5":"6002","627fd629":"6013",ccc49370:"6103",d3dc0327:"6105","6a60bac4":"6162","2d522398":"6251",e882c012:"6275",e68a2502:"6290",d4d282d4:"6373","6a125964":"6466","3f977ffc":"6469","96a3e035":"6499","94015cb6":"6520","970a5f4e":"6561","38b82327":"6573","7d61c055":"6583",bd301d6b:"6596","0d126b35":"6622",e8c5917f:"6633","88d8e9a5":"6776","6ea6fc78":"6999",ad29d74f:"7031","01456d3b":"7099","291a747b":"7205","36958d65":"7429",eae80572:"7457","674a37b6":"7472",b3904d08:"7528",e879be1f:"7591",a4c9fa90:"7602",fda909f7:"7631",c6da16b1:"7696","0beb67bc":"7705",b79c2638:"7769",d94b0c5c:"7792","1a4e3797":"7920",f78a808a:"7962","07ab39c8":"8031","94cc8923":"8059","07c8b2d8":"8131",d7024f94:"8180",dd4c9461:"8225",d24c97fd:"8255",cc1c03c7:"8313","64d6e9a7":"8377","4af6d88b":"8476",a7bd4aaa:"8518",dc0c48b3:"8534","5346cb4e":"8563","6ed4e313":"8607","205a1816":"8778",c64e8655:"8784","2131c61b":"8797","08b44b83":"8821","2ff5ad1b":"8840",cc709768:"8858","8b7e7f73":"8933","9a20f037":"8978","752eae27":"8984","43bfba49":"8988",ed7c6679:"9025",b0577adc:"9026","2328fd63":"9043","1ed82af1":"9135","432804b2":"9191","995bfa6d":"9242","2216edbc":"9253","5d80abc8":"9282",f0507210:"9289",bdbe54cc:"9423",adce20d1:"9505","5ec07b8b":"9537",a1f1bc88:"9567",d8beb153:"9604","1b9d5eae":"9624","35bd5843":"9632",a91b50a6:"9641","5e95c892":"9661","5980cb66":"9707",bd78ee39:"9732",bcb36622:"9748",b54e7820:"9766","7ea62e57":"9774","71846d42":"9777","615063b9":"9783","5d99d17c":"9820","508e58e7":"9952",adb52a11:"9959",a81ab01c:"9981"}[e]||e,r.p+r.u(e)},(()=>{var e={1303:0,532:0};r.f.j=(a,c)=>{var d=r.o(e,a)?e[a]:void 0;if(0!==d)if(d)c.push(d[2]);else if(/^(1303|532)$/.test(a))e[a]=0;else{var f=new Promise(((c,f)=>d=e[a]=[c,f]));c.push(d[2]=f);var b=r.p+r.u(a),t=new Error;r.l(b,(c=>{if(r.o(e,a)&&(0!==(d=e[a])&&(e[a]=void 0),d)){var f=c&&("load"===c.type?"missing":c.type),b=c&&c.target&&c.target.src;t.message="Loading chunk "+a+" failed.\n("+f+": "+b+")",t.name="ChunkLoadError",t.type=f,t.request=b,d[1](t)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,c)=>{var d,f,[b,t,o]=c,n=0;if(b.some((a=>0!==e[a]))){for(d in t)r.o(t,d)&&(r.m[d]=t[d]);if(o)var i=o(r)}for(a&&a(c);n{"use strict";var e,a,c,d,f={},b={};function r(e){var a=b[e];if(void 0!==a)return a.exports;var c=b[e]={exports:{}};return f[e].call(c.exports,c,c.exports,r),c.exports}r.m=f,e=[],r.O=(a,c,d,f)=>{if(!c){var b=1/0;for(i=0;i=f)&&Object.keys(r.O).every((e=>r.O[e](c[o])))?c.splice(o--,1):(t=!1,f0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[c,d,f]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a:a}),a},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,d){if(1&d&&(e=this(e)),8&d)return e;if("object"==typeof e&&e){if(4&d&&e.__esModule)return e;if(16&d&&"function"==typeof e.then)return e}var f=Object.create(null);r.r(f);var b={};a=a||[null,c({}),c([]),c(c)];for(var t=2&d&&e;"object"==typeof t&&!~a.indexOf(t);t=c(t))Object.getOwnPropertyNames(t).forEach((a=>b[a]=()=>e[a]));return b.default=()=>e,r.d(f,b),f},r.d=(e,a)=>{for(var c in a)r.o(a,c)&&!r.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:a[c]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,c)=>(r.f[c](e,a),a)),[])),r.u=e=>"assets/js/"+({48:"55a95aa3",50:"f9150bb6",53:"935f2afb",98:"53c82ccc",119:"143cbec3",190:"0c485ec1",198:"0c130405",202:"77892e30",224:"73043cbc",363:"e2e5f5d1",366:"35db43ad",382:"99d7db30",448:"3d6e158a",450:"df53e5ec",463:"7475f9e7",490:"6079a6bf",504:"56bbb0f8",517:"00813942",569:"1512f001",600:"ef96a7a2",608:"e9356b00",713:"99d3dc3a",758:"c7875d0d",833:"6722346e",867:"bfd27103",984:"643c52ed",989:"794071d8",1046:"c278e024",1157:"bdc47ac0",1181:"bdea20ec",1228:"f1a7d268",1239:"a935f661",1295:"74f6f7a6",1457:"b04d5738",1557:"786192e2",1566:"56cef870",1648:"28906591",1650:"d8176b79",1667:"8f9f6130",1733:"7d4f68c1",1753:"309b8d38",1976:"abf165a1",1977:"1a1ad967",2010:"82e8fb15",2036:"2387c651",2041:"2e1ac853",2057:"cb899f97",2063:"0d8e09e6",2172:"ef440da7",2174:"9a7faebf",2240:"404bab64",2246:"f315a94a",2287:"9349bfb9",2535:"814f3328",2604:"af8d2261",2665:"bc8294f9",2726:"f87b843d",2822:"17a26cd8",2823:"5c04405b",2847:"ad57a4da",2859:"4ad5693c",2882:"3839ad99",2884:"80d94b51",2975:"4844a7cd",2994:"c424153c",3089:"a6aa9e1f",3104:"64912a2b",3164:"0d7cd0de",3214:"15b090c7",3282:"6999e097",3290:"d8cf581d",3315:"01706c44",3333:"515fa385",3351:"27feb48a",3470:"7af95c3c",3553:"17823fa5",3608:"9e4087bc",3621:"9b49e051",3681:"25446b1f",3707:"b28f3685",3710:"39178d36",3726:"75d4c63e",3733:"a4b63d05",3737:"9ae6eeaa",3740:"9ea6b57a",3758:"fb11efee",3808:"eac4f91f",3827:"f3503827",3980:"22c2c9b0",4015:"4e26f5de",4019:"2c5862c4",4073:"cabfa371",4100:"49773175",4117:"cfe9f849",4131:"c109e00d",4167:"1a79d8f3",4195:"c4f5d8e4",4256:"0e2b725e",4307:"ac2e449c",4355:"e38d6f3f",4368:"a94703ab",4372:"db18f655",4391:"8ead6264",4408:"3cf1e930",4583:"a64b4ddf",4663:"bb177581",4694:"48a1d228",4766:"c4083f57",4782:"8a0b8ece",4797:"70f9df55",4807:"f922820e",4839:"97ce67ef",5014:"400a1ae3",5016:"243d370e",5061:"81c1ce9e",5130:"8947246e",5264:"26934d81",5358:"8ac2579a",5359:"ab2e7d85",5372:"7745fd32",5411:"e82430ca",5430:"7c0269a6",5518:"905a60c6",5555:"da363e62",5561:"801caf39",5642:"21dcb4fb",5688:"9b4a23be",5780:"d11fc459",5865:"57d9d0fa",5890:"560d1d3c",5949:"03b2a692",5975:"022bb252",6002:"0529b5a5",6013:"627fd629",6103:"ccc49370",6105:"d3dc0327",6162:"6a60bac4",6251:"2d522398",6275:"e882c012",6290:"e68a2502",6373:"d4d282d4",6466:"6a125964",6469:"3f977ffc",6499:"96a3e035",6520:"94015cb6",6561:"970a5f4e",6573:"38b82327",6583:"7d61c055",6596:"bd301d6b",6622:"0d126b35",6633:"e8c5917f",6776:"88d8e9a5",6999:"6ea6fc78",7031:"ad29d74f",7099:"01456d3b",7205:"291a747b",7372:"30083153",7429:"36958d65",7457:"eae80572",7472:"674a37b6",7528:"b3904d08",7591:"e879be1f",7602:"a4c9fa90",7631:"fda909f7",7696:"c6da16b1",7705:"0beb67bc",7769:"b79c2638",7785:"79920604",7792:"d94b0c5c",7918:"17896441",7920:"1a4e3797",7962:"f78a808a",8031:"07ab39c8",8059:"94cc8923",8131:"07c8b2d8",8180:"d7024f94",8225:"dd4c9461",8255:"d24c97fd",8313:"cc1c03c7",8377:"64d6e9a7",8476:"4af6d88b",8518:"a7bd4aaa",8534:"dc0c48b3",8563:"5346cb4e",8607:"6ed4e313",8778:"205a1816",8784:"c64e8655",8797:"2131c61b",8821:"08b44b83",8840:"2ff5ad1b",8858:"cc709768",8933:"8b7e7f73",8978:"9a20f037",8984:"752eae27",8988:"43bfba49",9025:"ed7c6679",9026:"b0577adc",9043:"2328fd63",9135:"1ed82af1",9191:"432804b2",9242:"995bfa6d",9253:"2216edbc",9282:"5d80abc8",9289:"f0507210",9423:"bdbe54cc",9505:"adce20d1",9537:"5ec07b8b",9567:"a1f1bc88",9604:"d8beb153",9624:"1b9d5eae",9632:"35bd5843",9641:"a91b50a6",9661:"5e95c892",9707:"5980cb66",9732:"bd78ee39",9748:"bcb36622",9766:"b54e7820",9774:"7ea62e57",9777:"71846d42",9783:"615063b9",9820:"5d99d17c",9952:"508e58e7",9959:"adb52a11",9981:"a81ab01c"}[e]||e)+"."+{48:"42f043f5",50:"db2c4c30",53:"ae7a5bc0",98:"0bb9301e",119:"0e61175d",130:"f8f20161",190:"c8d7e127",198:"4befce7e",202:"f8cc7368",224:"fd900b2a",363:"556c808e",366:"d12ed6c4",382:"2ebcd820",448:"fc2c1bf0",450:"05ff02df",463:"00757cfa",490:"515430b3",504:"bdd34659",517:"a7ba0c74",569:"15994868",600:"97ffe142",608:"fddc805e",713:"7b1bebfa",758:"cc50cbee",833:"23caaa2a",867:"d6ab4a43",984:"26b7bfa2",989:"9d31d53a",1046:"ebeede98",1157:"2e882a07",1181:"4b4db856",1228:"0c15f1f7",1239:"54ca023f",1295:"5fb8cb91",1457:"35e3ecbd",1557:"95300729",1566:"edefe357",1648:"bf7a02e3",1650:"955975ec",1667:"d64fe1e6",1733:"1d8c1b94",1753:"9148cc3d",1772:"857c6a61",1976:"a80fe6a6",1977:"177db65c",2010:"2ab83e15",2036:"5f801935",2041:"93892216",2057:"6f0b85c5",2063:"3d10b7c7",2172:"82776d6f",2174:"3aa6e3cc",2240:"aaa341dc",2246:"a5f78082",2287:"2d795b3a",2535:"d5f752fe",2604:"9cfff6f5",2665:"bb76be72",2726:"29747dce",2822:"a5dad10d",2823:"c110d23e",2847:"c849c209",2859:"3ac6cf58",2882:"05e324b3",2884:"cc220ef0",2975:"f52a13f2",2994:"aaa5741b",3089:"17675f3f",3104:"07624ced",3164:"2d20a961",3214:"b3921c14",3282:"4a77525f",3290:"2bbbba4d",3315:"e5243e31",3333:"d70b2be1",3351:"c3706ced",3470:"3b7f563d",3553:"2d8449ea",3608:"3f62f523",3621:"6f64e2de",3681:"b9231a4d",3707:"434fe367",3710:"fcd5c61a",3726:"0c02db02",3733:"7d64216e",3737:"b6fd0df2",3740:"28c8a5a7",3758:"6a35c593",3808:"460a2a59",3827:"e99eaf73",3890:"2107840f",3980:"9facad4d",4015:"0aa35c24",4019:"861d2927",4073:"8d48884d",4100:"3ccc5da4",4117:"422993ed",4131:"729c9154",4167:"cc0a4adf",4195:"620eebd1",4256:"15ffae58",4307:"13c50bde",4355:"324c49ce",4368:"2e43e6e5",4372:"620d8908",4391:"29427bf9",4408:"1541b5d5",4583:"68f6d2f8",4663:"be50f81e",4694:"4b6c8c40",4766:"8219cd73",4782:"1f7f4ad7",4797:"ff6294ea",4807:"8a680b20",4839:"c3695cb2",5014:"aef2d2c7",5016:"45eca05d",5061:"11c546da",5130:"121e72cd",5264:"dda2acee",5358:"45cfadb8",5359:"6f8586bc",5372:"b5a0d406",5411:"340c4767",5430:"e740a831",5518:"419564c8",5525:"83bf4f45",5555:"8b3fbcff",5561:"03257b4e",5642:"112e9efc",5688:"1a3a56c5",5780:"14663490",5865:"ea08c93b",5890:"9b07f339",5949:"c07fb85d",5975:"93c9cb05",6002:"743f6348",6013:"9e561218",6103:"cc8f7d32",6105:"f82f6f34",6162:"678e5615",6251:"ae3a4098",6275:"0a84885d",6290:"ce8de943",6373:"428fcf3f",6466:"908d9965",6469:"6693edc4",6499:"57b2898f",6520:"aebd4f14",6561:"154c41bc",6573:"c8a0be11",6583:"cdf3f526",6596:"8433db70",6622:"cc470163",6633:"0085eae7",6776:"a85a0ffa",6999:"389d066b",7031:"ef881b7b",7099:"d4073d51",7205:"0b222975",7372:"b4b9cd19",7429:"b1f5f9a8",7457:"7ca5f97b",7472:"014c22c9",7528:"a847ae8a",7591:"a12b43d8",7602:"5bf11ef6",7631:"e1a3f709",7696:"af5b90ab",7705:"844fa734",7769:"346c9ee9",7785:"8d37f710",7792:"5b4a45f2",7918:"cd5f506c",7920:"4f3da6ff",7962:"bcbe7852",8031:"bbd04079",8059:"9bc39ffe",8131:"3c55aeb9",8180:"9ade05c3",8225:"164446c1",8255:"5d0ddfb6",8313:"6b51a824",8377:"c804bc28",8443:"85386328",8476:"f4ad3d6c",8518:"15939e15",8534:"acffebb6",8563:"9381b554",8607:"eb2bdc64",8778:"9efbfe44",8784:"475a09f2",8797:"d58943db",8821:"740225ec",8840:"7a0c6f0f",8858:"8bdc645c",8933:"a47efed6",8978:"ce68b8e8",8984:"15fe5569",8988:"fc4cfda0",9025:"842acfeb",9026:"452b2ad9",9043:"25e43f8c",9135:"7cdb8a50",9191:"b3505a58",9242:"eabad777",9253:"fac392f2",9282:"3c48f506",9289:"00c7369e",9423:"50f75d87",9505:"bc8ace66",9537:"fa83b7b9",9567:"eac2e9b4",9604:"c4355469",9624:"a416d339",9632:"980b3371",9641:"3dd7d625",9661:"8a4b1184",9707:"22816828",9732:"26292ca6",9748:"9d4bbcb6",9766:"ebba03db",9774:"8412949f",9777:"49dacd79",9783:"c232b9ba",9820:"85bba3bc",9952:"030a5290",9959:"e2f8fed9",9981:"f5f3cf76"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),d={},r.l=(e,a,c,f)=>{if(d[e])d[e].push(a);else{var b,t;if(void 0!==c)for(var o=document.getElementsByTagName("script"),n=0;n{b.onerror=b.onload=null,clearTimeout(l);var f=d[e];if(delete d[e],b.parentNode&&b.parentNode.removeChild(b),f&&f.forEach((e=>e(c))),a)return a(c)},l=setTimeout(u.bind(null,void 0,{type:"timeout",target:b}),12e4);b.onerror=u.bind(null,b.onerror),b.onload=u.bind(null,b.onload),t&&document.head.appendChild(b)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/metals/",r.gca=function(e){return e={17896441:"7918",28906591:"1648",30083153:"7372",49773175:"4100",79920604:"7785","55a95aa3":"48",f9150bb6:"50","935f2afb":"53","53c82ccc":"98","143cbec3":"119","0c485ec1":"190","0c130405":"198","77892e30":"202","73043cbc":"224",e2e5f5d1:"363","35db43ad":"366","99d7db30":"382","3d6e158a":"448",df53e5ec:"450","7475f9e7":"463","6079a6bf":"490","56bbb0f8":"504","00813942":"517","1512f001":"569",ef96a7a2:"600",e9356b00:"608","99d3dc3a":"713",c7875d0d:"758","6722346e":"833",bfd27103:"867","643c52ed":"984","794071d8":"989",c278e024:"1046",bdc47ac0:"1157",bdea20ec:"1181",f1a7d268:"1228",a935f661:"1239","74f6f7a6":"1295",b04d5738:"1457","786192e2":"1557","56cef870":"1566",d8176b79:"1650","8f9f6130":"1667","7d4f68c1":"1733","309b8d38":"1753",abf165a1:"1976","1a1ad967":"1977","82e8fb15":"2010","2387c651":"2036","2e1ac853":"2041",cb899f97:"2057","0d8e09e6":"2063",ef440da7:"2172","9a7faebf":"2174","404bab64":"2240",f315a94a:"2246","9349bfb9":"2287","814f3328":"2535",af8d2261:"2604",bc8294f9:"2665",f87b843d:"2726","17a26cd8":"2822","5c04405b":"2823",ad57a4da:"2847","4ad5693c":"2859","3839ad99":"2882","80d94b51":"2884","4844a7cd":"2975",c424153c:"2994",a6aa9e1f:"3089","64912a2b":"3104","0d7cd0de":"3164","15b090c7":"3214","6999e097":"3282",d8cf581d:"3290","01706c44":"3315","515fa385":"3333","27feb48a":"3351","7af95c3c":"3470","17823fa5":"3553","9e4087bc":"3608","9b49e051":"3621","25446b1f":"3681",b28f3685:"3707","39178d36":"3710","75d4c63e":"3726",a4b63d05:"3733","9ae6eeaa":"3737","9ea6b57a":"3740",fb11efee:"3758",eac4f91f:"3808",f3503827:"3827","22c2c9b0":"3980","4e26f5de":"4015","2c5862c4":"4019",cabfa371:"4073",cfe9f849:"4117",c109e00d:"4131","1a79d8f3":"4167",c4f5d8e4:"4195","0e2b725e":"4256",ac2e449c:"4307",e38d6f3f:"4355",a94703ab:"4368",db18f655:"4372","8ead6264":"4391","3cf1e930":"4408",a64b4ddf:"4583",bb177581:"4663","48a1d228":"4694",c4083f57:"4766","8a0b8ece":"4782","70f9df55":"4797",f922820e:"4807","97ce67ef":"4839","400a1ae3":"5014","243d370e":"5016","81c1ce9e":"5061","8947246e":"5130","26934d81":"5264","8ac2579a":"5358",ab2e7d85:"5359","7745fd32":"5372",e82430ca:"5411","7c0269a6":"5430","905a60c6":"5518",da363e62:"5555","801caf39":"5561","21dcb4fb":"5642","9b4a23be":"5688",d11fc459:"5780","57d9d0fa":"5865","560d1d3c":"5890","03b2a692":"5949","022bb252":"5975","0529b5a5":"6002","627fd629":"6013",ccc49370:"6103",d3dc0327:"6105","6a60bac4":"6162","2d522398":"6251",e882c012:"6275",e68a2502:"6290",d4d282d4:"6373","6a125964":"6466","3f977ffc":"6469","96a3e035":"6499","94015cb6":"6520","970a5f4e":"6561","38b82327":"6573","7d61c055":"6583",bd301d6b:"6596","0d126b35":"6622",e8c5917f:"6633","88d8e9a5":"6776","6ea6fc78":"6999",ad29d74f:"7031","01456d3b":"7099","291a747b":"7205","36958d65":"7429",eae80572:"7457","674a37b6":"7472",b3904d08:"7528",e879be1f:"7591",a4c9fa90:"7602",fda909f7:"7631",c6da16b1:"7696","0beb67bc":"7705",b79c2638:"7769",d94b0c5c:"7792","1a4e3797":"7920",f78a808a:"7962","07ab39c8":"8031","94cc8923":"8059","07c8b2d8":"8131",d7024f94:"8180",dd4c9461:"8225",d24c97fd:"8255",cc1c03c7:"8313","64d6e9a7":"8377","4af6d88b":"8476",a7bd4aaa:"8518",dc0c48b3:"8534","5346cb4e":"8563","6ed4e313":"8607","205a1816":"8778",c64e8655:"8784","2131c61b":"8797","08b44b83":"8821","2ff5ad1b":"8840",cc709768:"8858","8b7e7f73":"8933","9a20f037":"8978","752eae27":"8984","43bfba49":"8988",ed7c6679:"9025",b0577adc:"9026","2328fd63":"9043","1ed82af1":"9135","432804b2":"9191","995bfa6d":"9242","2216edbc":"9253","5d80abc8":"9282",f0507210:"9289",bdbe54cc:"9423",adce20d1:"9505","5ec07b8b":"9537",a1f1bc88:"9567",d8beb153:"9604","1b9d5eae":"9624","35bd5843":"9632",a91b50a6:"9641","5e95c892":"9661","5980cb66":"9707",bd78ee39:"9732",bcb36622:"9748",b54e7820:"9766","7ea62e57":"9774","71846d42":"9777","615063b9":"9783","5d99d17c":"9820","508e58e7":"9952",adb52a11:"9959",a81ab01c:"9981"}[e]||e,r.p+r.u(e)},(()=>{var e={1303:0,532:0};r.f.j=(a,c)=>{var d=r.o(e,a)?e[a]:void 0;if(0!==d)if(d)c.push(d[2]);else if(/^(1303|532)$/.test(a))e[a]=0;else{var f=new Promise(((c,f)=>d=e[a]=[c,f]));c.push(d[2]=f);var b=r.p+r.u(a),t=new Error;r.l(b,(c=>{if(r.o(e,a)&&(0!==(d=e[a])&&(e[a]=void 0),d)){var f=c&&("load"===c.type?"missing":c.type),b=c&&c.target&&c.target.src;t.message="Loading chunk "+a+" failed.\n("+f+": "+b+")",t.name="ChunkLoadError",t.type=f,t.request=b,d[1](t)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,c)=>{var d,f,[b,t,o]=c,n=0;if(b.some((a=>0!==e[a]))){for(d in t)r.o(t,d)&&(r.m[d]=t[d]);if(o)var i=o(r)}for(a&&a(c);n
-
+
diff --git a/blog/2018/12/12/fast-goto-definition/index.html b/blog/2018/12/12/fast-goto-definition/index.html
index 1d6df2ce7c6..9692421021b 100644
--- a/blog/2018/12/12/fast-goto-definition/index.html
+++ b/blog/2018/12/12/fast-goto-definition/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2018/12/14/iron/index.html b/blog/2018/12/14/iron/index.html
index 10b4d515977..cc885d45c7f 100644
--- a/blog/2018/12/14/iron/index.html
+++ b/blog/2018/12/14/iron/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2019/01/22/bloom-filters/index.html b/blog/2019/01/22/bloom-filters/index.html
index 0f6db36ce87..c6934f491d7 100644
--- a/blog/2019/01/22/bloom-filters/index.html
+++ b/blog/2019/01/22/bloom-filters/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2019/01/24/tin/index.html b/blog/2019/01/24/tin/index.html
index e2cc4103185..f87870bb4a4 100644
--- a/blog/2019/01/24/tin/index.html
+++ b/blog/2019/01/24/tin/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2019/02/01/tin/index.html b/blog/2019/02/01/tin/index.html
index 4abbd9a7bc7..c484e7f5baf 100644
--- a/blog/2019/02/01/tin/index.html
+++ b/blog/2019/02/01/tin/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2019/04/12/mercury/index.html b/blog/2019/04/12/mercury/index.html
index 6fbb8121069..b04201f72f8 100644
--- a/blog/2019/04/12/mercury/index.html
+++ b/blog/2019/04/12/mercury/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2019/04/26/mercury/index.html b/blog/2019/04/26/mercury/index.html
index 1cd4369aa54..0aaba42fc16 100644
--- a/blog/2019/04/26/mercury/index.html
+++ b/blog/2019/04/26/mercury/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2019/06/11/radium/index.html b/blog/2019/06/11/radium/index.html
index 97cd35c884a..d9c87a13013 100644
--- a/blog/2019/06/11/radium/index.html
+++ b/blog/2019/06/11/radium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2019/06/28/thorium/index.html b/blog/2019/06/28/thorium/index.html
index 4d2737695ef..ece2bb409ba 100644
--- a/blog/2019/06/28/thorium/index.html
+++ b/blog/2019/06/28/thorium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2019/09/02/thorium/index.html b/blog/2019/09/02/thorium/index.html
index 95404b9c348..e47fc6be362 100644
--- a/blog/2019/09/02/thorium/index.html
+++ b/blog/2019/09/02/thorium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2019/09/12/thorium/index.html b/blog/2019/09/12/thorium/index.html
index dec280da9db..6e203ebf229 100644
--- a/blog/2019/09/12/thorium/index.html
+++ b/blog/2019/09/12/thorium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2019/09/23/thorium/index.html b/blog/2019/09/23/thorium/index.html
index 6deaea656e0..72ebc2f9711 100644
--- a/blog/2019/09/23/thorium/index.html
+++ b/blog/2019/09/23/thorium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2020/01/10/cobalt/index.html b/blog/2020/01/10/cobalt/index.html
index cbed622688a..08c36611260 100644
--- a/blog/2020/01/10/cobalt/index.html
+++ b/blog/2020/01/10/cobalt/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2020/02/26/cobalt/index.html b/blog/2020/02/26/cobalt/index.html
index b60f7985417..c761efbfd24 100644
--- a/blog/2020/02/26/cobalt/index.html
+++ b/blog/2020/02/26/cobalt/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2020/03/19/cobalt/index.html b/blog/2020/03/19/cobalt/index.html
index 09c3167a552..78d8b5f5a15 100644
--- a/blog/2020/03/19/cobalt/index.html
+++ b/blog/2020/03/19/cobalt/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2020/04/10/cobalt/index.html b/blog/2020/04/10/cobalt/index.html
index a59eefc68ab..46ff3d94e52 100644
--- a/blog/2020/04/10/cobalt/index.html
+++ b/blog/2020/04/10/cobalt/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2020/04/12/mercury/index.html b/blog/2020/04/12/mercury/index.html
index 60df9690992..7c130108154 100644
--- a/blog/2020/04/12/mercury/index.html
+++ b/blog/2020/04/12/mercury/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2020/05/04/lithium/index.html b/blog/2020/05/04/lithium/index.html
index 5f553a95ed9..933416c1abb 100644
--- a/blog/2020/05/04/lithium/index.html
+++ b/blog/2020/05/04/lithium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2020/07/01/lithium/index.html b/blog/2020/07/01/lithium/index.html
index 50af325971c..5718a8169bf 100644
--- a/blog/2020/07/01/lithium/index.html
+++ b/blog/2020/07/01/lithium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2020/07/15/lithium/index.html b/blog/2020/07/15/lithium/index.html
index c56c3370e94..8bd321de956 100644
--- a/blog/2020/07/15/lithium/index.html
+++ b/blog/2020/07/15/lithium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2020/07/23/configuring-a-client/index.html b/blog/2020/07/23/configuring-a-client/index.html
index 9ec8b9b579e..76f1ac47dcd 100644
--- a/blog/2020/07/23/configuring-a-client/index.html
+++ b/blog/2020/07/23/configuring-a-client/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2020/08/19/lithium/index.html b/blog/2020/08/19/lithium/index.html
index f94b77893b0..afab86aefe6 100644
--- a/blog/2020/08/19/lithium/index.html
+++ b/blog/2020/08/19/lithium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2020/09/21/lithium/index.html b/blog/2020/09/21/lithium/index.html
index a57e1b2c344..e6c1bbba2d7 100644
--- a/blog/2020/09/21/lithium/index.html
+++ b/blog/2020/09/21/lithium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2020/11/06/sbt-BSP-support/index.html b/blog/2020/11/06/sbt-BSP-support/index.html
index 73b74c30ea5..3d6c382b7a3 100644
--- a/blog/2020/11/06/sbt-BSP-support/index.html
+++ b/blog/2020/11/06/sbt-BSP-support/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2020/11/10/lithium/index.html b/blog/2020/11/10/lithium/index.html
index 1d30dca3622..98124289829 100644
--- a/blog/2020/11/10/lithium/index.html
+++ b/blog/2020/11/10/lithium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2020/11/20/lithium/index.html b/blog/2020/11/20/lithium/index.html
index a8908870113..a72fc75b347 100644
--- a/blog/2020/11/20/lithium/index.html
+++ b/blog/2020/11/20/lithium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2020/11/26/lithium/index.html b/blog/2020/11/26/lithium/index.html
index 39ecbeacb0b..328ba789756 100644
--- a/blog/2020/11/26/lithium/index.html
+++ b/blog/2020/11/26/lithium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2020/12/19/lithium/index.html b/blog/2020/12/19/lithium/index.html
index 34005cb912a..605386ed3f9 100644
--- a/blog/2020/12/19/lithium/index.html
+++ b/blog/2020/12/19/lithium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2021/01/19/lithium/index.html b/blog/2021/01/19/lithium/index.html
index e5365eac7da..7c06c3faf4c 100644
--- a/blog/2021/01/19/lithium/index.html
+++ b/blog/2021/01/19/lithium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2021/02/02/metals-retro-part1/index.html b/blog/2021/02/02/metals-retro-part1/index.html
index 5de76368d86..e8b7f9d803c 100644
--- a/blog/2021/02/02/metals-retro-part1/index.html
+++ b/blog/2021/02/02/metals-retro-part1/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2021/02/24/tungsten/index.html b/blog/2021/02/24/tungsten/index.html
index 4f998a302a5..f2d78a634e0 100644
--- a/blog/2021/02/24/tungsten/index.html
+++ b/blog/2021/02/24/tungsten/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2021/04/06/tungsten/index.html b/blog/2021/04/06/tungsten/index.html
index d328170d50e..b7db715b732 100644
--- a/blog/2021/04/06/tungsten/index.html
+++ b/blog/2021/04/06/tungsten/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2021/04/20/tungsten/index.html b/blog/2021/04/20/tungsten/index.html
index bfeb749f0b6..b756d79917e 100644
--- a/blog/2021/04/20/tungsten/index.html
+++ b/blog/2021/04/20/tungsten/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2021/05/17/tungsten/index.html b/blog/2021/05/17/tungsten/index.html
index afe5f8e9ced..bdde071515a 100644
--- a/blog/2021/05/17/tungsten/index.html
+++ b/blog/2021/05/17/tungsten/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2021/05/31/tungsten/index.html b/blog/2021/05/31/tungsten/index.html
index f15113296a5..a0c84a3a2b0 100644
--- a/blog/2021/05/31/tungsten/index.html
+++ b/blog/2021/05/31/tungsten/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2021/07/14/tungsten/index.html b/blog/2021/07/14/tungsten/index.html
index 0d072e6bd79..9888e96a3e2 100644
--- a/blog/2021/07/14/tungsten/index.html
+++ b/blog/2021/07/14/tungsten/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2021/09/06/tungsten/index.html b/blog/2021/09/06/tungsten/index.html
index c952b0c4681..522fe51e006 100644
--- a/blog/2021/09/06/tungsten/index.html
+++ b/blog/2021/09/06/tungsten/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2021/09/16/tungsten/index.html b/blog/2021/09/16/tungsten/index.html
index 5c78356e9dd..fa6a47e78d6 100644
--- a/blog/2021/09/16/tungsten/index.html
+++ b/blog/2021/09/16/tungsten/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2021/10/26/tungsten/index.html b/blog/2021/10/26/tungsten/index.html
index a027ae389c2..af4cce2a3a7 100644
--- a/blog/2021/10/26/tungsten/index.html
+++ b/blog/2021/10/26/tungsten/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2021/11/03/tungsten/index.html b/blog/2021/11/03/tungsten/index.html
index b3e09a9ab43..b043acb1f22 100644
--- a/blog/2021/11/03/tungsten/index.html
+++ b/blog/2021/11/03/tungsten/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2022/01/12/aluminium/index.html b/blog/2022/01/12/aluminium/index.html
index 2e5f5e94c2c..08d5a84d1cb 100644
--- a/blog/2022/01/12/aluminium/index.html
+++ b/blog/2022/01/12/aluminium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2022/01/17/aluminium/index.html b/blog/2022/01/17/aluminium/index.html
index 6e63950d7bd..eea08eae28c 100644
--- a/blog/2022/01/17/aluminium/index.html
+++ b/blog/2022/01/17/aluminium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2022/02/23/towards-better-releases/index.html b/blog/2022/02/23/towards-better-releases/index.html
index 51cc8452127..a755dbdd2ec 100644
--- a/blog/2022/02/23/towards-better-releases/index.html
+++ b/blog/2022/02/23/towards-better-releases/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2022/03/08/aluminium/index.html b/blog/2022/03/08/aluminium/index.html
index d9d0d973634..102d1508c64 100644
--- a/blog/2022/03/08/aluminium/index.html
+++ b/blog/2022/03/08/aluminium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2022/04/26/aluminium/index.html b/blog/2022/04/26/aluminium/index.html
index 02cb64be205..1bb8c8d5e67 100644
--- a/blog/2022/04/26/aluminium/index.html
+++ b/blog/2022/04/26/aluminium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2022/04/27/aluminium/index.html b/blog/2022/04/27/aluminium/index.html
index 1ada293f1b0..eb55edcc6ee 100644
--- a/blog/2022/04/27/aluminium/index.html
+++ b/blog/2022/04/27/aluminium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2022/04/28/aluminium/index.html b/blog/2022/04/28/aluminium/index.html
index 9bd4740c602..30ba34b1dd5 100644
--- a/blog/2022/04/28/aluminium/index.html
+++ b/blog/2022/04/28/aluminium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2022/06/03/aluminium/index.html b/blog/2022/06/03/aluminium/index.html
index 58017e05f2a..05565165294 100644
--- a/blog/2022/06/03/aluminium/index.html
+++ b/blog/2022/06/03/aluminium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2022/07/04/aluminium/index.html b/blog/2022/07/04/aluminium/index.html
index d6227cfb10b..14557848b81 100644
--- a/blog/2022/07/04/aluminium/index.html
+++ b/blog/2022/07/04/aluminium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2022/08/10/aluminium/index.html b/blog/2022/08/10/aluminium/index.html
index 74904e0a05c..e5e84691295 100644
--- a/blog/2022/08/10/aluminium/index.html
+++ b/blog/2022/08/10/aluminium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2022/10/06/aluminium/index.html b/blog/2022/10/06/aluminium/index.html
index 00ebd7d7ab5..0c5fed1c2a0 100644
--- a/blog/2022/10/06/aluminium/index.html
+++ b/blog/2022/10/06/aluminium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2023/01/02/aluminium/index.html b/blog/2023/01/02/aluminium/index.html
index 0338833d7fd..1c875ed9cd5 100644
--- a/blog/2023/01/02/aluminium/index.html
+++ b/blog/2023/01/02/aluminium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2023/03/02/aluminium/index.html b/blog/2023/03/02/aluminium/index.html
index d3c1cdc980e..203e37ddb73 100644
--- a/blog/2023/03/02/aluminium/index.html
+++ b/blog/2023/03/02/aluminium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2023/04/21/aluminium/index.html b/blog/2023/04/21/aluminium/index.html
index 31ee951430b..25589d388cf 100644
--- a/blog/2023/04/21/aluminium/index.html
+++ b/blog/2023/04/21/aluminium/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2023/07/17/workspace-folders/index.html b/blog/2023/07/17/workspace-folders/index.html
index 1c76a01f016..4199efbfd73 100644
--- a/blog/2023/07/17/workspace-folders/index.html
+++ b/blog/2023/07/17/workspace-folders/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2023/07/19/silver/index.html b/blog/2023/07/19/silver/index.html
index a1b444ae7a6..336339ddb3e 100644
--- a/blog/2023/07/19/silver/index.html
+++ b/blog/2023/07/19/silver/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2023/08/28/silver/index.html b/blog/2023/08/28/silver/index.html
index 15e7ff491bb..84498374990 100644
--- a/blog/2023/08/28/silver/index.html
+++ b/blog/2023/08/28/silver/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2023/10/17/silver/index.html b/blog/2023/10/17/silver/index.html
index 4a16c787a08..c0c66807c1a 100644
--- a/blog/2023/10/17/silver/index.html
+++ b/blog/2023/10/17/silver/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/2023/12/12/bismuth/index.html b/blog/2023/12/12/bismuth/index.html
index c5d714c9cce..c9e4d6d1873 100644
--- a/blog/2023/12/12/bismuth/index.html
+++ b/blog/2023/12/12/bismuth/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/archive/index.html b/blog/archive/index.html
index 5cb43430725..ea763a0d018 100644
--- a/blog/archive/index.html
+++ b/blog/archive/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/index.html b/blog/index.html
index 79e24360b60..c3134b6a30d 100644
--- a/blog/index.html
+++ b/blog/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/10/index.html b/blog/page/10/index.html
index bcdbca026f6..0ff29c85116 100644
--- a/blog/page/10/index.html
+++ b/blog/page/10/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/11/index.html b/blog/page/11/index.html
index eb4afb62327..c7209a8ad11 100644
--- a/blog/page/11/index.html
+++ b/blog/page/11/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/12/index.html b/blog/page/12/index.html
index 95eef1c361f..5cb8da2364c 100644
--- a/blog/page/12/index.html
+++ b/blog/page/12/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/13/index.html b/blog/page/13/index.html
index c89bbf5e733..5f32700db29 100644
--- a/blog/page/13/index.html
+++ b/blog/page/13/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/14/index.html b/blog/page/14/index.html
index eb731ca025f..6fd7a6c43f6 100644
--- a/blog/page/14/index.html
+++ b/blog/page/14/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/15/index.html b/blog/page/15/index.html
index 2321ddb1fac..631087005cd 100644
--- a/blog/page/15/index.html
+++ b/blog/page/15/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/16/index.html b/blog/page/16/index.html
index c400fce8408..6db39327e8f 100644
--- a/blog/page/16/index.html
+++ b/blog/page/16/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/17/index.html b/blog/page/17/index.html
index 6f34319c36f..cf4987fd440 100644
--- a/blog/page/17/index.html
+++ b/blog/page/17/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/18/index.html b/blog/page/18/index.html
index d33debfe83d..53ed3728859 100644
--- a/blog/page/18/index.html
+++ b/blog/page/18/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/19/index.html b/blog/page/19/index.html
index e9511862cfd..1fa90ad23c6 100644
--- a/blog/page/19/index.html
+++ b/blog/page/19/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/2/index.html b/blog/page/2/index.html
index 8ad177f4598..218ec5a38ef 100644
--- a/blog/page/2/index.html
+++ b/blog/page/2/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/20/index.html b/blog/page/20/index.html
index ddc0db63ba8..559f1c9b041 100644
--- a/blog/page/20/index.html
+++ b/blog/page/20/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/21/index.html b/blog/page/21/index.html
index c9f032ccde7..fc966532b9a 100644
--- a/blog/page/21/index.html
+++ b/blog/page/21/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/22/index.html b/blog/page/22/index.html
index 41229fc6228..e594d6434b9 100644
--- a/blog/page/22/index.html
+++ b/blog/page/22/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/23/index.html b/blog/page/23/index.html
index 456b620427e..425676725e4 100644
--- a/blog/page/23/index.html
+++ b/blog/page/23/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/24/index.html b/blog/page/24/index.html
index 9e05c4c118a..274f92c0c29 100644
--- a/blog/page/24/index.html
+++ b/blog/page/24/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/25/index.html b/blog/page/25/index.html
index f645d90eccf..805125df2de 100644
--- a/blog/page/25/index.html
+++ b/blog/page/25/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/26/index.html b/blog/page/26/index.html
index 00e257f9e38..83c575b31b1 100644
--- a/blog/page/26/index.html
+++ b/blog/page/26/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/27/index.html b/blog/page/27/index.html
index 7eb266871c6..fbc3cc55153 100644
--- a/blog/page/27/index.html
+++ b/blog/page/27/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/28/index.html b/blog/page/28/index.html
index d07c5628c37..ad2cdfe5104 100644
--- a/blog/page/28/index.html
+++ b/blog/page/28/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/29/index.html b/blog/page/29/index.html
index 16e03d270b3..7e38ca042ce 100644
--- a/blog/page/29/index.html
+++ b/blog/page/29/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/3/index.html b/blog/page/3/index.html
index 5bd7c119bab..8cf32d6074a 100644
--- a/blog/page/3/index.html
+++ b/blog/page/3/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/30/index.html b/blog/page/30/index.html
index be41939d358..0142f157474 100644
--- a/blog/page/30/index.html
+++ b/blog/page/30/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/31/index.html b/blog/page/31/index.html
index ac54fe7d876..e4bd0bbce0e 100644
--- a/blog/page/31/index.html
+++ b/blog/page/31/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/32/index.html b/blog/page/32/index.html
index 20296c49533..7f235fdf8c7 100644
--- a/blog/page/32/index.html
+++ b/blog/page/32/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/33/index.html b/blog/page/33/index.html
index 310a51b01e6..7555ca30e98 100644
--- a/blog/page/33/index.html
+++ b/blog/page/33/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/34/index.html b/blog/page/34/index.html
index 31b0b62fd71..df53dabdd2d 100644
--- a/blog/page/34/index.html
+++ b/blog/page/34/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/35/index.html b/blog/page/35/index.html
index a572f3817fe..59820a74df7 100644
--- a/blog/page/35/index.html
+++ b/blog/page/35/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/36/index.html b/blog/page/36/index.html
index 26ef04ddb0b..872bcafd071 100644
--- a/blog/page/36/index.html
+++ b/blog/page/36/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/37/index.html b/blog/page/37/index.html
index 2ea6ad4acea..561b231b6c7 100644
--- a/blog/page/37/index.html
+++ b/blog/page/37/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/38/index.html b/blog/page/38/index.html
index fb19eab6120..0a1f42513a7 100644
--- a/blog/page/38/index.html
+++ b/blog/page/38/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/39/index.html b/blog/page/39/index.html
index 08a5e26170a..1218765c6ff 100644
--- a/blog/page/39/index.html
+++ b/blog/page/39/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/4/index.html b/blog/page/4/index.html
index 5a875f2e9c0..4744caee3df 100644
--- a/blog/page/4/index.html
+++ b/blog/page/4/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/40/index.html b/blog/page/40/index.html
index 197b2931d43..4e3501d673d 100644
--- a/blog/page/40/index.html
+++ b/blog/page/40/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/41/index.html b/blog/page/41/index.html
index 63c1c03b8f9..7dba3f4a5a9 100644
--- a/blog/page/41/index.html
+++ b/blog/page/41/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/42/index.html b/blog/page/42/index.html
index 31b1854c5a6..3640ea33f90 100644
--- a/blog/page/42/index.html
+++ b/blog/page/42/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/43/index.html b/blog/page/43/index.html
index d0794e07b07..098c34187ce 100644
--- a/blog/page/43/index.html
+++ b/blog/page/43/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/44/index.html b/blog/page/44/index.html
index 93b43e02f18..44daefe209a 100644
--- a/blog/page/44/index.html
+++ b/blog/page/44/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/45/index.html b/blog/page/45/index.html
index 245651c6fa7..0a56c092118 100644
--- a/blog/page/45/index.html
+++ b/blog/page/45/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/46/index.html b/blog/page/46/index.html
index 57596f8b12c..7a9ec2a4a44 100644
--- a/blog/page/46/index.html
+++ b/blog/page/46/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/47/index.html b/blog/page/47/index.html
index 010babf1d32..99ad1372d6f 100644
--- a/blog/page/47/index.html
+++ b/blog/page/47/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/48/index.html b/blog/page/48/index.html
index dd954c876f8..c8be5864997 100644
--- a/blog/page/48/index.html
+++ b/blog/page/48/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/49/index.html b/blog/page/49/index.html
index ed6fed851bc..4eefcde8807 100644
--- a/blog/page/49/index.html
+++ b/blog/page/49/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/5/index.html b/blog/page/5/index.html
index 96560efbfe8..e49ff326886 100644
--- a/blog/page/5/index.html
+++ b/blog/page/5/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/50/index.html b/blog/page/50/index.html
index d54d47be4ad..78fcb182c5d 100644
--- a/blog/page/50/index.html
+++ b/blog/page/50/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/51/index.html b/blog/page/51/index.html
index 47b0ed0561f..5f20b1e0c48 100644
--- a/blog/page/51/index.html
+++ b/blog/page/51/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/52/index.html b/blog/page/52/index.html
index 0123d0ef717..2bb3c5cf675 100644
--- a/blog/page/52/index.html
+++ b/blog/page/52/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/53/index.html b/blog/page/53/index.html
index d29fc3c5f59..6487e7d4ab5 100644
--- a/blog/page/53/index.html
+++ b/blog/page/53/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/54/index.html b/blog/page/54/index.html
index 929a36b05f0..d3ab806ada3 100644
--- a/blog/page/54/index.html
+++ b/blog/page/54/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/55/index.html b/blog/page/55/index.html
index ec11d69210a..7ab273a1ce3 100644
--- a/blog/page/55/index.html
+++ b/blog/page/55/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/56/index.html b/blog/page/56/index.html
index 46ad90ae425..9c73cb1ba97 100644
--- a/blog/page/56/index.html
+++ b/blog/page/56/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/57/index.html b/blog/page/57/index.html
index b69e573df58..74cf32fb74d 100644
--- a/blog/page/57/index.html
+++ b/blog/page/57/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/58/index.html b/blog/page/58/index.html
index 5b1c2fe3101..18a038feaba 100644
--- a/blog/page/58/index.html
+++ b/blog/page/58/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/59/index.html b/blog/page/59/index.html
index dcf5fc155e6..2cbf46b880e 100644
--- a/blog/page/59/index.html
+++ b/blog/page/59/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/6/index.html b/blog/page/6/index.html
index f1441487a98..3cd38ca0ddd 100644
--- a/blog/page/6/index.html
+++ b/blog/page/6/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/7/index.html b/blog/page/7/index.html
index dab4b0bee2b..fcb5b37fd85 100644
--- a/blog/page/7/index.html
+++ b/blog/page/7/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/8/index.html b/blog/page/8/index.html
index f7c28a57e0c..a1dadc7ec3a 100644
--- a/blog/page/8/index.html
+++ b/blog/page/8/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/blog/page/9/index.html b/blog/page/9/index.html
index fb93ab12262..444c6a29340 100644
--- a/blog/page/9/index.html
+++ b/blog/page/9/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/docs/acknowledgements/development/index.html b/docs/acknowledgements/development/index.html
index e0b52572c3e..7a07ef2a117 100644
--- a/docs/acknowledgements/development/index.html
+++ b/docs/acknowledgements/development/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/docs/build-tools/bloop/index.html b/docs/build-tools/bloop/index.html
index 3a70f57dcce..8e7d2b1d168 100644
--- a/docs/build-tools/bloop/index.html
+++ b/docs/build-tools/bloop/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/docs/build-tools/gradle/index.html b/docs/build-tools/gradle/index.html
index 8325cad3d44..181acfd528b 100644
--- a/docs/build-tools/gradle/index.html
+++ b/docs/build-tools/gradle/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/docs/build-tools/maven/index.html b/docs/build-tools/maven/index.html
index 5e27175dfc9..ebe57c877fc 100644
--- a/docs/build-tools/maven/index.html
+++ b/docs/build-tools/maven/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/docs/build-tools/mill/index.html b/docs/build-tools/mill/index.html
index e82c5a513db..352a31ee73d 100644
--- a/docs/build-tools/mill/index.html
+++ b/docs/build-tools/mill/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/docs/build-tools/overview/index.html b/docs/build-tools/overview/index.html
index 905ccefc1b4..69d5cea391f 100644
--- a/docs/build-tools/overview/index.html
+++ b/docs/build-tools/overview/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/docs/build-tools/sbt/index.html b/docs/build-tools/sbt/index.html
index 2791e7416da..a660bb15829 100644
--- a/docs/build-tools/sbt/index.html
+++ b/docs/build-tools/sbt/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/docs/contributors/getting-started/index.html b/docs/contributors/getting-started/index.html
index 215e9c1ec31..1f234c7526d 100644
--- a/docs/contributors/getting-started/index.html
+++ b/docs/contributors/getting-started/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/docs/contributors/project-goals/index.html b/docs/contributors/project-goals/index.html
index 18c72305aea..6f0506f2267 100644
--- a/docs/contributors/project-goals/index.html
+++ b/docs/contributors/project-goals/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/docs/contributors/releasing/index.html b/docs/contributors/releasing/index.html
index a0b3eefd967..d1cca557ba4 100644
--- a/docs/contributors/releasing/index.html
+++ b/docs/contributors/releasing/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/docs/contributors/updating-website/index.html b/docs/contributors/updating-website/index.html
index adcf0aab98e..d954e8fd121 100644
--- a/docs/contributors/updating-website/index.html
+++ b/docs/contributors/updating-website/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/docs/diagrams/instruction/index.html b/docs/diagrams/instruction/index.html
index 26cefa24789..9b1894e51ca 100644
--- a/docs/diagrams/instruction/index.html
+++ b/docs/diagrams/instruction/index.html
@@ -10,7 +10,7 @@
-
+
diff --git a/docs/editors/emacs/index.html b/docs/editors/emacs/index.html
index 5410263cc15..3221f24d1a4 100644
--- a/docs/editors/emacs/index.html
+++ b/docs/editors/emacs/index.html
@@ -10,7 +10,7 @@
-
+
@@ -128,10 +128,10 @@
Update the "server_version" setting to try out the latest pending Metals
features by accessing Preferences > Package Settings > LSP > Servers > LSP-metals
-
Version
Published
1.2.0+13-615add64-SNAPSHOT
15 Dec 2023 18:44
1.2.0+13-615add64-SNAPSHOT
15 Dec 2023 18:29
+
Version
Published
1.2.0
12 Dec 2023 10:36
1.2.0+14-72692d2c-SNAPSHOT
18 Dec 2023 10:59
Files and Directories to include in your Gitignore
The Metals server places logs and other files in the .metals directory. The
Bloop compile server places logs and compilation artifacts in the .bloop
diff --git a/docs/editors/user-configuration/index.html b/docs/editors/user-configuration/index.html
index b34d0c8d82d..6c152aa940f 100644
--- a/docs/editors/user-configuration/index.html
+++ b/docs/editors/user-configuration/index.html
@@ -10,7 +10,7 @@
-
+
Keep in mind that by default Neovim doesn't have default mappings for the
functionality you'll want like, hovers, goto definition, method signatures, etc.
You can find a full example configuration of these in the example
@@ -96,10 +96,10 @@
Metals works with the following text editors with varying degree of
diff --git a/docs/integrations/debug-adapter-protocol/index.html b/docs/integrations/debug-adapter-protocol/index.html
index 759aeeea606..bde40ba1dd2 100644
--- a/docs/integrations/debug-adapter-protocol/index.html
+++ b/docs/integrations/debug-adapter-protocol/index.html
@@ -10,7 +10,7 @@
-
+