diff --git a/404.html b/404.html index 11be20a099e..efe803260f9 100644 --- a/404.html +++ b/404.html @@ -10,8 +10,8 @@ - - + +
@@ -22,7 +22,7 @@
- - + + \ No newline at end of file diff --git a/assets/js/49773175.a86bbcc3.js b/assets/js/49773175.7c6ba7ab.js similarity index 99% rename from assets/js/49773175.a86bbcc3.js rename to assets/js/49773175.7c6ba7ab.js index fb82be78528..82715d84df1 100644 --- a/assets/js/49773175.a86bbcc3.js +++ b/assets/js/49773175.7c6ba7ab.js @@ -1 +1 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4100],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>h});var a=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var o=a.createContext({}),p=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},m=function(e){var t=p(e.components);return a.createElement(o.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,o=e.parentName,m=s(e,["components","mdxType","originalType","parentName"]),u=p(n),d=i,h=u["".concat(o,".").concat(d)]||u[d]||c[d]||r;return n?a.createElement(h,l(l({ref:t},m),{},{components:n})):a.createElement(h,l({ref:t},m))}));function h(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,l=new Array(r);l[0]=d;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s[u]="string"==typeof e?e:i,l[1]=s;for(var p=2;p{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>o,default:()=>h,frontMatter:()=>s,metadata:()=>p,toc:()=>u});var a=n(7462),i=n(3366),r=(n(7294),n(3905)),l=["components"],s={id:"vim",sidebar_label:"Vim",title:"Vim"},o=void 0,p={unversionedId:"editors/vim",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,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"}},m={},u=[{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}],c={toc:u},d="wrapper";function h(e){var t=e.components,n=(0,i.Z)(e,l);return(0,r.kt)(d,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://i.imgur.com/BglIFli.gif",alt:"nvim-metals demo"})),(0,r.kt)("p",null,"While Metals works with most LSP clients for ",(0,r.kt)("a",{parentName:"p",href:"https://www.vim.org/"},"Vim")," and\n",(0,r.kt)("a",{parentName:"p",href:"https://neovim.io/"},"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."),(0,r.kt)("h2",{id:"requirements"},"Requirements"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Java 8, 11, 17 provided by OpenJDK or Oracle"),". Eclipse OpenJ9 is not\nsupported, please make sure the ",(0,r.kt)("inlineCode",{parentName:"p"},"JAVA_HOME")," environment variable\npoints to a valid Java 8, 11 or 17 installation."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"macOS, Linux or Windows"),". Metals is developed on many operating systems and\nevery PR is tested on Ubuntu, Windows and MacOS."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Scala 2.13, 2.12, 2.11 and Scala 3"),". Metals supports these Scala versions:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"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")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"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")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Scala 2.11"),":\n2.11.12")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"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"))),(0,r.kt)("p",null,"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"),(0,r.kt)("h2",{id:"nvim-metals"},"nvim-metals"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/scalameta/nvim-metals"},(0,r.kt)("inlineCode",{parentName:"a"},"nvim-metals"))," Is the the dedicated\nMetals extension for the ",(0,r.kt)("a",{parentName:"p",href:"https://neovim.io/doc/user/lsp.html"},"built-in LSP\nsupport")," in Neovim."),(0,r.kt)("p",null,"To get started with installation please see the ",(0,r.kt)("inlineCode",{parentName:"p"},"nvim-metals"),"\n",(0,r.kt)("a",{parentName:"p",href:"https://github.com/scalameta/nvim-metals#prerequisites"},"prerequisites")," and\n",(0,r.kt)("a",{parentName:"p",href:"https://github.com/scalameta/nvim-metals#installation"},"installation steps"),"."),(0,r.kt)("table",null,(0,r.kt)("thead",null,(0,r.kt)("tr",null,(0,r.kt)("th",null,"Version"),(0,r.kt)("th",null,"Published"))),(0,r.kt)("tbody",null,(0,r.kt)("tr",null,(0,r.kt)("td",null,"1.0.1"),(0,r.kt)("td",null,"28 Aug 2023 14:46")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"1.0.1+65-45cbb9eb-SNAPSHOT"),(0,r.kt)("td",null,"01 Oct 2023 19:50")))),(0,r.kt)("p",null,"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,r.kt)("a",{parentName:"p",href:"https://github.com/scalameta/nvim-metals/discussions/39"},"example\nconfiguration"),"."),(0,r.kt)("p",null,"For a guide on all the available features in ",(0,r.kt)("inlineCode",{parentName:"p"},"nvim-metals"),", refer to the\n",(0,r.kt)("a",{parentName:"p",href:"https://github.com/scalameta/nvim-metals/discussions/279"},"features list"),"."),(0,r.kt)("h2",{id:"vim-alternatives"},"Vim alternatives"),(0,r.kt)("p",null,"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,r.kt)("a",{parentName:"p",href:"https://github.com/scalameta/coc-metals"},(0,r.kt)("inlineCode",{parentName:"a"},"coc-metals")),", but it doesn't work\nwith the newest versions of Metals and is currently ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/scalameta/coc-metals/issues/460"},"deprecated and\nunmaintained"),"."),(0,r.kt)("h3",{id:"using-an-alternative-lsp-client"},"Using an alternative LSP Client"),(0,r.kt)("p",null,"There are multiple other LSP clients that work with Vim. Here are a few:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://github.com/natebosch/vim-lsc/"},(0,r.kt)("inlineCode",{parentName:"a"},"natebosch/vim-lsc")),": simple installation and written in Vimscript."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://github.com/prabirshrestha/vim-lsp"},(0,r.kt)("inlineCode",{parentName:"a"},"vim-lsp")),": simple installation and written in\nVimscript."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://github.com/yegappan/lsp"},(0,r.kt)("inlineCode",{parentName:"a"},"yegappan/lsp")),": Very new and targeting\nVim9.")),(0,r.kt)("p",null,"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."),(0,r.kt)("p",null,"There are two ways to install Metals yourself in order to work with an\nalternative client."),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Most easily is to just use ",(0,r.kt)("a",{parentName:"li",href:"https://get-coursier.io/"},"Coursier")," to do a ",(0,r.kt)("inlineCode",{parentName:"li"},"cs\ninstall metals"),"."),(0,r.kt)("li",{parentName:"ol"},"Generating a Metals binary yourself.")),(0,r.kt)("h2",{id:"files-and-directories-to-include-in-your-gitignore"},"Files and Directories to include in your Gitignore"),(0,r.kt)("p",null,"The Metals server places logs and other files in the ",(0,r.kt)("inlineCode",{parentName:"p"},".metals")," directory. The\nBloop compile server places logs and compilation artifacts in the ",(0,r.kt)("inlineCode",{parentName:"p"},".bloop"),"\ndirectory. The Bloop plugin that generates Bloop configuration is added in the\n",(0,r.kt)("inlineCode",{parentName:"p"},"metals.sbt")," file, which is added at ",(0,r.kt)("inlineCode",{parentName:"p"},"project/metals.sbt")," as well as further\n",(0,r.kt)("inlineCode",{parentName:"p"},"project")," directories depending on how deep ",(0,r.kt)("inlineCode",{parentName:"p"},"*.sbt")," files need to be supported.\nTo support each ",(0,r.kt)("inlineCode",{parentName:"p"},"*.sbt")," file Metals needs to create an additional file at\n",(0,r.kt)("inlineCode",{parentName:"p"},"./project/project/metals.sbt")," relative to the sbt file.\nWorking with Ammonite scripts will place compiled scripts into the ",(0,r.kt)("inlineCode",{parentName:"p"},".ammonite")," directory.\nIt's recommended to exclude these directories and files\nfrom version control systems like git."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"# ~/.gitignore\n.metals/\n.bloop/\n.ammonite/\nmetals.sbt\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"coursier bootstrap org.scalameta:metals_2.13:1.0.1 -o metals -f\n")),(0,r.kt)("p",null,"(optional) It's recommended to enable JVM string de-duplication and provide a\ngenerous stack size and memory options."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"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.0.1 -o metals -f\n")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"-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,r.kt)("inlineCode",{parentName:"p"},"InitializationOptions"),". You can read more about his\n",(0,r.kt)("a",{parentName:"p",href:"https://scalameta.org/metals/blog/2020/07/23/configuring-a-client#initializationoptions"},"here"),"."),(0,r.kt)("h2",{id:"running-scalafix-rules"},"Running scalafix rules"),(0,r.kt)("p",null,"Scalafix allows users to specify some refactoring and linting rules that can be applied to your\ncodebase. Please checkout the ",(0,r.kt)("a",{parentName:"p",href:"https://scalacenter.github.io/scalafix"},"scalafix website")," for more information."),(0,r.kt)("p",null,"Since Metals v0.11.7 it's now possible to run scalafix rules using a special\ncommand ",(0,r.kt)("inlineCode",{parentName:"p"},"metals.scalafix-run"),".\nThis should run all the rules defined in your ",(0,r.kt)("inlineCode",{parentName:"p"},".scalafix.conf")," file. All built-in rules\nand the ",(0,r.kt)("a",{parentName:"p",href:"https://scalacenter.github.io/scalafix/docs/rules/community-rules.html#hygiene-rules"},"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,r.kt)("inlineCode",{parentName:"p"},"metals.scalafixRulesDependencies")," user setting.\nThose rules need to be in form of strings such as ",(0,r.kt)("inlineCode",{parentName:"p"},"com.github.liancheng::organize-imports:0.6.0"),", which\nfollows the same convention as ",(0,r.kt)("a",{parentName:"p",href:"https://get-coursier.io/"},"coursier dependencies"),"."),(0,r.kt)("p",null,"A sample scalafix configuration can be seen below:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-hocon"},'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')),(0,r.kt)("h2",{id:"getting-help"},"Getting help"),(0,r.kt)("p",null,"There is an active community using Vim and Metals. Apart from ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/scalameta/nvim-metals/issues/new/choose"},"creating an\nissue")," or ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/scalameta/nvim-metals/discussions"},"starting\na discussion")," for\n",(0,r.kt)("inlineCode",{parentName:"p"},"nvim-metals")," users, you can also ask questions in our ",(0,r.kt)("inlineCode",{parentName:"p"},"#vim-users")," ",(0,r.kt)("a",{parentName:"p",href:"https://discord.gg/FaVDrJegEh"},"Discord\nChannel")," or ",(0,r.kt)("a",{parentName:"p",href:"https://matrix.to/#/#scalameta:vim-users"},"Matrix\nBridge"),"."))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4100],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>h});var a=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var o=a.createContext({}),p=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},m=function(e){var t=p(e.components);return a.createElement(o.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,o=e.parentName,m=s(e,["components","mdxType","originalType","parentName"]),u=p(n),d=i,h=u["".concat(o,".").concat(d)]||u[d]||c[d]||r;return n?a.createElement(h,l(l({ref:t},m),{},{components:n})):a.createElement(h,l({ref:t},m))}));function h(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,l=new Array(r);l[0]=d;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s[u]="string"==typeof e?e:i,l[1]=s;for(var p=2;p{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>o,default:()=>h,frontMatter:()=>s,metadata:()=>p,toc:()=>u});var a=n(7462),i=n(3366),r=(n(7294),n(3905)),l=["components"],s={id:"vim",sidebar_label:"Vim",title:"Vim"},o=void 0,p={unversionedId:"editors/vim",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,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"}},m={},u=[{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}],c={toc:u},d="wrapper";function h(e){var t=e.components,n=(0,i.Z)(e,l);return(0,r.kt)(d,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://i.imgur.com/BglIFli.gif",alt:"nvim-metals demo"})),(0,r.kt)("p",null,"While Metals works with most LSP clients for ",(0,r.kt)("a",{parentName:"p",href:"https://www.vim.org/"},"Vim")," and\n",(0,r.kt)("a",{parentName:"p",href:"https://neovim.io/"},"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."),(0,r.kt)("h2",{id:"requirements"},"Requirements"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Java 8, 11, 17 provided by OpenJDK or Oracle"),". Eclipse OpenJ9 is not\nsupported, please make sure the ",(0,r.kt)("inlineCode",{parentName:"p"},"JAVA_HOME")," environment variable\npoints to a valid Java 8, 11 or 17 installation."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"macOS, Linux or Windows"),". Metals is developed on many operating systems and\nevery PR is tested on Ubuntu, Windows and MacOS."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Scala 2.13, 2.12, 2.11 and Scala 3"),". Metals supports these Scala versions:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"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")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"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")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Scala 2.11"),":\n2.11.12")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"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"))),(0,r.kt)("p",null,"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"),(0,r.kt)("h2",{id:"nvim-metals"},"nvim-metals"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/scalameta/nvim-metals"},(0,r.kt)("inlineCode",{parentName:"a"},"nvim-metals"))," Is the the dedicated\nMetals extension for the ",(0,r.kt)("a",{parentName:"p",href:"https://neovim.io/doc/user/lsp.html"},"built-in LSP\nsupport")," in Neovim."),(0,r.kt)("p",null,"To get started with installation please see the ",(0,r.kt)("inlineCode",{parentName:"p"},"nvim-metals"),"\n",(0,r.kt)("a",{parentName:"p",href:"https://github.com/scalameta/nvim-metals#prerequisites"},"prerequisites")," and\n",(0,r.kt)("a",{parentName:"p",href:"https://github.com/scalameta/nvim-metals#installation"},"installation steps"),"."),(0,r.kt)("table",null,(0,r.kt)("thead",null,(0,r.kt)("tr",null,(0,r.kt)("th",null,"Version"),(0,r.kt)("th",null,"Published"))),(0,r.kt)("tbody",null,(0,r.kt)("tr",null,(0,r.kt)("td",null,"1.0.1"),(0,r.kt)("td",null,"28 Aug 2023 14:46")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"1.0.1+66-8f590ee4-SNAPSHOT"),(0,r.kt)("td",null,"01 Oct 2023 20:35")))),(0,r.kt)("p",null,"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,r.kt)("a",{parentName:"p",href:"https://github.com/scalameta/nvim-metals/discussions/39"},"example\nconfiguration"),"."),(0,r.kt)("p",null,"For a guide on all the available features in ",(0,r.kt)("inlineCode",{parentName:"p"},"nvim-metals"),", refer to the\n",(0,r.kt)("a",{parentName:"p",href:"https://github.com/scalameta/nvim-metals/discussions/279"},"features list"),"."),(0,r.kt)("h2",{id:"vim-alternatives"},"Vim alternatives"),(0,r.kt)("p",null,"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,r.kt)("a",{parentName:"p",href:"https://github.com/scalameta/coc-metals"},(0,r.kt)("inlineCode",{parentName:"a"},"coc-metals")),", but it doesn't work\nwith the newest versions of Metals and is currently ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/scalameta/coc-metals/issues/460"},"deprecated and\nunmaintained"),"."),(0,r.kt)("h3",{id:"using-an-alternative-lsp-client"},"Using an alternative LSP Client"),(0,r.kt)("p",null,"There are multiple other LSP clients that work with Vim. Here are a few:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://github.com/natebosch/vim-lsc/"},(0,r.kt)("inlineCode",{parentName:"a"},"natebosch/vim-lsc")),": simple installation and written in Vimscript."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://github.com/prabirshrestha/vim-lsp"},(0,r.kt)("inlineCode",{parentName:"a"},"vim-lsp")),": simple installation and written in\nVimscript."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://github.com/yegappan/lsp"},(0,r.kt)("inlineCode",{parentName:"a"},"yegappan/lsp")),": Very new and targeting\nVim9.")),(0,r.kt)("p",null,"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."),(0,r.kt)("p",null,"There are two ways to install Metals yourself in order to work with an\nalternative client."),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Most easily is to just use ",(0,r.kt)("a",{parentName:"li",href:"https://get-coursier.io/"},"Coursier")," to do a ",(0,r.kt)("inlineCode",{parentName:"li"},"cs\ninstall metals"),"."),(0,r.kt)("li",{parentName:"ol"},"Generating a Metals binary yourself.")),(0,r.kt)("h2",{id:"files-and-directories-to-include-in-your-gitignore"},"Files and Directories to include in your Gitignore"),(0,r.kt)("p",null,"The Metals server places logs and other files in the ",(0,r.kt)("inlineCode",{parentName:"p"},".metals")," directory. The\nBloop compile server places logs and compilation artifacts in the ",(0,r.kt)("inlineCode",{parentName:"p"},".bloop"),"\ndirectory. The Bloop plugin that generates Bloop configuration is added in the\n",(0,r.kt)("inlineCode",{parentName:"p"},"metals.sbt")," file, which is added at ",(0,r.kt)("inlineCode",{parentName:"p"},"project/metals.sbt")," as well as further\n",(0,r.kt)("inlineCode",{parentName:"p"},"project")," directories depending on how deep ",(0,r.kt)("inlineCode",{parentName:"p"},"*.sbt")," files need to be supported.\nTo support each ",(0,r.kt)("inlineCode",{parentName:"p"},"*.sbt")," file Metals needs to create an additional file at\n",(0,r.kt)("inlineCode",{parentName:"p"},"./project/project/metals.sbt")," relative to the sbt file.\nWorking with Ammonite scripts will place compiled scripts into the ",(0,r.kt)("inlineCode",{parentName:"p"},".ammonite")," directory.\nIt's recommended to exclude these directories and files\nfrom version control systems like git."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"# ~/.gitignore\n.metals/\n.bloop/\n.ammonite/\nmetals.sbt\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"coursier bootstrap org.scalameta:metals_2.13:1.0.1 -o metals -f\n")),(0,r.kt)("p",null,"(optional) It's recommended to enable JVM string de-duplication and provide a\ngenerous stack size and memory options."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"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.0.1 -o metals -f\n")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"-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,r.kt)("inlineCode",{parentName:"p"},"InitializationOptions"),". You can read more about his\n",(0,r.kt)("a",{parentName:"p",href:"https://scalameta.org/metals/blog/2020/07/23/configuring-a-client#initializationoptions"},"here"),"."),(0,r.kt)("h2",{id:"running-scalafix-rules"},"Running scalafix rules"),(0,r.kt)("p",null,"Scalafix allows users to specify some refactoring and linting rules that can be applied to your\ncodebase. Please checkout the ",(0,r.kt)("a",{parentName:"p",href:"https://scalacenter.github.io/scalafix"},"scalafix website")," for more information."),(0,r.kt)("p",null,"Since Metals v0.11.7 it's now possible to run scalafix rules using a special\ncommand ",(0,r.kt)("inlineCode",{parentName:"p"},"metals.scalafix-run"),".\nThis should run all the rules defined in your ",(0,r.kt)("inlineCode",{parentName:"p"},".scalafix.conf")," file. All built-in rules\nand the ",(0,r.kt)("a",{parentName:"p",href:"https://scalacenter.github.io/scalafix/docs/rules/community-rules.html#hygiene-rules"},"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,r.kt)("inlineCode",{parentName:"p"},"metals.scalafixRulesDependencies")," user setting.\nThose rules need to be in form of strings such as ",(0,r.kt)("inlineCode",{parentName:"p"},"com.github.liancheng::organize-imports:0.6.0"),", which\nfollows the same convention as ",(0,r.kt)("a",{parentName:"p",href:"https://get-coursier.io/"},"coursier dependencies"),"."),(0,r.kt)("p",null,"A sample scalafix configuration can be seen below:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-hocon"},'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')),(0,r.kt)("h2",{id:"getting-help"},"Getting help"),(0,r.kt)("p",null,"There is an active community using Vim and Metals. Apart from ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/scalameta/nvim-metals/issues/new/choose"},"creating an\nissue")," or ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/scalameta/nvim-metals/discussions"},"starting\na discussion")," for\n",(0,r.kt)("inlineCode",{parentName:"p"},"nvim-metals")," users, you can also ask questions in our ",(0,r.kt)("inlineCode",{parentName:"p"},"#vim-users")," ",(0,r.kt)("a",{parentName:"p",href:"https://discord.gg/FaVDrJegEh"},"Discord\nChannel")," or ",(0,r.kt)("a",{parentName:"p",href:"https://matrix.to/#/#scalameta:vim-users"},"Matrix\nBridge"),"."))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/8a0b8ece.2999e3c0.js b/assets/js/8a0b8ece.2c3cdff9.js similarity index 99% rename from assets/js/8a0b8ece.2999e3c0.js rename to assets/js/8a0b8ece.2c3cdff9.js index dd4173e7b0c..2b8d29cd847 100644 --- a/assets/js/8a0b8ece.2999e3c0.js +++ b/assets/js/8a0b8ece.2c3cdff9.js @@ -1 +1 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4782],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>k});var a=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},m=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,l=e.originalType,s=e.parentName,m=r(e,["components","mdxType","originalType","parentName"]),u=p(n),d=i,k=u["".concat(s,".").concat(d)]||u[d]||c[d]||l;return n?a.createElement(k,o(o({ref:t},m),{},{components:n})):a.createElement(k,o({ref:t},m))}));function k(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var l=n.length,o=new Array(l);o[0]=d;var r={};for(var s in t)hasOwnProperty.call(t,s)&&(r[s]=t[s]);r.originalType=e,r[u]="string"==typeof e?e:i,o[1]=r;for(var p=2;p{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>s,default:()=>k,frontMatter:()=>r,metadata:()=>p,toc:()=>u});var a=n(7462),i=n(3366),l=(n(7294),n(3905)),o=["components"],r={id:"sublime",title:"Sublime Text"},s=void 0,p={unversionedId:"editors/sublime",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,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"}},m={},u=[{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}],c={toc:u},d="wrapper";function k(e){var t=e.components,n=(0,i.Z)(e,o);return(0,l.kt)(d,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Metals works with Sublime Text (build 4000 or later) thanks to the\n",(0,l.kt)("a",{parentName:"p",href:"https://github.com/sublimelsp/LSP"},"sublimelsp/LSP")," and ",(0,l.kt)("a",{parentName:"p",href:"https://github.com/scalameta/metals-sublime"},"scalameta/metals-sublime")," plugins."),(0,l.kt)("p",null,(0,l.kt)("img",{parentName:"p",src:"https://i.imgur.com/vJKP0T3.gif",alt:"Sublime Text demo"})),(0,l.kt)("h2",{id:"requirements"},"Requirements"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Java 8, 11, 17 provided by OpenJDK or Oracle"),". Eclipse OpenJ9 is not\nsupported, please make sure the ",(0,l.kt)("inlineCode",{parentName:"p"},"JAVA_HOME")," environment variable\npoints to a valid Java 8, 11 or 17 installation."),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"macOS, Linux or Windows"),". Metals is developed on many operating systems and\nevery PR is tested on Ubuntu, Windows and MacOS."),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Scala 2.13, 2.12, 2.11 and Scala 3"),". Metals supports these Scala versions:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("p",{parentName:"li"},(0,l.kt)("strong",{parentName:"p"},"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")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("p",{parentName:"li"},(0,l.kt)("strong",{parentName:"p"},"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")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("p",{parentName:"li"},(0,l.kt)("strong",{parentName:"p"},"Scala 2.11"),":\n2.11.12")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("p",{parentName:"li"},(0,l.kt)("strong",{parentName:"p"},"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"))),(0,l.kt)("p",null,"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"),(0,l.kt)("h2",{id:"installing-the-plugins"},"Installing the plugins"),(0,l.kt)("p",null,"Install the following packages:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("p",{parentName:"li"},(0,l.kt)("a",{parentName:"p",href:"https://github.com/sublimelsp/LSP"},"sublimelsp/LSP"),": Language Server Protocol support for Sublime Text.",(0,l.kt)("br",{parentName:"p"}),"\n",(0,l.kt)("inlineCode",{parentName:"p"},"Command Palette (Cmd + Shift + P) > Install package > LSP"))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("p",{parentName:"li"},(0,l.kt)("a",{parentName:"p",href:"https://github.com/scalameta/metals-sublime"},"scalameta/metals-sublime"),": For automatic installation of metals and custom commands.\n",(0,l.kt)("inlineCode",{parentName:"p"},"Command Palette (Cmd + Shift + P) > Install package > LSP-metals")))),(0,l.kt)("p",null,"Finally restart sublime text."),(0,l.kt)("p",null,'Next, open "Preferences > Key Binding" and register ',(0,l.kt)("inlineCode",{parentName:"p"},"F12")," to trigger goto\ndefinition."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'[\n // ...\n {\n "keys": ["f12"],\n "command": "lsp_symbol_definition"\n }\n]\n')),(0,l.kt)("h2",{id:"importing-a-build"},"Importing a build"),(0,l.kt)("p",null,(0,l.kt)("img",{parentName:"p",src:"https://i.imgur.com/eUk30Zy.png",alt:"Build Import"})),(0,l.kt)("p",null,"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,l.kt)("a",{parentName:"p",href:"https://scalameta.org/metals/docs/build-tools/overview.html"},"supported build tools"),'. Click "Import build" to start the installation step.'),(0,l.kt)("p",null,"This starts the Metal language server but no functionality will work yet because the\nbuild has not been imported. "),(0,l.kt)("p",null,"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."),(0,l.kt)("h2",{id:"server-logs"},"Server logs"),(0,l.kt)("p",null,"For more detailed information about what is happening behind the scenes during\n",(0,l.kt)("inlineCode",{parentName:"p"},"sbt bloopInstall")," run ",(0,l.kt)("inlineCode",{parentName:"p"},"lsp toggle server panel")," in the command palette. You can optionally add key binding for this command."),(0,l.kt)("p",null,(0,l.kt)("img",{parentName:"p",src:"https://i.imgur.com/PilER2E.png",alt:"Server logs"})),(0,l.kt)("p",null,"Once the import step completes, compilation starts for your open ",(0,l.kt)("inlineCode",{parentName:"p"},"*.scala"),'\nfiles. Once the sources have compiled successfully, you can navigate the\nsources with "Goto definition" by pressing ',(0,l.kt)("inlineCode",{parentName:"p"},"F12"),"."),(0,l.kt)("h2",{id:"find-symbol-references"},"Find symbol references"),(0,l.kt)("p",null,"The default key binding is ",(0,l.kt)("inlineCode",{parentName:"p"},"shift+F12"),". If you use vim-bindings, you need to be\nin insert-mode."),(0,l.kt)("p",null,(0,l.kt)("img",{parentName:"p",src:"https://i.imgur.com/BJDkczD.gif",alt:"Find references"})),(0,l.kt)("h2",{id:"goto-symbol-in-workspace"},"Goto symbol in workspace"),(0,l.kt)("p",null,"You can search for symbols in your dependency source using the command palette."),(0,l.kt)("p",null,(0,l.kt)("img",{parentName:"p",src:"https://i.imgur.com/8X0XNi2.gif",alt:"workspace symbols"})),(0,l.kt)("h2",{id:"manually-trigger-build-import"},"Manually trigger build import"),(0,l.kt)("p",null,(0,l.kt)("img",{parentName:"p",src:"https://i.imgur.com/LViPc95.png",alt:"Import build command"})),(0,l.kt)("p",null,"You can optionally register a key binding for the command."),(0,l.kt)("h2",{id:"tweaking-sublime-text-for-a-better-productivity"},"Tweaking Sublime Text for a better productivity"),(0,l.kt)("p",null,"This paragraph contains a few tips & trick that can improve your daily productivity with Metals."),(0,l.kt)("h3",{id:"optional-lsp-client-tweaks"},"Optional LSP client tweaks"),(0,l.kt)("p",null,'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":'),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n // ...\n "only_show_lsp_completions": true,\n}\n')),(0,l.kt)("p",null,'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":'),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n // ...\n "show_references_in_quick_panel": true,\n}\n')),(0,l.kt)("p",null,(0,l.kt)("img",{parentName:"p",src:"https://i.imgur.com/7tSiEfX.gif",alt:"Symbol references in the popup"})),(0,l.kt)("h3",{id:"additional-key-mappings"},"Additional key mappings"),(0,l.kt)("p",null,"You can set a few optional key mappings for enable useful action shortcuts and perform some tweaks for the completion popup."),(0,l.kt)("h4",{id:"keymapping-for-formatting-document-via-scalafmt"},"Keymapping for formatting document via scalafmt"),(0,l.kt)("p",null,'Open "Preferences > Key Binding" and register ',(0,l.kt)("inlineCode",{parentName:"p"},"ctrl+alt+l")," to trigger formatting document.\ndefinition."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'[\n // ...\n {\n "keys": ["ctrl+alt+l"],\n "command": "lsp_format_document"\n }\n]\n')),(0,l.kt)("p",null,(0,l.kt)("img",{parentName:"p",src:"https://i.imgur.com/wVjC1Ij.gif",alt:"Add key mapping for formatting document via scalafmt"})),(0,l.kt)("h3",{id:"add-key-mapping-for-goto-symbol-in-workspace"},"Add key mapping for Goto symbol in workspace"),(0,l.kt)("p",null,'This an optional step if you want to have a shortcut for looking up symbols in the workspace.\nOpen "Preferences > Key Binding" and add:'),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'[\n // ...\n { \n "keys": ["ctrl+t"], \n "command": "show_overlay",\n "args": {"overlay": "command_palette", "command": "lsp_workspace_symbols" }\n }\n]\n')),(0,l.kt)("h3",{id:"enabling-auto-import-on-completion"},"Enabling auto-import on completion"),(0,l.kt)("p",null,'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:'),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'[ \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')),(0,l.kt)("p",null,(0,l.kt)("img",{parentName:"p",src:"https://i.imgur.com/RDYx9mB.gif",alt:"Import after Enter key was hit"})),(0,l.kt)("h2",{id:"using-latest-metals-snapshot"},"Using latest Metals SNAPSHOT"),(0,l.kt)("p",null,'Update the "server_version" setting to try out the latest pending Metals\nfeatures by accessing ',(0,l.kt)("inlineCode",{parentName:"p"},"Preferences > Package Settings > LSP > Servers > LSP-metals")),(0,l.kt)("table",null,(0,l.kt)("thead",null,(0,l.kt)("tr",null,(0,l.kt)("th",null,"Version"),(0,l.kt)("th",null,"Published"))),(0,l.kt)("tbody",null,(0,l.kt)("tr",null,(0,l.kt)("td",null,"1.0.1"),(0,l.kt)("td",null,"28 Aug 2023 14:46")),(0,l.kt)("tr",null,(0,l.kt)("td",null,"1.0.1+65-45cbb9eb-SNAPSHOT"),(0,l.kt)("td",null,"01 Oct 2023 19:50")))),(0,l.kt)("h2",{id:"files-and-directories-to-include-in-your-gitignore"},"Files and Directories to include in your Gitignore"),(0,l.kt)("p",null,"The Metals server places logs and other files in the ",(0,l.kt)("inlineCode",{parentName:"p"},".metals")," directory. The\nBloop compile server places logs and compilation artifacts in the ",(0,l.kt)("inlineCode",{parentName:"p"},".bloop"),"\ndirectory. The Bloop plugin that generates Bloop configuration is added in the\n",(0,l.kt)("inlineCode",{parentName:"p"},"metals.sbt")," file, which is added at ",(0,l.kt)("inlineCode",{parentName:"p"},"project/metals.sbt")," as well as further\n",(0,l.kt)("inlineCode",{parentName:"p"},"project")," directories depending on how deep ",(0,l.kt)("inlineCode",{parentName:"p"},"*.sbt")," files need to be supported.\nTo support each ",(0,l.kt)("inlineCode",{parentName:"p"},"*.sbt")," file Metals needs to create an additional file at\n",(0,l.kt)("inlineCode",{parentName:"p"},"./project/project/metals.sbt")," relative to the sbt file.\nWorking with Ammonite scripts will place compiled scripts into the ",(0,l.kt)("inlineCode",{parentName:"p"},".ammonite")," directory.\nIt's recommended to exclude these directories and files\nfrom version control systems like git."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-sh"},"# ~/.gitignore\n.metals/\n.bloop/\n.ammonite/\nmetals.sbt\n")),(0,l.kt)("h2",{id:"worksheets"},"Worksheets"),(0,l.kt)("p",null,"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,l.kt)("a",{parentName:"p",href:"https://scalameta.org/mdoc/"},"mdoc"),"."),(0,l.kt)("h3",{id:"getting-started-with-worksheets"},"Getting started with Worksheets"),(0,l.kt)("p",null,"To get started with a worksheet you can either use the ",(0,l.kt)("inlineCode",{parentName:"p"},"metals.new-scala-file"),"\ncommand and select ",(0,l.kt)("em",{parentName:"p"},"Worksheet")," or create a file called ",(0,l.kt)("inlineCode",{parentName:"p"},"*.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 ",(0,l.kt)("inlineCode",{parentName:"p"},"src"),"\ndirectory. You can still create a worksheet in other places, but you will\nonly have access to the standard library and your dependencies."),(0,l.kt)("h3",{id:"evaluations"},"Evaluations"),(0,l.kt)("p",null,"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."),(0,l.kt)("p",null,"Keep in mind that you don't need to wrap your code in an ",(0,l.kt)("inlineCode",{parentName:"p"},"object"),". In worksheets\neverything can be evaluated at the top level."),(0,l.kt)("h3",{id:"using-dependencies-in-worksheets"},"Using dependencies in worksheets"),(0,l.kt)("p",null,"You are able to include an external dependency in your worksheet by including\nit in one of the following two ways."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},"// $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")),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"::")," is the same as ",(0,l.kt)("inlineCode",{parentName:"p"},"%%")," in sbt, which will append the current Scala binary version\nto the artifact name."),(0,l.kt)("p",null,"You can also import ",(0,l.kt)("inlineCode",{parentName:"p"},"scalac")," options in a special ",(0,l.kt)("inlineCode",{parentName:"p"},"$scalac")," import like below:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},"import $scalac.`-Ywarn-unused`\n")),(0,l.kt)("h3",{id:"troubleshooting"},"Troubleshooting"),(0,l.kt)("p",null,"Since worksheets are not standard Scala files, you may run into issues with some constructs.\nFor example, you may see an error like this:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"value classes may not be a member of another class - mdoc\n")),(0,l.kt)("p",null,"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."),(0,l.kt)("h2",{id:"running-scalafix-rules"},"Running scalafix rules"),(0,l.kt)("p",null,"Scalafix allows users to specify some refactoring and linting rules that can be applied to your\ncodebase. Please checkout the ",(0,l.kt)("a",{parentName:"p",href:"https://scalacenter.github.io/scalafix"},"scalafix website")," for more information."),(0,l.kt)("p",null,"Since Metals v0.11.7 it's now possible to run scalafix rules using a special\ncommand ",(0,l.kt)("inlineCode",{parentName:"p"},"metals.scalafix-run"),".\nThis should run all the rules defined in your ",(0,l.kt)("inlineCode",{parentName:"p"},".scalafix.conf")," file. All built-in rules\nand the ",(0,l.kt)("a",{parentName:"p",href:"https://scalacenter.github.io/scalafix/docs/rules/community-rules.html#hygiene-rules"},"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,l.kt)("inlineCode",{parentName:"p"},"metals.scalafixRulesDependencies")," user setting.\nThose rules need to be in form of strings such as ",(0,l.kt)("inlineCode",{parentName:"p"},"com.github.liancheng::organize-imports:0.6.0"),", which\nfollows the same convention as ",(0,l.kt)("a",{parentName:"p",href:"https://get-coursier.io/"},"coursier dependencies"),"."),(0,l.kt)("p",null,"A sample scalafix configuration can be seen below:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-hocon"},'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')))}k.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4782],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>k});var a=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},m=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,l=e.originalType,s=e.parentName,m=r(e,["components","mdxType","originalType","parentName"]),u=p(n),d=i,k=u["".concat(s,".").concat(d)]||u[d]||c[d]||l;return n?a.createElement(k,o(o({ref:t},m),{},{components:n})):a.createElement(k,o({ref:t},m))}));function k(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var l=n.length,o=new Array(l);o[0]=d;var r={};for(var s in t)hasOwnProperty.call(t,s)&&(r[s]=t[s]);r.originalType=e,r[u]="string"==typeof e?e:i,o[1]=r;for(var p=2;p{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>s,default:()=>k,frontMatter:()=>r,metadata:()=>p,toc:()=>u});var a=n(7462),i=n(3366),l=(n(7294),n(3905)),o=["components"],r={id:"sublime",title:"Sublime Text"},s=void 0,p={unversionedId:"editors/sublime",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,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"}},m={},u=[{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}],c={toc:u},d="wrapper";function k(e){var t=e.components,n=(0,i.Z)(e,o);return(0,l.kt)(d,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Metals works with Sublime Text (build 4000 or later) thanks to the\n",(0,l.kt)("a",{parentName:"p",href:"https://github.com/sublimelsp/LSP"},"sublimelsp/LSP")," and ",(0,l.kt)("a",{parentName:"p",href:"https://github.com/scalameta/metals-sublime"},"scalameta/metals-sublime")," plugins."),(0,l.kt)("p",null,(0,l.kt)("img",{parentName:"p",src:"https://i.imgur.com/vJKP0T3.gif",alt:"Sublime Text demo"})),(0,l.kt)("h2",{id:"requirements"},"Requirements"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Java 8, 11, 17 provided by OpenJDK or Oracle"),". Eclipse OpenJ9 is not\nsupported, please make sure the ",(0,l.kt)("inlineCode",{parentName:"p"},"JAVA_HOME")," environment variable\npoints to a valid Java 8, 11 or 17 installation."),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"macOS, Linux or Windows"),". Metals is developed on many operating systems and\nevery PR is tested on Ubuntu, Windows and MacOS."),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Scala 2.13, 2.12, 2.11 and Scala 3"),". Metals supports these Scala versions:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("p",{parentName:"li"},(0,l.kt)("strong",{parentName:"p"},"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")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("p",{parentName:"li"},(0,l.kt)("strong",{parentName:"p"},"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")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("p",{parentName:"li"},(0,l.kt)("strong",{parentName:"p"},"Scala 2.11"),":\n2.11.12")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("p",{parentName:"li"},(0,l.kt)("strong",{parentName:"p"},"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"))),(0,l.kt)("p",null,"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"),(0,l.kt)("h2",{id:"installing-the-plugins"},"Installing the plugins"),(0,l.kt)("p",null,"Install the following packages:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("p",{parentName:"li"},(0,l.kt)("a",{parentName:"p",href:"https://github.com/sublimelsp/LSP"},"sublimelsp/LSP"),": Language Server Protocol support for Sublime Text.",(0,l.kt)("br",{parentName:"p"}),"\n",(0,l.kt)("inlineCode",{parentName:"p"},"Command Palette (Cmd + Shift + P) > Install package > LSP"))),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("p",{parentName:"li"},(0,l.kt)("a",{parentName:"p",href:"https://github.com/scalameta/metals-sublime"},"scalameta/metals-sublime"),": For automatic installation of metals and custom commands.\n",(0,l.kt)("inlineCode",{parentName:"p"},"Command Palette (Cmd + Shift + P) > Install package > LSP-metals")))),(0,l.kt)("p",null,"Finally restart sublime text."),(0,l.kt)("p",null,'Next, open "Preferences > Key Binding" and register ',(0,l.kt)("inlineCode",{parentName:"p"},"F12")," to trigger goto\ndefinition."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'[\n // ...\n {\n "keys": ["f12"],\n "command": "lsp_symbol_definition"\n }\n]\n')),(0,l.kt)("h2",{id:"importing-a-build"},"Importing a build"),(0,l.kt)("p",null,(0,l.kt)("img",{parentName:"p",src:"https://i.imgur.com/eUk30Zy.png",alt:"Build Import"})),(0,l.kt)("p",null,"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,l.kt)("a",{parentName:"p",href:"https://scalameta.org/metals/docs/build-tools/overview.html"},"supported build tools"),'. Click "Import build" to start the installation step.'),(0,l.kt)("p",null,"This starts the Metal language server but no functionality will work yet because the\nbuild has not been imported. "),(0,l.kt)("p",null,"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."),(0,l.kt)("h2",{id:"server-logs"},"Server logs"),(0,l.kt)("p",null,"For more detailed information about what is happening behind the scenes during\n",(0,l.kt)("inlineCode",{parentName:"p"},"sbt bloopInstall")," run ",(0,l.kt)("inlineCode",{parentName:"p"},"lsp toggle server panel")," in the command palette. You can optionally add key binding for this command."),(0,l.kt)("p",null,(0,l.kt)("img",{parentName:"p",src:"https://i.imgur.com/PilER2E.png",alt:"Server logs"})),(0,l.kt)("p",null,"Once the import step completes, compilation starts for your open ",(0,l.kt)("inlineCode",{parentName:"p"},"*.scala"),'\nfiles. Once the sources have compiled successfully, you can navigate the\nsources with "Goto definition" by pressing ',(0,l.kt)("inlineCode",{parentName:"p"},"F12"),"."),(0,l.kt)("h2",{id:"find-symbol-references"},"Find symbol references"),(0,l.kt)("p",null,"The default key binding is ",(0,l.kt)("inlineCode",{parentName:"p"},"shift+F12"),". If you use vim-bindings, you need to be\nin insert-mode."),(0,l.kt)("p",null,(0,l.kt)("img",{parentName:"p",src:"https://i.imgur.com/BJDkczD.gif",alt:"Find references"})),(0,l.kt)("h2",{id:"goto-symbol-in-workspace"},"Goto symbol in workspace"),(0,l.kt)("p",null,"You can search for symbols in your dependency source using the command palette."),(0,l.kt)("p",null,(0,l.kt)("img",{parentName:"p",src:"https://i.imgur.com/8X0XNi2.gif",alt:"workspace symbols"})),(0,l.kt)("h2",{id:"manually-trigger-build-import"},"Manually trigger build import"),(0,l.kt)("p",null,(0,l.kt)("img",{parentName:"p",src:"https://i.imgur.com/LViPc95.png",alt:"Import build command"})),(0,l.kt)("p",null,"You can optionally register a key binding for the command."),(0,l.kt)("h2",{id:"tweaking-sublime-text-for-a-better-productivity"},"Tweaking Sublime Text for a better productivity"),(0,l.kt)("p",null,"This paragraph contains a few tips & trick that can improve your daily productivity with Metals."),(0,l.kt)("h3",{id:"optional-lsp-client-tweaks"},"Optional LSP client tweaks"),(0,l.kt)("p",null,'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":'),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n // ...\n "only_show_lsp_completions": true,\n}\n')),(0,l.kt)("p",null,'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":'),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n // ...\n "show_references_in_quick_panel": true,\n}\n')),(0,l.kt)("p",null,(0,l.kt)("img",{parentName:"p",src:"https://i.imgur.com/7tSiEfX.gif",alt:"Symbol references in the popup"})),(0,l.kt)("h3",{id:"additional-key-mappings"},"Additional key mappings"),(0,l.kt)("p",null,"You can set a few optional key mappings for enable useful action shortcuts and perform some tweaks for the completion popup."),(0,l.kt)("h4",{id:"keymapping-for-formatting-document-via-scalafmt"},"Keymapping for formatting document via scalafmt"),(0,l.kt)("p",null,'Open "Preferences > Key Binding" and register ',(0,l.kt)("inlineCode",{parentName:"p"},"ctrl+alt+l")," to trigger formatting document.\ndefinition."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'[\n // ...\n {\n "keys": ["ctrl+alt+l"],\n "command": "lsp_format_document"\n }\n]\n')),(0,l.kt)("p",null,(0,l.kt)("img",{parentName:"p",src:"https://i.imgur.com/wVjC1Ij.gif",alt:"Add key mapping for formatting document via scalafmt"})),(0,l.kt)("h3",{id:"add-key-mapping-for-goto-symbol-in-workspace"},"Add key mapping for Goto symbol in workspace"),(0,l.kt)("p",null,'This an optional step if you want to have a shortcut for looking up symbols in the workspace.\nOpen "Preferences > Key Binding" and add:'),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'[\n // ...\n { \n "keys": ["ctrl+t"], \n "command": "show_overlay",\n "args": {"overlay": "command_palette", "command": "lsp_workspace_symbols" }\n }\n]\n')),(0,l.kt)("h3",{id:"enabling-auto-import-on-completion"},"Enabling auto-import on completion"),(0,l.kt)("p",null,'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:'),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'[ \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')),(0,l.kt)("p",null,(0,l.kt)("img",{parentName:"p",src:"https://i.imgur.com/RDYx9mB.gif",alt:"Import after Enter key was hit"})),(0,l.kt)("h2",{id:"using-latest-metals-snapshot"},"Using latest Metals SNAPSHOT"),(0,l.kt)("p",null,'Update the "server_version" setting to try out the latest pending Metals\nfeatures by accessing ',(0,l.kt)("inlineCode",{parentName:"p"},"Preferences > Package Settings > LSP > Servers > LSP-metals")),(0,l.kt)("table",null,(0,l.kt)("thead",null,(0,l.kt)("tr",null,(0,l.kt)("th",null,"Version"),(0,l.kt)("th",null,"Published"))),(0,l.kt)("tbody",null,(0,l.kt)("tr",null,(0,l.kt)("td",null,"1.0.1"),(0,l.kt)("td",null,"28 Aug 2023 14:46")),(0,l.kt)("tr",null,(0,l.kt)("td",null,"1.0.1+66-8f590ee4-SNAPSHOT"),(0,l.kt)("td",null,"01 Oct 2023 20:35")))),(0,l.kt)("h2",{id:"files-and-directories-to-include-in-your-gitignore"},"Files and Directories to include in your Gitignore"),(0,l.kt)("p",null,"The Metals server places logs and other files in the ",(0,l.kt)("inlineCode",{parentName:"p"},".metals")," directory. The\nBloop compile server places logs and compilation artifacts in the ",(0,l.kt)("inlineCode",{parentName:"p"},".bloop"),"\ndirectory. The Bloop plugin that generates Bloop configuration is added in the\n",(0,l.kt)("inlineCode",{parentName:"p"},"metals.sbt")," file, which is added at ",(0,l.kt)("inlineCode",{parentName:"p"},"project/metals.sbt")," as well as further\n",(0,l.kt)("inlineCode",{parentName:"p"},"project")," directories depending on how deep ",(0,l.kt)("inlineCode",{parentName:"p"},"*.sbt")," files need to be supported.\nTo support each ",(0,l.kt)("inlineCode",{parentName:"p"},"*.sbt")," file Metals needs to create an additional file at\n",(0,l.kt)("inlineCode",{parentName:"p"},"./project/project/metals.sbt")," relative to the sbt file.\nWorking with Ammonite scripts will place compiled scripts into the ",(0,l.kt)("inlineCode",{parentName:"p"},".ammonite")," directory.\nIt's recommended to exclude these directories and files\nfrom version control systems like git."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-sh"},"# ~/.gitignore\n.metals/\n.bloop/\n.ammonite/\nmetals.sbt\n")),(0,l.kt)("h2",{id:"worksheets"},"Worksheets"),(0,l.kt)("p",null,"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,l.kt)("a",{parentName:"p",href:"https://scalameta.org/mdoc/"},"mdoc"),"."),(0,l.kt)("h3",{id:"getting-started-with-worksheets"},"Getting started with Worksheets"),(0,l.kt)("p",null,"To get started with a worksheet you can either use the ",(0,l.kt)("inlineCode",{parentName:"p"},"metals.new-scala-file"),"\ncommand and select ",(0,l.kt)("em",{parentName:"p"},"Worksheet")," or create a file called ",(0,l.kt)("inlineCode",{parentName:"p"},"*.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 ",(0,l.kt)("inlineCode",{parentName:"p"},"src"),"\ndirectory. You can still create a worksheet in other places, but you will\nonly have access to the standard library and your dependencies."),(0,l.kt)("h3",{id:"evaluations"},"Evaluations"),(0,l.kt)("p",null,"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."),(0,l.kt)("p",null,"Keep in mind that you don't need to wrap your code in an ",(0,l.kt)("inlineCode",{parentName:"p"},"object"),". In worksheets\neverything can be evaluated at the top level."),(0,l.kt)("h3",{id:"using-dependencies-in-worksheets"},"Using dependencies in worksheets"),(0,l.kt)("p",null,"You are able to include an external dependency in your worksheet by including\nit in one of the following two ways."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},"// $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")),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"::")," is the same as ",(0,l.kt)("inlineCode",{parentName:"p"},"%%")," in sbt, which will append the current Scala binary version\nto the artifact name."),(0,l.kt)("p",null,"You can also import ",(0,l.kt)("inlineCode",{parentName:"p"},"scalac")," options in a special ",(0,l.kt)("inlineCode",{parentName:"p"},"$scalac")," import like below:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-scala"},"import $scalac.`-Ywarn-unused`\n")),(0,l.kt)("h3",{id:"troubleshooting"},"Troubleshooting"),(0,l.kt)("p",null,"Since worksheets are not standard Scala files, you may run into issues with some constructs.\nFor example, you may see an error like this:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"value classes may not be a member of another class - mdoc\n")),(0,l.kt)("p",null,"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."),(0,l.kt)("h2",{id:"running-scalafix-rules"},"Running scalafix rules"),(0,l.kt)("p",null,"Scalafix allows users to specify some refactoring and linting rules that can be applied to your\ncodebase. Please checkout the ",(0,l.kt)("a",{parentName:"p",href:"https://scalacenter.github.io/scalafix"},"scalafix website")," for more information."),(0,l.kt)("p",null,"Since Metals v0.11.7 it's now possible to run scalafix rules using a special\ncommand ",(0,l.kt)("inlineCode",{parentName:"p"},"metals.scalafix-run"),".\nThis should run all the rules defined in your ",(0,l.kt)("inlineCode",{parentName:"p"},".scalafix.conf")," file. All built-in rules\nand the ",(0,l.kt)("a",{parentName:"p",href:"https://scalacenter.github.io/scalafix/docs/rules/community-rules.html#hygiene-rules"},"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,l.kt)("inlineCode",{parentName:"p"},"metals.scalafixRulesDependencies")," user setting.\nThose rules need to be in form of strings such as ",(0,l.kt)("inlineCode",{parentName:"p"},"com.github.liancheng::organize-imports:0.6.0"),", which\nfollows the same convention as ",(0,l.kt)("a",{parentName:"p",href:"https://get-coursier.io/"},"coursier dependencies"),"."),(0,l.kt)("p",null,"A sample scalafix configuration can be seen below:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-hocon"},'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')))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/970a5f4e.596d9033.js b/assets/js/970a5f4e.d3f9e227.js similarity index 99% rename from assets/js/970a5f4e.596d9033.js rename to assets/js/970a5f4e.d3f9e227.js index 24635513284..5bd7130e44e 100644 --- a/assets/js/970a5f4e.596d9033.js +++ b/assets/js/970a5f4e.d3f9e227.js @@ -1 +1 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6561],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>h});var a=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},u=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),d=p(n),c=o,h=d["".concat(s,".").concat(c)]||d[c]||m[c]||i;return n?a.createElement(h,r(r({ref:t},u),{},{components:n})):a.createElement(h,r({ref:t},u))}));function h(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,r=new Array(i);r[0]=c;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:o,r[1]=l;for(var p=2;p{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>s,default:()=>h,frontMatter:()=>l,metadata:()=>p,toc:()=>d});var a=n(7462),o=n(3366),i=(n(7294),n(3905)),r=["components"],l={id:"vscode",sidebar_label:"VS Code",title:"Visual Studio Code"},s=void 0,p={unversionedId:"editors/vscode",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,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"}},u={},d=[{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}],m={toc:d},c="wrapper";function h(e){var t=e.components,n=(0,o.Z)(e,r);return(0,i.kt)(c,(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://user-images.githubusercontent.com/1408093/48776422-1f764f00-ecd0-11e8-96d1-170f2354d50e.gif",alt:"Goto Definition"})),(0,i.kt)("h2",{id:"requirements"},"Requirements"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Java 8, 11, 17 provided by OpenJDK or Oracle"),". Eclipse OpenJ9 is not\nsupported, please make sure the ",(0,i.kt)("inlineCode",{parentName:"p"},"JAVA_HOME")," environment variable\npoints to a valid Java 8, 11 or 17 installation."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"macOS, Linux or Windows"),". Metals is developed on many operating systems and\nevery PR is tested on Ubuntu, Windows and MacOS."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Scala 2.13, 2.12, 2.11 and Scala 3"),". Metals supports these Scala versions:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"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")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"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")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"Scala 2.11"),":\n2.11.12")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"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"))),(0,i.kt)("p",null,"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"),(0,i.kt)("h2",{id:"installation"},"Installation"),(0,i.kt)("p",null,"Install the Metals extension from the\n",(0,i.kt)("a",{parentName:"p",href:"https://marketplace.visualstudio.com/items?itemName=scalameta.metals"},"Marketplace")," by clicking on this badge ",(0,i.kt)("a",{parentName:"p",href:"vscode:extension/scalameta.metals"},(0,i.kt)("img",{parentName:"a",src:"https://img.shields.io/badge/metals-vscode-blue.png",alt:"Install Metals extension"}))," or via the VS Code editor:"),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://imgur.com/Qew0fNH.png",alt:"install stable version"})),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"Make sure to disable the extensions\n",(0,i.kt)("a",{parentName:"p",href:"https://marketplace.visualstudio.com/items?itemName=dragos.scala-lsp"},"Scala Language Server"),"\nand\n",(0,i.kt)("a",{parentName:"p",href:"https://marketplace.visualstudio.com/items?itemName=lightbend.vscode-sbt-scala"},"Scala (sbt)"),"\nif they are installed. The\n",(0,i.kt)("a",{parentName:"p",href:"https://marketplace.visualstudio.com/items?itemName=lampepfl.dotty"},"Dotty Language Server"),"\ndoes ",(0,i.kt)("strong",{parentName:"p"},"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,i.kt)("inlineCode",{parentName:"p"},"Dotty Language Server")," you need to\nfirst remove ",(0,i.kt)("inlineCode",{parentName:"p"},".dotty-ide-artifact")," before opening the workspace with Metals.")),(0,i.kt)("p",null,"Next, open a directory containing your Scala code. The extension activates when\nthe main directory contains ",(0,i.kt)("inlineCode",{parentName:"p"},"build.sbt")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"build.sc")," file, a Scala file is\nopened, which includes ",(0,i.kt)("inlineCode",{parentName:"p"},"*.sbt"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"*.scala")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"*.sc")," file, or a standard Scala\ndirectory structure ",(0,i.kt)("inlineCode",{parentName:"p"},"src/main/scala")," is detected."),(0,i.kt)("p",null,"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,i.kt)("a",{parentName:"p",href:"#SNAPSHOT"},"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,i.kt)("inlineCode",{parentName:"p"},"major.minor.PATCH")," versioning."),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://imgur.com/CzOTleE.png",alt:"Install the pre-release extension"})),(0,i.kt)("h2",{id:"importing-a-build"},"Importing a build"),(0,i.kt)("p",null,'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.'),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/0VqZWay.png",alt:"Import build"})),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},'"Not now" disables this prompt for 2 minutes.'),(0,i.kt)("li",{parentName:"ul"},'"Don\'t show again" disables this prompt forever, use ',(0,i.kt)("inlineCode",{parentName:"li"},"rm -rf .metals/")," to re-enable\nthe prompt."),(0,i.kt)("li",{parentName:"ul"},"Use ",(0,i.kt)("inlineCode",{parentName:"li"},"tail -f .metals/metals.log")," to watch the build import progress."),(0,i.kt)("li",{parentName:"ul"},"Behind the scenes, Metals uses ",(0,i.kt)("a",{parentName:"li",href:"https://scalacenter.github.io/bloop/"},"Bloop")," to\nimport sbt builds, but you don't need Bloop installed on your machine to run this step.")),(0,i.kt)("p",null,"Once the import step completes, compilation starts for your open ",(0,i.kt)("inlineCode",{parentName:"p"},"*.scala"),"\nfiles."),(0,i.kt)("p",null,"Once the sources have compiled successfully, you can navigate the codebase with\ngoto definition."),(0,i.kt)("h3",{id:"custom-sbt-launcher"},"Custom sbt launcher"),(0,i.kt)("p",null,"By default, Metals runs an embedded ",(0,i.kt)("inlineCode",{parentName:"p"},"sbt-launch.jar")," launcher that respects ",(0,i.kt)("inlineCode",{parentName:"p"},".sbtopts")," and ",(0,i.kt)("inlineCode",{parentName:"p"},".jvmopts"),".\nHowever, the environment variables ",(0,i.kt)("inlineCode",{parentName:"p"},"SBT_OPTS")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"JAVA_OPTS")," are not respected."),(0,i.kt)("p",null,'Update the "Sbt Script" setting to use a custom ',(0,i.kt)("inlineCode",{parentName:"p"},"sbt")," script instead of the\ndefault Metals launcher if you need further customizations like reading environment\nvariables."),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/NuwEBe4.png",alt:"Sbt Launcher"})),(0,i.kt)("h3",{id:"speeding-up-import"},"Speeding up import"),(0,i.kt)("p",null,'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.'),(0,i.kt)("p",null,"Consult the ",(0,i.kt)("a",{parentName:"p",href:"https://scalacenter.github.io/bloop/docs/build-tools/sbt#speeding-up-build-export"},"Bloop documentation"),"\nto learn how to speed up build import."),(0,i.kt)("h3",{id:"importing-changes"},"Importing changes"),(0,i.kt)("p",null,"When you change ",(0,i.kt)("inlineCode",{parentName:"p"},"build.sbt")," or sources under ",(0,i.kt)("inlineCode",{parentName:"p"},"project/"),", you will be prompted to\nre-import the build."),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/72kdZkL.png",alt:"Import sbt changes"})),(0,i.kt)("h3",{id:"manually-trigger-build-import"},"Manually trigger build import"),(0,i.kt)("p",null,'To manually trigger a build import, execute the "Import build" command through\nthe command palette (',(0,i.kt)("inlineCode",{parentName:"p"},"Cmd + Shift + P"),")."),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/QHLKt8u.png",alt:"Import build command"})),(0,i.kt)("h2",{id:"run-doctor"},"Run doctor"),(0,i.kt)("p",null,'Execute the "Run Doctor" through the command palette to troubleshoot potential\nconfiguration problems in your workspace.'),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/K02g0UM.png",alt:"Run doctor command"})),(0,i.kt)("h2",{id:"configure-java-version"},"Configure Java version"),(0,i.kt)("p",null,"The VS Code plugin uses by default the ",(0,i.kt)("inlineCode",{parentName:"p"},"JAVA_HOME")," environment variable (via\n",(0,i.kt)("a",{parentName:"p",href:"https://www.npmjs.com/package/locate-java-home"},(0,i.kt)("inlineCode",{parentName:"a"},"locate-java-home")),") to locate\nthe ",(0,i.kt)("inlineCode",{parentName:"p"},"java"),' executable. To override the default Java home location, update the\n"Java Home" variable in the settings menu.'),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/sKrPKk2.png",alt:"Java Home setting"})),(0,i.kt)("p",null,"If this setting is defined, the VS Code plugin uses the custom path instead of\nthe ",(0,i.kt)("inlineCode",{parentName:"p"},"JAVA_HOME")," environment variable."),(0,i.kt)("h3",{id:"macos"},"macOS"),(0,i.kt)("p",null,"To globally configure ",(0,i.kt)("inlineCode",{parentName:"p"},"$JAVA_HOME")," for all GUI applications, see\n",(0,i.kt)("a",{parentName:"p",href:"https://stackoverflow.com/questions/135688/setting-environment-variables-on-os-x"},"this Stackoverflow answer"),"."),(0,i.kt)("p",null,"If you prefer to manually configure Java home through VS Code, run the following\ncommand to copy the Java 8 home path."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-sh"},"/usr/libexec/java_home -v 1.8 | pbcopy\n")),(0,i.kt)("h2",{id:"custom-artifact-repositories-maven-or-ivy-resolvers"},"Custom artifact repositories (Maven or Ivy resolvers)"),(0,i.kt)("p",null,"Use the 'Custom Repositories' setting for the Metals VS Code extension to tell\n",(0,i.kt)("a",{parentName:"p",href:"https://get-coursier.io/docs/other-proxy"},"Coursier")," to try to download Metals\nartifacts from your private artifact repository."),(0,i.kt)("p",null,"Use ",(0,i.kt)("inlineCode",{parentName:"p"},".jvmopts")," to set sbt options\n(",(0,i.kt)("a",{parentName:"p",href:"https://www.scala-sbt.org/1.0/docs/Proxy-Repositories.html"},"https://www.scala-sbt.org/1.0/docs/Proxy-Repositories.html"),") for\n",(0,i.kt)("inlineCode",{parentName:"p"},"sbt bloopInstall")," which resolves library dependencies. You can also provide a\ncustom sbt script (see 'Custom sbt launcher')."),(0,i.kt)("h2",{id:"http-proxy"},"HTTP proxy"),(0,i.kt)("p",null,"Metals uses ",(0,i.kt)("a",{parentName:"p",href:"https://get-coursier.io/docs/other-proxy"},"Coursier")," to download\nartifacts from Maven Central. To use Metals behind an HTTP proxy, configure the\nsystem properties ",(0,i.kt)("inlineCode",{parentName:"p"},"-Dhttps.proxyHost=\u2026 -Dhttps.proxyPort=\u2026")," in one of the\nfollowing locations:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},".jvmopts")," file in the workspace directory."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"JAVA_OPTS")," environment variable, make sure to start ",(0,i.kt)("inlineCode",{parentName:"li"},"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."),(0,i.kt)("li",{parentName:"ul"},'"Server Properties" setting for the Metals VS Code extension, which can be\nconfigured per-workspace or per-user.')),(0,i.kt)("h2",{id:"using-latest-metals-snapshot"},"Using latest Metals ",(0,i.kt)("a",{name:"SNAPSHOT"},"SNAPSHOT")),(0,i.kt)("p",null,'Update the "Server Version" setting to try out the latest pending Metals\nfeatures.'),(0,i.kt)("table",null,(0,i.kt)("thead",null,(0,i.kt)("tr",null,(0,i.kt)("th",null,"Version"),(0,i.kt)("th",null,"Published"))),(0,i.kt)("tbody",null,(0,i.kt)("tr",null,(0,i.kt)("td",null,"1.0.1"),(0,i.kt)("td",null,"28 Aug 2023 14:46")),(0,i.kt)("tr",null,(0,i.kt)("td",null,"1.0.1+65-45cbb9eb-SNAPSHOT"),(0,i.kt)("td",null,"01 Oct 2023 19:50")))),'Run the "Reload Window" command after updating the setting for the new version to take effect.',(0,i.kt)("h2",{id:"files-and-directories-to-include-in-your-gitignore"},"Files and Directories to include in your Gitignore"),(0,i.kt)("p",null,"The Metals server places logs and other files in the ",(0,i.kt)("inlineCode",{parentName:"p"},".metals")," directory. The\nBloop compile server places logs and compilation artifacts in the ",(0,i.kt)("inlineCode",{parentName:"p"},".bloop"),"\ndirectory. The Bloop plugin that generates Bloop configuration is added in the\n",(0,i.kt)("inlineCode",{parentName:"p"},"metals.sbt")," file, which is added at ",(0,i.kt)("inlineCode",{parentName:"p"},"project/metals.sbt")," as well as further\n",(0,i.kt)("inlineCode",{parentName:"p"},"project")," directories depending on how deep ",(0,i.kt)("inlineCode",{parentName:"p"},"*.sbt")," files need to be supported.\nTo support each ",(0,i.kt)("inlineCode",{parentName:"p"},"*.sbt")," file Metals needs to create an additional file at\n",(0,i.kt)("inlineCode",{parentName:"p"},"./project/project/metals.sbt")," relative to the sbt file.\nWorking with Ammonite scripts will place compiled scripts into the ",(0,i.kt)("inlineCode",{parentName:"p"},".ammonite")," directory.\nIt's recommended to exclude these directories and files\nfrom version control systems like git."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-sh"},"# ~/.gitignore\n.metals/\n.bloop/\n.ammonite/\nmetals.sbt\n")),(0,i.kt)("h2",{id:"show-document-symbols"},"Show document symbols"),(0,i.kt)("p",null,'Run the "Explorer: Focus on Outline View" command to open the symbol outline for\nthe current file in the sidebar.'),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/T0kVJsr.gif",alt:"Document Symbols Outline"})),(0,i.kt)("p",null,'Run the "Open Symbol in File" command to search for a symbol in the current file\nwithout opening the sidebar.'),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/0PJ4brd.png",alt:"Document Symbols Command"})),(0,i.kt)("p",null,"As you type, the symbol outline is also visible at the top of the file.\n",(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/L217n4q.png",alt:"Document Symbols Outline"})),(0,i.kt)("h2",{id:"go-to-parent-code-lenses"},"Go to parent code lenses"),(0,i.kt)("p",null,"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."),(0,i.kt)("p",null,"To enable the feature you need to modify the setting ",(0,i.kt)("inlineCode",{parentName:"p"},"metals.superMethodLensesEnabled")," to ",(0,i.kt)("inlineCode",{parentName:"p"},"true"),"."),(0,i.kt)("p",null,"Even without using the code lenses it's still possible to navigate the method hierarchy\nusing two commands:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"Metals: Go to super method")," - immediately goes to the parent of the method the cursor is pointing to")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"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."))),(0,i.kt)("p",null,"You can also bind those commands to a shortcut."),(0,i.kt)("h2",{id:"create-new-project-from-template"},"Create new project from template"),(0,i.kt)("p",null,"It is possible using Metals to easily setup a new project using the exiting ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/foundweekends/giter8/wiki/giter8-templates"},"giter8")," templates.\nThis is an equivalent to the ",(0,i.kt)("inlineCode",{parentName:"p"},"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:"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"Choose the template and then:"),(0,i.kt)("ol",{parentName:"li"},(0,i.kt)("li",{parentName:"ol"},"Use the proposed templates."),(0,i.kt)("li",{parentName:"ol"},'Choose "Discover more" and then choose from the list downloaded from the Giter8 wiki page.'),(0,i.kt)("li",{parentName:"ol"},"Input a custom Github repository following the ",(0,i.kt)("inlineCode",{parentName:"li"},"organization/repo")," schema."))),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"Navigate to the parent directory that you want to create your new project in.")),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"Choose the name or accept the default one.")),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"Choose whether to open a new window for the created project or use the existing one."))),(0,i.kt)("p",null,'The same command will be invoked when clicking the "New Scala Project" button in the Metals view.'),(0,i.kt)("p",null,"If you feel like a template should be included in the default displayed ones do not hesitate to create a\n",(0,i.kt)("a",{parentName:"p",href:"https://github.com/scalameta/metals/blob/cda5b8c2029e5f201fb8d0636e0365d796407bd9/metals/src/main/scala/scala/meta/internal/builds/NewProjectProvider.scala#L308"},"PR"),"\nor file an issue."),(0,i.kt)("h2",{id:"running-and-debugging-your-code"},"Running and debugging your code"),(0,i.kt)("p",null,"Metals supports running and debugging tests and main methods via the\n",(0,i.kt)("a",{parentName:"p",href:"https://microsoft.github.io/debug-adapter-protocol/"},"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,i.kt)("inlineCode",{parentName:"p"},"Run")," view. When using Metals the debugger itself is\n",(0,i.kt)("a",{parentName:"p",href:"https://scalacenter.github.io/bloop/"},"Bloop"),", which is also responsible for\nstarting the actual process."),(0,i.kt)("p",null,"Users can begin the debugging session in two ways:"),(0,i.kt)("h3",{id:"via-code-lenses"},"via code lenses"),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/5nTnrcS.png",alt:"lenses"})),(0,i.kt)("p",null,"For each main or test class Metals shows two code lenses ",(0,i.kt)("inlineCode",{parentName:"p"},"run | debug")," or\n",(0,i.kt)("inlineCode",{parentName:"p"},"test | test debug"),", which show up above the definition as a kind of virtual\ntext. Clicking ",(0,i.kt)("inlineCode",{parentName:"p"},"run")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"test")," will start running the main class or test without\nstopping at any breakpoints, while clicking ",(0,i.kt)("inlineCode",{parentName:"p"},"debug")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"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."),(0,i.kt)("h3",{id:"via-a-launchjson-configuration"},"via a ",(0,i.kt)("inlineCode",{parentName:"h3"},"launch.json")," configuration"),(0,i.kt)("p",null,"Visual Studio Code uses ",(0,i.kt)("inlineCode",{parentName:"p"},".vscode/launch.json")," to store user defined\nconfigurations, which can be run using:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"The ",(0,i.kt)("inlineCode",{parentName:"li"},"Run -> Start Debugging")," menu item or ",(0,i.kt)("inlineCode",{parentName:"li"},"workbench.action.debug.start"),"\nshortcut."),(0,i.kt)("li",{parentName:"ul"},"The ",(0,i.kt)("inlineCode",{parentName:"li"},"Run -> Run Without Debugging")," menu item or ",(0,i.kt)("inlineCode",{parentName:"li"},"workbench.action.debug.run"),"\nshortcut.")),(0,i.kt)("p",null,"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:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{\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')),(0,i.kt)("p",null,"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,i.kt)("inlineCode",{parentName:"p"},'"configurations":')," add the key ",(0,i.kt)("inlineCode",{parentName:"p"},"buildTarget")," with\nyour target name, e.g. ",(0,i.kt)("inlineCode",{parentName:"p"},"root"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},' "buildTarget": "root"\n')),(0,i.kt)("p",null,"The build target name corresponds to your project name. For example in sbt for\n",(0,i.kt)("inlineCode",{parentName:"p"},"lazy val interfaces = project")," the name of the build target will be\n",(0,i.kt)("inlineCode",{parentName:"p"},"interfaces")," for sources and ",(0,i.kt)("inlineCode",{parentName:"p"},"interfaces-test")," for tests. To make sure you have\nthe correct target names please run the command ",(0,i.kt)("inlineCode",{parentName:"p"},"Metals: Run Doctor"),"."),(0,i.kt)("p",null,"Multiple configurations can be stored in that file and can be chosen either\nmanually in the ",(0,i.kt)("inlineCode",{parentName:"p"},"Run")," view or can be picked by invoking a shortcut defined under\n",(0,i.kt)("inlineCode",{parentName:"p"},"workbench.action.debug.selectandstart"),"."),(0,i.kt)("h3",{id:"via-metals-commands"},"via Metals' commands"),(0,i.kt)("p",null,"You can also use commands that can be easily bound to shortcuts:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"metals.run-current-file")," - Run main class in the current file."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"metals.test-current-file")," - Run test class in the current file"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"metals.test-current-target")," - Run all tests in the current project.")),(0,i.kt)("p",null,"To assign shortcuts just go to the Keyboard Shortcuts page (",(0,i.kt)("inlineCode",{parentName:"p"},"File")," ->\n",(0,i.kt)("inlineCode",{parentName:"p"},"Preferences")," -> ",(0,i.kt)("inlineCode",{parentName:"p"},"Keyboard Shortcuts"),") and search for a command, click on it and\nuse your preferred shortcut."),(0,i.kt)("h2",{id:"on-type-formatting-for-multiline-string-formatting"},"On type formatting for multiline string formatting"),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://imgur.com/a0O2vCs.gif",alt:"on-type"})),(0,i.kt)("p",null,"To properly support adding ",(0,i.kt)("inlineCode",{parentName:"p"},"|")," in multiline strings we are using the\n",(0,i.kt)("inlineCode",{parentName:"p"},"onTypeFormatting")," method. The functionality is enabled by default, but you can\ndisable/enable ",(0,i.kt)("inlineCode",{parentName:"p"},"onTypeFormatting")," inside Visual Studio Code settings by checking\n",(0,i.kt)("inlineCode",{parentName:"p"},"Editor: Format On Type"),":"),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/s6nT9rC.png",alt:"on-type-setting"})),(0,i.kt)("h2",{id:"formatting-on-paste-for-multiline-strings"},"Formatting on paste for multiline strings"),(0,i.kt)("p",null,"Whenever text is paste into a multiline string with ",(0,i.kt)("inlineCode",{parentName:"p"},"|")," it will be properly\nformatted by Metals:"),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/fF0XWYC.gif",alt:"format-on-paste"})),(0,i.kt)("p",null,"This feature is enabled by default. If you need to disable/enable formatting on\npaste in Visual Studio Code you can check the ",(0,i.kt)("inlineCode",{parentName:"p"},"Editor: Format On Paste")," setting:"),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/rMrk27F.png",alt:"format-on-paste-setting"})),(0,i.kt)("h2",{id:"worksheets"},"Worksheets"),(0,i.kt)("p",null,"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.kt)("a",{parentName:"p",href:"https://scalameta.org/mdoc/"},"mdoc"),"."),(0,i.kt)("h3",{id:"getting-started-with-worksheets"},"Getting started with Worksheets"),(0,i.kt)("p",null,"To get started with a worksheet you can either use the ",(0,i.kt)("inlineCode",{parentName:"p"},"metals.new-scala-file"),"\ncommand and select ",(0,i.kt)("em",{parentName:"p"},"Worksheet")," or create a file called ",(0,i.kt)("inlineCode",{parentName:"p"},"*.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 ",(0,i.kt)("inlineCode",{parentName:"p"},"src"),"\ndirectory. You can still create a worksheet in other places, but you will\nonly have access to the standard library and your dependencies."),(0,i.kt)("h3",{id:"evaluations"},"Evaluations"),(0,i.kt)("p",null,"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."),(0,i.kt)("p",null,"Keep in mind that you don't need to wrap your code in an ",(0,i.kt)("inlineCode",{parentName:"p"},"object"),". In worksheets\neverything can be evaluated at the top level."),(0,i.kt)("h3",{id:"using-dependencies-in-worksheets"},"Using dependencies in worksheets"),(0,i.kt)("p",null,"You are able to include an external dependency in your worksheet by including\nit in one of the following two ways."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-scala"},"// $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")),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"::")," is the same as ",(0,i.kt)("inlineCode",{parentName:"p"},"%%")," in sbt, which will append the current Scala binary version\nto the artifact name."),(0,i.kt)("p",null,"You can also import ",(0,i.kt)("inlineCode",{parentName:"p"},"scalac")," options in a special ",(0,i.kt)("inlineCode",{parentName:"p"},"$scalac")," import like below:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-scala"},"import $scalac.`-Ywarn-unused`\n")),(0,i.kt)("h3",{id:"troubleshooting"},"Troubleshooting"),(0,i.kt)("p",null,"Since worksheets are not standard Scala files, you may run into issues with some constructs.\nFor example, you may see an error like this:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"value classes may not be a member of another class - mdoc\n")),(0,i.kt)("p",null,"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."),(0,i.kt)("h2",{id:"running-scalafix-rules"},"Running scalafix rules"),(0,i.kt)("p",null,"Scalafix allows users to specify some refactoring and linting rules that can be applied to your\ncodebase. Please checkout the ",(0,i.kt)("a",{parentName:"p",href:"https://scalacenter.github.io/scalafix"},"scalafix website")," for more information."),(0,i.kt)("p",null,"Since Metals v0.11.7 it's now possible to run scalafix rules using a special\ncommand ",(0,i.kt)("inlineCode",{parentName:"p"},"metals.scalafix-run"),". In VS Code can be also run using the default shortcut of ",(0,i.kt)("inlineCode",{parentName:"p"},"shift + alt + ctrl + o"),".\nThis should run all the rules defined in your ",(0,i.kt)("inlineCode",{parentName:"p"},".scalafix.conf")," file. All built-in rules\nand the ",(0,i.kt)("a",{parentName:"p",href:"https://scalacenter.github.io/scalafix/docs/rules/community-rules.html#hygiene-rules"},"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.kt)("inlineCode",{parentName:"p"},"metals.scalafixRulesDependencies")," user setting.\nThose rules need to be in form of strings such as ",(0,i.kt)("inlineCode",{parentName:"p"},"com.github.liancheng::organize-imports:0.6.0"),", which\nfollows the same convention as ",(0,i.kt)("a",{parentName:"p",href:"https://get-coursier.io/"},"coursier dependencies"),"."),(0,i.kt)("p",null,"A sample scalafix configuration can be seen below:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-hocon"},'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')),(0,i.kt)("h2",{id:"searching-a-symbol-in-the-workspace"},"Searching a symbol in the workspace"),(0,i.kt)("p",null,'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,i.kt)("a",{parentName:"p",href:"https://github.com/microsoft/vscode/issues/98125"},"this issue")," for more context) and provide richer search capabilities."),(0,i.kt)("p",null,'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:'),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-js"},' {\n "key": "ctrl+t", // or "cmd+t" if you\'re on macOS\n "command": "metals.symbol-search",\n "when": "editorLangId == scala"\n }\n')),(0,i.kt)("h2",{id:"test-explorer"},"Test Explorer"),(0,i.kt)("p",null,"Metals 0.11.0 implements Visual Studio Code's ",(0,i.kt)("a",{parentName:"p",href:"https://code.visualstudio.com/api/extension-guides/testing"},"Testing API"),". "),(0,i.kt)("p",null,"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"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"view all discovered test suites grouped by build targets (modules) and filter them"),(0,i.kt)("li",{parentName:"ul"},"run/debug test"),(0,i.kt)("li",{parentName:"ul"},"navigate to test's definition.")),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/Z3VtS0O.gif",alt:"test-explorer"})),(0,i.kt)("p",null,"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:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Junit"),(0,i.kt)("li",{parentName:"ul"},"MUnit"),(0,i.kt)("li",{parentName:"ul"},"ScalatestIf you encounter an error, create an ",(0,i.kt)("a",{parentName:"li",href:"https://github.com/scalameta/metals/issues"},"issue"),".")),(0,i.kt)("h2",{id:"coming-from-intellij"},"Coming from IntelliJ"),(0,i.kt)("p",null,"Install the\n",(0,i.kt)("a",{parentName:"p",href:"https://marketplace.visualstudio.com/items?itemName=k--kato.intellij-idea-keybindings"},"IntelliJ IDEA Keybindings"),"\nextension to use default IntelliJ shortcuts with VS Code."),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"IntelliJ"),(0,i.kt)("th",{parentName:"tr",align:null},"VS Code"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"Go to class"),(0,i.kt)("td",{parentName:"tr",align:null},"Go to symbol in workspace")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"Parameter info"),(0,i.kt)("td",{parentName:"tr",align:null},"Trigger parameter hints")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"Basic completion"),(0,i.kt)("td",{parentName:"tr",align:null},"Trigger suggest")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"Type info"),(0,i.kt)("td",{parentName:"tr",align:null},"Show hover")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"Expand"),(0,i.kt)("td",{parentName:"tr",align:null},"Fold")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"Extend Selection"),(0,i.kt)("td",{parentName:"tr",align:null},"Expand selection")))),(0,i.kt)("h2",{id:"github-codespaces-and-githubdev-support"},"GitHub Codespaces and GitHub.dev support"),(0,i.kt)("p",null,"See ",(0,i.kt)("a",{parentName:"p",href:"https://scalameta.org/metals/docs/editors/online-ides#github-codespaces-and-githubdev"},"https://scalameta.org/metals/docs/editors/online-ides#github-codespaces-and-githubdev")))}h.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6561],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>h});var a=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=a.createContext({}),p=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},u=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),d=p(n),c=o,h=d["".concat(s,".").concat(c)]||d[c]||m[c]||i;return n?a.createElement(h,r(r({ref:t},u),{},{components:n})):a.createElement(h,r({ref:t},u))}));function h(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,r=new Array(i);r[0]=c;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:o,r[1]=l;for(var p=2;p{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>s,default:()=>h,frontMatter:()=>l,metadata:()=>p,toc:()=>d});var a=n(7462),o=n(3366),i=(n(7294),n(3905)),r=["components"],l={id:"vscode",sidebar_label:"VS Code",title:"Visual Studio Code"},s=void 0,p={unversionedId:"editors/vscode",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,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"}},u={},d=[{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}],m={toc:d},c="wrapper";function h(e){var t=e.components,n=(0,o.Z)(e,r);return(0,i.kt)(c,(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://user-images.githubusercontent.com/1408093/48776422-1f764f00-ecd0-11e8-96d1-170f2354d50e.gif",alt:"Goto Definition"})),(0,i.kt)("h2",{id:"requirements"},"Requirements"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Java 8, 11, 17 provided by OpenJDK or Oracle"),". Eclipse OpenJ9 is not\nsupported, please make sure the ",(0,i.kt)("inlineCode",{parentName:"p"},"JAVA_HOME")," environment variable\npoints to a valid Java 8, 11 or 17 installation."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"macOS, Linux or Windows"),". Metals is developed on many operating systems and\nevery PR is tested on Ubuntu, Windows and MacOS."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Scala 2.13, 2.12, 2.11 and Scala 3"),". Metals supports these Scala versions:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"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")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"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")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"Scala 2.11"),":\n2.11.12")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("strong",{parentName:"p"},"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"))),(0,i.kt)("p",null,"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"),(0,i.kt)("h2",{id:"installation"},"Installation"),(0,i.kt)("p",null,"Install the Metals extension from the\n",(0,i.kt)("a",{parentName:"p",href:"https://marketplace.visualstudio.com/items?itemName=scalameta.metals"},"Marketplace")," by clicking on this badge ",(0,i.kt)("a",{parentName:"p",href:"vscode:extension/scalameta.metals"},(0,i.kt)("img",{parentName:"a",src:"https://img.shields.io/badge/metals-vscode-blue.png",alt:"Install Metals extension"}))," or via the VS Code editor:"),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://imgur.com/Qew0fNH.png",alt:"install stable version"})),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"Make sure to disable the extensions\n",(0,i.kt)("a",{parentName:"p",href:"https://marketplace.visualstudio.com/items?itemName=dragos.scala-lsp"},"Scala Language Server"),"\nand\n",(0,i.kt)("a",{parentName:"p",href:"https://marketplace.visualstudio.com/items?itemName=lightbend.vscode-sbt-scala"},"Scala (sbt)"),"\nif they are installed. The\n",(0,i.kt)("a",{parentName:"p",href:"https://marketplace.visualstudio.com/items?itemName=lampepfl.dotty"},"Dotty Language Server"),"\ndoes ",(0,i.kt)("strong",{parentName:"p"},"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,i.kt)("inlineCode",{parentName:"p"},"Dotty Language Server")," you need to\nfirst remove ",(0,i.kt)("inlineCode",{parentName:"p"},".dotty-ide-artifact")," before opening the workspace with Metals.")),(0,i.kt)("p",null,"Next, open a directory containing your Scala code. The extension activates when\nthe main directory contains ",(0,i.kt)("inlineCode",{parentName:"p"},"build.sbt")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"build.sc")," file, a Scala file is\nopened, which includes ",(0,i.kt)("inlineCode",{parentName:"p"},"*.sbt"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"*.scala")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"*.sc")," file, or a standard Scala\ndirectory structure ",(0,i.kt)("inlineCode",{parentName:"p"},"src/main/scala")," is detected."),(0,i.kt)("p",null,"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,i.kt)("a",{parentName:"p",href:"#SNAPSHOT"},"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,i.kt)("inlineCode",{parentName:"p"},"major.minor.PATCH")," versioning."),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://imgur.com/CzOTleE.png",alt:"Install the pre-release extension"})),(0,i.kt)("h2",{id:"importing-a-build"},"Importing a build"),(0,i.kt)("p",null,'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.'),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/0VqZWay.png",alt:"Import build"})),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},'"Not now" disables this prompt for 2 minutes.'),(0,i.kt)("li",{parentName:"ul"},'"Don\'t show again" disables this prompt forever, use ',(0,i.kt)("inlineCode",{parentName:"li"},"rm -rf .metals/")," to re-enable\nthe prompt."),(0,i.kt)("li",{parentName:"ul"},"Use ",(0,i.kt)("inlineCode",{parentName:"li"},"tail -f .metals/metals.log")," to watch the build import progress."),(0,i.kt)("li",{parentName:"ul"},"Behind the scenes, Metals uses ",(0,i.kt)("a",{parentName:"li",href:"https://scalacenter.github.io/bloop/"},"Bloop")," to\nimport sbt builds, but you don't need Bloop installed on your machine to run this step.")),(0,i.kt)("p",null,"Once the import step completes, compilation starts for your open ",(0,i.kt)("inlineCode",{parentName:"p"},"*.scala"),"\nfiles."),(0,i.kt)("p",null,"Once the sources have compiled successfully, you can navigate the codebase with\ngoto definition."),(0,i.kt)("h3",{id:"custom-sbt-launcher"},"Custom sbt launcher"),(0,i.kt)("p",null,"By default, Metals runs an embedded ",(0,i.kt)("inlineCode",{parentName:"p"},"sbt-launch.jar")," launcher that respects ",(0,i.kt)("inlineCode",{parentName:"p"},".sbtopts")," and ",(0,i.kt)("inlineCode",{parentName:"p"},".jvmopts"),".\nHowever, the environment variables ",(0,i.kt)("inlineCode",{parentName:"p"},"SBT_OPTS")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"JAVA_OPTS")," are not respected."),(0,i.kt)("p",null,'Update the "Sbt Script" setting to use a custom ',(0,i.kt)("inlineCode",{parentName:"p"},"sbt")," script instead of the\ndefault Metals launcher if you need further customizations like reading environment\nvariables."),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/NuwEBe4.png",alt:"Sbt Launcher"})),(0,i.kt)("h3",{id:"speeding-up-import"},"Speeding up import"),(0,i.kt)("p",null,'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.'),(0,i.kt)("p",null,"Consult the ",(0,i.kt)("a",{parentName:"p",href:"https://scalacenter.github.io/bloop/docs/build-tools/sbt#speeding-up-build-export"},"Bloop documentation"),"\nto learn how to speed up build import."),(0,i.kt)("h3",{id:"importing-changes"},"Importing changes"),(0,i.kt)("p",null,"When you change ",(0,i.kt)("inlineCode",{parentName:"p"},"build.sbt")," or sources under ",(0,i.kt)("inlineCode",{parentName:"p"},"project/"),", you will be prompted to\nre-import the build."),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/72kdZkL.png",alt:"Import sbt changes"})),(0,i.kt)("h3",{id:"manually-trigger-build-import"},"Manually trigger build import"),(0,i.kt)("p",null,'To manually trigger a build import, execute the "Import build" command through\nthe command palette (',(0,i.kt)("inlineCode",{parentName:"p"},"Cmd + Shift + P"),")."),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/QHLKt8u.png",alt:"Import build command"})),(0,i.kt)("h2",{id:"run-doctor"},"Run doctor"),(0,i.kt)("p",null,'Execute the "Run Doctor" through the command palette to troubleshoot potential\nconfiguration problems in your workspace.'),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/K02g0UM.png",alt:"Run doctor command"})),(0,i.kt)("h2",{id:"configure-java-version"},"Configure Java version"),(0,i.kt)("p",null,"The VS Code plugin uses by default the ",(0,i.kt)("inlineCode",{parentName:"p"},"JAVA_HOME")," environment variable (via\n",(0,i.kt)("a",{parentName:"p",href:"https://www.npmjs.com/package/locate-java-home"},(0,i.kt)("inlineCode",{parentName:"a"},"locate-java-home")),") to locate\nthe ",(0,i.kt)("inlineCode",{parentName:"p"},"java"),' executable. To override the default Java home location, update the\n"Java Home" variable in the settings menu.'),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/sKrPKk2.png",alt:"Java Home setting"})),(0,i.kt)("p",null,"If this setting is defined, the VS Code plugin uses the custom path instead of\nthe ",(0,i.kt)("inlineCode",{parentName:"p"},"JAVA_HOME")," environment variable."),(0,i.kt)("h3",{id:"macos"},"macOS"),(0,i.kt)("p",null,"To globally configure ",(0,i.kt)("inlineCode",{parentName:"p"},"$JAVA_HOME")," for all GUI applications, see\n",(0,i.kt)("a",{parentName:"p",href:"https://stackoverflow.com/questions/135688/setting-environment-variables-on-os-x"},"this Stackoverflow answer"),"."),(0,i.kt)("p",null,"If you prefer to manually configure Java home through VS Code, run the following\ncommand to copy the Java 8 home path."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-sh"},"/usr/libexec/java_home -v 1.8 | pbcopy\n")),(0,i.kt)("h2",{id:"custom-artifact-repositories-maven-or-ivy-resolvers"},"Custom artifact repositories (Maven or Ivy resolvers)"),(0,i.kt)("p",null,"Use the 'Custom Repositories' setting for the Metals VS Code extension to tell\n",(0,i.kt)("a",{parentName:"p",href:"https://get-coursier.io/docs/other-proxy"},"Coursier")," to try to download Metals\nartifacts from your private artifact repository."),(0,i.kt)("p",null,"Use ",(0,i.kt)("inlineCode",{parentName:"p"},".jvmopts")," to set sbt options\n(",(0,i.kt)("a",{parentName:"p",href:"https://www.scala-sbt.org/1.0/docs/Proxy-Repositories.html"},"https://www.scala-sbt.org/1.0/docs/Proxy-Repositories.html"),") for\n",(0,i.kt)("inlineCode",{parentName:"p"},"sbt bloopInstall")," which resolves library dependencies. You can also provide a\ncustom sbt script (see 'Custom sbt launcher')."),(0,i.kt)("h2",{id:"http-proxy"},"HTTP proxy"),(0,i.kt)("p",null,"Metals uses ",(0,i.kt)("a",{parentName:"p",href:"https://get-coursier.io/docs/other-proxy"},"Coursier")," to download\nartifacts from Maven Central. To use Metals behind an HTTP proxy, configure the\nsystem properties ",(0,i.kt)("inlineCode",{parentName:"p"},"-Dhttps.proxyHost=\u2026 -Dhttps.proxyPort=\u2026")," in one of the\nfollowing locations:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},".jvmopts")," file in the workspace directory."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"JAVA_OPTS")," environment variable, make sure to start ",(0,i.kt)("inlineCode",{parentName:"li"},"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."),(0,i.kt)("li",{parentName:"ul"},'"Server Properties" setting for the Metals VS Code extension, which can be\nconfigured per-workspace or per-user.')),(0,i.kt)("h2",{id:"using-latest-metals-snapshot"},"Using latest Metals ",(0,i.kt)("a",{name:"SNAPSHOT"},"SNAPSHOT")),(0,i.kt)("p",null,'Update the "Server Version" setting to try out the latest pending Metals\nfeatures.'),(0,i.kt)("table",null,(0,i.kt)("thead",null,(0,i.kt)("tr",null,(0,i.kt)("th",null,"Version"),(0,i.kt)("th",null,"Published"))),(0,i.kt)("tbody",null,(0,i.kt)("tr",null,(0,i.kt)("td",null,"1.0.1"),(0,i.kt)("td",null,"28 Aug 2023 14:46")),(0,i.kt)("tr",null,(0,i.kt)("td",null,"1.0.1+66-8f590ee4-SNAPSHOT"),(0,i.kt)("td",null,"01 Oct 2023 20:35")))),'Run the "Reload Window" command after updating the setting for the new version to take effect.',(0,i.kt)("h2",{id:"files-and-directories-to-include-in-your-gitignore"},"Files and Directories to include in your Gitignore"),(0,i.kt)("p",null,"The Metals server places logs and other files in the ",(0,i.kt)("inlineCode",{parentName:"p"},".metals")," directory. The\nBloop compile server places logs and compilation artifacts in the ",(0,i.kt)("inlineCode",{parentName:"p"},".bloop"),"\ndirectory. The Bloop plugin that generates Bloop configuration is added in the\n",(0,i.kt)("inlineCode",{parentName:"p"},"metals.sbt")," file, which is added at ",(0,i.kt)("inlineCode",{parentName:"p"},"project/metals.sbt")," as well as further\n",(0,i.kt)("inlineCode",{parentName:"p"},"project")," directories depending on how deep ",(0,i.kt)("inlineCode",{parentName:"p"},"*.sbt")," files need to be supported.\nTo support each ",(0,i.kt)("inlineCode",{parentName:"p"},"*.sbt")," file Metals needs to create an additional file at\n",(0,i.kt)("inlineCode",{parentName:"p"},"./project/project/metals.sbt")," relative to the sbt file.\nWorking with Ammonite scripts will place compiled scripts into the ",(0,i.kt)("inlineCode",{parentName:"p"},".ammonite")," directory.\nIt's recommended to exclude these directories and files\nfrom version control systems like git."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-sh"},"# ~/.gitignore\n.metals/\n.bloop/\n.ammonite/\nmetals.sbt\n")),(0,i.kt)("h2",{id:"show-document-symbols"},"Show document symbols"),(0,i.kt)("p",null,'Run the "Explorer: Focus on Outline View" command to open the symbol outline for\nthe current file in the sidebar.'),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/T0kVJsr.gif",alt:"Document Symbols Outline"})),(0,i.kt)("p",null,'Run the "Open Symbol in File" command to search for a symbol in the current file\nwithout opening the sidebar.'),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/0PJ4brd.png",alt:"Document Symbols Command"})),(0,i.kt)("p",null,"As you type, the symbol outline is also visible at the top of the file.\n",(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/L217n4q.png",alt:"Document Symbols Outline"})),(0,i.kt)("h2",{id:"go-to-parent-code-lenses"},"Go to parent code lenses"),(0,i.kt)("p",null,"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."),(0,i.kt)("p",null,"To enable the feature you need to modify the setting ",(0,i.kt)("inlineCode",{parentName:"p"},"metals.superMethodLensesEnabled")," to ",(0,i.kt)("inlineCode",{parentName:"p"},"true"),"."),(0,i.kt)("p",null,"Even without using the code lenses it's still possible to navigate the method hierarchy\nusing two commands:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"Metals: Go to super method")," - immediately goes to the parent of the method the cursor is pointing to")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"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."))),(0,i.kt)("p",null,"You can also bind those commands to a shortcut."),(0,i.kt)("h2",{id:"create-new-project-from-template"},"Create new project from template"),(0,i.kt)("p",null,"It is possible using Metals to easily setup a new project using the exiting ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/foundweekends/giter8/wiki/giter8-templates"},"giter8")," templates.\nThis is an equivalent to the ",(0,i.kt)("inlineCode",{parentName:"p"},"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:"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"Choose the template and then:"),(0,i.kt)("ol",{parentName:"li"},(0,i.kt)("li",{parentName:"ol"},"Use the proposed templates."),(0,i.kt)("li",{parentName:"ol"},'Choose "Discover more" and then choose from the list downloaded from the Giter8 wiki page.'),(0,i.kt)("li",{parentName:"ol"},"Input a custom Github repository following the ",(0,i.kt)("inlineCode",{parentName:"li"},"organization/repo")," schema."))),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"Navigate to the parent directory that you want to create your new project in.")),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"Choose the name or accept the default one.")),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"Choose whether to open a new window for the created project or use the existing one."))),(0,i.kt)("p",null,'The same command will be invoked when clicking the "New Scala Project" button in the Metals view.'),(0,i.kt)("p",null,"If you feel like a template should be included in the default displayed ones do not hesitate to create a\n",(0,i.kt)("a",{parentName:"p",href:"https://github.com/scalameta/metals/blob/cda5b8c2029e5f201fb8d0636e0365d796407bd9/metals/src/main/scala/scala/meta/internal/builds/NewProjectProvider.scala#L308"},"PR"),"\nor file an issue."),(0,i.kt)("h2",{id:"running-and-debugging-your-code"},"Running and debugging your code"),(0,i.kt)("p",null,"Metals supports running and debugging tests and main methods via the\n",(0,i.kt)("a",{parentName:"p",href:"https://microsoft.github.io/debug-adapter-protocol/"},"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,i.kt)("inlineCode",{parentName:"p"},"Run")," view. When using Metals the debugger itself is\n",(0,i.kt)("a",{parentName:"p",href:"https://scalacenter.github.io/bloop/"},"Bloop"),", which is also responsible for\nstarting the actual process."),(0,i.kt)("p",null,"Users can begin the debugging session in two ways:"),(0,i.kt)("h3",{id:"via-code-lenses"},"via code lenses"),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/5nTnrcS.png",alt:"lenses"})),(0,i.kt)("p",null,"For each main or test class Metals shows two code lenses ",(0,i.kt)("inlineCode",{parentName:"p"},"run | debug")," or\n",(0,i.kt)("inlineCode",{parentName:"p"},"test | test debug"),", which show up above the definition as a kind of virtual\ntext. Clicking ",(0,i.kt)("inlineCode",{parentName:"p"},"run")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"test")," will start running the main class or test without\nstopping at any breakpoints, while clicking ",(0,i.kt)("inlineCode",{parentName:"p"},"debug")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"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."),(0,i.kt)("h3",{id:"via-a-launchjson-configuration"},"via a ",(0,i.kt)("inlineCode",{parentName:"h3"},"launch.json")," configuration"),(0,i.kt)("p",null,"Visual Studio Code uses ",(0,i.kt)("inlineCode",{parentName:"p"},".vscode/launch.json")," to store user defined\nconfigurations, which can be run using:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"The ",(0,i.kt)("inlineCode",{parentName:"li"},"Run -> Start Debugging")," menu item or ",(0,i.kt)("inlineCode",{parentName:"li"},"workbench.action.debug.start"),"\nshortcut."),(0,i.kt)("li",{parentName:"ul"},"The ",(0,i.kt)("inlineCode",{parentName:"li"},"Run -> Run Without Debugging")," menu item or ",(0,i.kt)("inlineCode",{parentName:"li"},"workbench.action.debug.run"),"\nshortcut.")),(0,i.kt)("p",null,"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:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{\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')),(0,i.kt)("p",null,"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,i.kt)("inlineCode",{parentName:"p"},'"configurations":')," add the key ",(0,i.kt)("inlineCode",{parentName:"p"},"buildTarget")," with\nyour target name, e.g. ",(0,i.kt)("inlineCode",{parentName:"p"},"root"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},' "buildTarget": "root"\n')),(0,i.kt)("p",null,"The build target name corresponds to your project name. For example in sbt for\n",(0,i.kt)("inlineCode",{parentName:"p"},"lazy val interfaces = project")," the name of the build target will be\n",(0,i.kt)("inlineCode",{parentName:"p"},"interfaces")," for sources and ",(0,i.kt)("inlineCode",{parentName:"p"},"interfaces-test")," for tests. To make sure you have\nthe correct target names please run the command ",(0,i.kt)("inlineCode",{parentName:"p"},"Metals: Run Doctor"),"."),(0,i.kt)("p",null,"Multiple configurations can be stored in that file and can be chosen either\nmanually in the ",(0,i.kt)("inlineCode",{parentName:"p"},"Run")," view or can be picked by invoking a shortcut defined under\n",(0,i.kt)("inlineCode",{parentName:"p"},"workbench.action.debug.selectandstart"),"."),(0,i.kt)("h3",{id:"via-metals-commands"},"via Metals' commands"),(0,i.kt)("p",null,"You can also use commands that can be easily bound to shortcuts:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"metals.run-current-file")," - Run main class in the current file."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"metals.test-current-file")," - Run test class in the current file"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"metals.test-current-target")," - Run all tests in the current project.")),(0,i.kt)("p",null,"To assign shortcuts just go to the Keyboard Shortcuts page (",(0,i.kt)("inlineCode",{parentName:"p"},"File")," ->\n",(0,i.kt)("inlineCode",{parentName:"p"},"Preferences")," -> ",(0,i.kt)("inlineCode",{parentName:"p"},"Keyboard Shortcuts"),") and search for a command, click on it and\nuse your preferred shortcut."),(0,i.kt)("h2",{id:"on-type-formatting-for-multiline-string-formatting"},"On type formatting for multiline string formatting"),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://imgur.com/a0O2vCs.gif",alt:"on-type"})),(0,i.kt)("p",null,"To properly support adding ",(0,i.kt)("inlineCode",{parentName:"p"},"|")," in multiline strings we are using the\n",(0,i.kt)("inlineCode",{parentName:"p"},"onTypeFormatting")," method. The functionality is enabled by default, but you can\ndisable/enable ",(0,i.kt)("inlineCode",{parentName:"p"},"onTypeFormatting")," inside Visual Studio Code settings by checking\n",(0,i.kt)("inlineCode",{parentName:"p"},"Editor: Format On Type"),":"),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/s6nT9rC.png",alt:"on-type-setting"})),(0,i.kt)("h2",{id:"formatting-on-paste-for-multiline-strings"},"Formatting on paste for multiline strings"),(0,i.kt)("p",null,"Whenever text is paste into a multiline string with ",(0,i.kt)("inlineCode",{parentName:"p"},"|")," it will be properly\nformatted by Metals:"),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/fF0XWYC.gif",alt:"format-on-paste"})),(0,i.kt)("p",null,"This feature is enabled by default. If you need to disable/enable formatting on\npaste in Visual Studio Code you can check the ",(0,i.kt)("inlineCode",{parentName:"p"},"Editor: Format On Paste")," setting:"),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/rMrk27F.png",alt:"format-on-paste-setting"})),(0,i.kt)("h2",{id:"worksheets"},"Worksheets"),(0,i.kt)("p",null,"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.kt)("a",{parentName:"p",href:"https://scalameta.org/mdoc/"},"mdoc"),"."),(0,i.kt)("h3",{id:"getting-started-with-worksheets"},"Getting started with Worksheets"),(0,i.kt)("p",null,"To get started with a worksheet you can either use the ",(0,i.kt)("inlineCode",{parentName:"p"},"metals.new-scala-file"),"\ncommand and select ",(0,i.kt)("em",{parentName:"p"},"Worksheet")," or create a file called ",(0,i.kt)("inlineCode",{parentName:"p"},"*.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 ",(0,i.kt)("inlineCode",{parentName:"p"},"src"),"\ndirectory. You can still create a worksheet in other places, but you will\nonly have access to the standard library and your dependencies."),(0,i.kt)("h3",{id:"evaluations"},"Evaluations"),(0,i.kt)("p",null,"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."),(0,i.kt)("p",null,"Keep in mind that you don't need to wrap your code in an ",(0,i.kt)("inlineCode",{parentName:"p"},"object"),". In worksheets\neverything can be evaluated at the top level."),(0,i.kt)("h3",{id:"using-dependencies-in-worksheets"},"Using dependencies in worksheets"),(0,i.kt)("p",null,"You are able to include an external dependency in your worksheet by including\nit in one of the following two ways."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-scala"},"// $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")),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"::")," is the same as ",(0,i.kt)("inlineCode",{parentName:"p"},"%%")," in sbt, which will append the current Scala binary version\nto the artifact name."),(0,i.kt)("p",null,"You can also import ",(0,i.kt)("inlineCode",{parentName:"p"},"scalac")," options in a special ",(0,i.kt)("inlineCode",{parentName:"p"},"$scalac")," import like below:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-scala"},"import $scalac.`-Ywarn-unused`\n")),(0,i.kt)("h3",{id:"troubleshooting"},"Troubleshooting"),(0,i.kt)("p",null,"Since worksheets are not standard Scala files, you may run into issues with some constructs.\nFor example, you may see an error like this:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"value classes may not be a member of another class - mdoc\n")),(0,i.kt)("p",null,"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."),(0,i.kt)("h2",{id:"running-scalafix-rules"},"Running scalafix rules"),(0,i.kt)("p",null,"Scalafix allows users to specify some refactoring and linting rules that can be applied to your\ncodebase. Please checkout the ",(0,i.kt)("a",{parentName:"p",href:"https://scalacenter.github.io/scalafix"},"scalafix website")," for more information."),(0,i.kt)("p",null,"Since Metals v0.11.7 it's now possible to run scalafix rules using a special\ncommand ",(0,i.kt)("inlineCode",{parentName:"p"},"metals.scalafix-run"),". In VS Code can be also run using the default shortcut of ",(0,i.kt)("inlineCode",{parentName:"p"},"shift + alt + ctrl + o"),".\nThis should run all the rules defined in your ",(0,i.kt)("inlineCode",{parentName:"p"},".scalafix.conf")," file. All built-in rules\nand the ",(0,i.kt)("a",{parentName:"p",href:"https://scalacenter.github.io/scalafix/docs/rules/community-rules.html#hygiene-rules"},"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.kt)("inlineCode",{parentName:"p"},"metals.scalafixRulesDependencies")," user setting.\nThose rules need to be in form of strings such as ",(0,i.kt)("inlineCode",{parentName:"p"},"com.github.liancheng::organize-imports:0.6.0"),", which\nfollows the same convention as ",(0,i.kt)("a",{parentName:"p",href:"https://get-coursier.io/"},"coursier dependencies"),"."),(0,i.kt)("p",null,"A sample scalafix configuration can be seen below:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-hocon"},'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')),(0,i.kt)("h2",{id:"searching-a-symbol-in-the-workspace"},"Searching a symbol in the workspace"),(0,i.kt)("p",null,'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,i.kt)("a",{parentName:"p",href:"https://github.com/microsoft/vscode/issues/98125"},"this issue")," for more context) and provide richer search capabilities."),(0,i.kt)("p",null,'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:'),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-js"},' {\n "key": "ctrl+t", // or "cmd+t" if you\'re on macOS\n "command": "metals.symbol-search",\n "when": "editorLangId == scala"\n }\n')),(0,i.kt)("h2",{id:"test-explorer"},"Test Explorer"),(0,i.kt)("p",null,"Metals 0.11.0 implements Visual Studio Code's ",(0,i.kt)("a",{parentName:"p",href:"https://code.visualstudio.com/api/extension-guides/testing"},"Testing API"),". "),(0,i.kt)("p",null,"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"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"view all discovered test suites grouped by build targets (modules) and filter them"),(0,i.kt)("li",{parentName:"ul"},"run/debug test"),(0,i.kt)("li",{parentName:"ul"},"navigate to test's definition.")),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://i.imgur.com/Z3VtS0O.gif",alt:"test-explorer"})),(0,i.kt)("p",null,"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:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Junit"),(0,i.kt)("li",{parentName:"ul"},"MUnit"),(0,i.kt)("li",{parentName:"ul"},"ScalatestIf you encounter an error, create an ",(0,i.kt)("a",{parentName:"li",href:"https://github.com/scalameta/metals/issues"},"issue"),".")),(0,i.kt)("h2",{id:"coming-from-intellij"},"Coming from IntelliJ"),(0,i.kt)("p",null,"Install the\n",(0,i.kt)("a",{parentName:"p",href:"https://marketplace.visualstudio.com/items?itemName=k--kato.intellij-idea-keybindings"},"IntelliJ IDEA Keybindings"),"\nextension to use default IntelliJ shortcuts with VS Code."),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"IntelliJ"),(0,i.kt)("th",{parentName:"tr",align:null},"VS Code"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"Go to class"),(0,i.kt)("td",{parentName:"tr",align:null},"Go to symbol in workspace")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"Parameter info"),(0,i.kt)("td",{parentName:"tr",align:null},"Trigger parameter hints")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"Basic completion"),(0,i.kt)("td",{parentName:"tr",align:null},"Trigger suggest")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"Type info"),(0,i.kt)("td",{parentName:"tr",align:null},"Show hover")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"Expand"),(0,i.kt)("td",{parentName:"tr",align:null},"Fold")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"Extend Selection"),(0,i.kt)("td",{parentName:"tr",align:null},"Expand selection")))),(0,i.kt)("h2",{id:"github-codespaces-and-githubdev-support"},"GitHub Codespaces and GitHub.dev support"),(0,i.kt)("p",null,"See ",(0,i.kt)("a",{parentName:"p",href:"https://scalameta.org/metals/docs/editors/online-ides#github-codespaces-and-githubdev"},"https://scalameta.org/metals/docs/editors/online-ides#github-codespaces-and-githubdev")))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/9b4a23be.e123e847.js b/assets/js/9b4a23be.44390f33.js similarity index 99% rename from assets/js/9b4a23be.e123e847.js rename to assets/js/9b4a23be.44390f33.js index b17f6b8f6e6..8ac264a366f 100644 --- a/assets/js/9b4a23be.e123e847.js +++ b/assets/js/9b4a23be.44390f33.js @@ -1 +1 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5688],{3905:(t,e,n)=>{n.d(e,{Zo:()=>c,kt:()=>m});var l=n(7294);function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);e&&(l=l.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,l)}return n}function a(t){for(var e=1;e=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var s=l.createContext({}),d=function(t){var e=l.useContext(s),n=e;return t&&(n="function"==typeof t?t(e):a(a({},e),t)),n},c=function(t){var e=d(t.components);return l.createElement(s.Provider,{value:e},t.children)},k="mdxType",u={inlineCode:"code",wrapper:function(t){var e=t.children;return l.createElement(l.Fragment,{},e)}},p=l.forwardRef((function(t,e){var n=t.components,i=t.mdxType,r=t.originalType,s=t.parentName,c=o(t,["components","mdxType","originalType","parentName"]),k=d(n),p=i,m=k["".concat(s,".").concat(p)]||k[p]||u[p]||r;return n?l.createElement(m,a(a({ref:e},c),{},{components:n})):l.createElement(m,a({ref:e},c))}));function m(t,e){var n=arguments,i=e&&e.mdxType;if("string"==typeof t||i){var r=n.length,a=new Array(r);a[0]=p;var o={};for(var s in e)hasOwnProperty.call(e,s)&&(o[s]=e[s]);o.originalType=t,o[k]="string"==typeof t?t:i,a[1]=o;for(var d=2;d{n.r(e),n.d(e,{assets:()=>c,contentTitle:()=>s,default:()=>m,frontMatter:()=>o,metadata:()=>d,toc:()=>k});var l=n(7462),i=n(3366),r=(n(7294),n(3905)),a=["components"],o={id:"overview",title:"Text Editors",sidebar_label:"Overview",slug:"/"},s=void 0,d={unversionedId:"editors/overview",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,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={},k=[{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}],u={toc:k},p="wrapper";function m(t){var e=t.components,n=(0,i.Z)(t,a);return(0,r.kt)(p,(0,l.Z)({},u,n,{components:e,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"latest-metals-server-versions"},"Latest Metals server versions"),(0,r.kt)("p",null,"To find out how to set the version in your editor please check out the editor\nspecific sections."),(0,r.kt)("table",null,(0,r.kt)("thead",null,(0,r.kt)("tr",null,(0,r.kt)("th",null,"Version"),(0,r.kt)("th",null,"Published"))),(0,r.kt)("tbody",null,(0,r.kt)("tr",null,(0,r.kt)("td",null,"1.0.1"),(0,r.kt)("td",null,"28 Aug 2023 14:46")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"1.0.1+65-45cbb9eb-SNAPSHOT"),(0,r.kt)("td",null,"01 Oct 2023 19:50")))),"Snapshot releases are not guaranteed to work.",(0,r.kt)("h2",{id:"editor-support"},"Editor support"),(0,r.kt)("p",null,"Metals works with the following text editors with varying degree of\nfunctionality."),(0,r.kt)("table",null,(0,r.kt)("thead",null,(0,r.kt)("tr",null,(0,r.kt)("td",null),(0,r.kt)("td",{align:"center"},"Visual Studio Code"),(0,r.kt)("td",{align:"center"},"Vim"),(0,r.kt)("td",{align:"center"},"Sublime Text"),(0,r.kt)("td",{align:"center"},"Emacs"))),(0,r.kt)("tbody",null,(0,r.kt)("tr",null,(0,r.kt)("td",null,"Installation"),(0,r.kt)("td",{align:"center"},"Single click"),(0,r.kt)("td",{align:"center"},"Single click"),(0,r.kt)("td",{align:"center"},"Single click"),(0,r.kt)("td",{align:"center"},"Single click")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Build import"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Diagnostics"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Goto definition"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Goto type definition"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Completions"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705*"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Hover"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Hover for selection"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u274c")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Parameter hints"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Find references"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Run/Debug"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Find implementations"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Rename symbol"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Code actions"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Worksheets"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Document symbols"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"Flat"),(0,r.kt)("td",{align:"center"},"Flat"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Workspace symbols"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Formatting"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Folding"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"}," "),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Highlight"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Metals Extensions"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"Status bar, Input box, Decoration protocol, Did focus"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Organize imports"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Implicit decorations"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"Shown in hover"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Source file analyzer"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Find text in dependency JAR files"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u274c")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Run scalafix rules"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")))),(0,r.kt)("h2",{id:"installation"},"Installation"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Single click"),": Metals is easy to install and requires minimal configuration\nout-of-the-box."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Few steps"),": installing Metals requires a few custom steps and minimal\nconfiguration to work."),(0,r.kt)("p",null,(0,r.kt)("em",{parentName:"p"},"You can find instructions on how to install Metals for your editor on its\nspecific page.")),(0,r.kt)("h2",{id:"build-import"},"Build import"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u2705"),": it is possible to import a build such as an sbt project directly from\nthe editor."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"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."),(0,r.kt)("h2",{id:"diagnostics"},"Diagnostics"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u2705"),": Diagnostics are correctly published on compile."),(0,r.kt)("p",null,"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."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://user-images.githubusercontent.com/1408093/48774587-f4d5c780-ecca-11e8-8087-acca5a05ca78.png",alt:"Diagnostics"})),(0,r.kt)("h3",{id:"known-limitations"},"Known limitations"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"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.")),(0,r.kt)("h2",{id:"goto-definition"},"Goto definition"),(0,r.kt)("p",null,"Navigate to symbol definitions for project sources and Scala/Java library\ndependencies."),(0,r.kt)("p",null,"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."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://user-images.githubusercontent.com/1408093/48776422-1f764f00-ecd0-11e8-96d1-170f2354d50e.gif",alt:"Goto Definition"})),(0,r.kt)("h3",{id:"known-limitations-1"},"Known limitations"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Navigation does not work for buffers that do not tokenize, for example due to\nunclosed string literals."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://github.com/scalameta/scalameta/issues/1802"},"scalameta/scalameta#1802"),"\nreflective invocations (methods calls on structural types) do not resolve to a\ndefinition.")),(0,r.kt)("h2",{id:"completions"},"Completions"),(0,r.kt)("p",null,"Use code completions to explore APIs, implement interfaces, generate exhaustive\npattern matches and more."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://user-images.githubusercontent.com/1408093/56036958-725bac00-5d2e-11e9-9cf7-46249125494a.gif",alt:"2019-04-12 14 19 39"})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"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."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Override def"),": implement methods from the super class."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Exhaustive match"),": generate an exhaustive pattern match for sealed types."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"String interpolator"),": automatically convert string literals into string\ninterpolators."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Filename"),": complete classnames based on the enclosing file."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Documentation"),": read the docstring for method symbols by pressing\nctrl+space in VS Code.")),(0,r.kt)("h3",{id:"known-limitations-2"},"Known limitations"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"completion results don't include symbols that have just been typed in separate\nfiles without a successful compilation in the build tool.")),(0,r.kt)("h2",{id:"hover-aka-type-at-point"},"Hover (aka. type at point)"),(0,r.kt)("p",null,"See the expression type and symbol signature under the cursor."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://i.imgur.com/2MfQvsM.gif",alt:null})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Expression type"),": shows the non-generic type of the highlighted expression."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Symbol signature"),": shows the generic signature of symbol under the cursor\nalong with its docstring, if available.")),(0,r.kt)("h2",{id:"signature-help-aka-parameter-hints"},"Signature help (aka. parameter hints)"),(0,r.kt)("p",null,"View a method signature and method overloads as you fill in the arguments."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://i.imgur.com/DAWIrHu.gif",alt:null})),(0,r.kt)("h2",{id:"find-references"},"Find references"),(0,r.kt)("p",null,"Find symbol references in project sources. References include implicits,\ninferred ",(0,r.kt)("inlineCode",{parentName:"p"},".apply"),", desugared ",(0,r.kt)("inlineCode",{parentName:"p"},".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."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://user-images.githubusercontent.com/1408093/51089190-75fc8880-1769-11e9-819c-95262205e95c.png",alt:"Find references"})),(0,r.kt)("h3",{id:"known-limitations-3"},"Known limitations"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},'References to overridden methods are not included in the results. For example,\nif you run "find references" on the method ',(0,r.kt)("inlineCode",{parentName:"li"},"Dog.name()")," then it won't include\nreferences to the super method ",(0,r.kt)("inlineCode",{parentName:"li"},"Animal.name()"),".")),(0,r.kt)("h2",{id:"worksheets"},"Worksheets"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u2705"),": Worksheets work via the Decoration protocol and are added as a\nnon-editable side decoration."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Comments"),": Worksheets work via ",(0,r.kt)("inlineCode",{parentName:"p"},"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,r.kt)("a",{parentName:"p",href:"/metals/docs/editors/vscode#worksheets"},"here for VS Code"),"."),(0,r.kt)("h2",{id:"document-symbols"},"Document symbols"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u2705"),": Document symbols are displayed in a hierarchical outline."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Flat"),": Document symbols are displayed in a flat outline."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://user-images.githubusercontent.com/1408093/50635569-014c7180-0f53-11e9-8898-62803898781c.gif",alt:"Document Symbols"})),(0,r.kt)("h2",{id:"workspace-symbols"},"Workspace symbols"),(0,r.kt)("p",null,"Fuzzy search a symbol in the workspace of library dependencies by its name."),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"All-lowercase queries are treated as case-insensitive searches."),(0,r.kt)("li",{parentName:"ul"},"Queries ending with a dot ",(0,r.kt)("inlineCode",{parentName:"li"},".")," list nested symbols."),(0,r.kt)("li",{parentName:"ul"},"Queries containing a semicolon ",(0,r.kt)("inlineCode",{parentName:"li"},";")," search library dependencies.")),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://i.imgur.com/w5yrK1w.gif",alt:"Fuzzy symbol search example"})),(0,r.kt)("h2",{id:"formatting"},"Formatting"),(0,r.kt)("p",null,"Metals uses Scalafmt to respond to formatting requests from the editor,\naccording to the configuration defined in ",(0,r.kt)("inlineCode",{parentName:"p"},".scalafmt.conf"),"."),(0,r.kt)("p",null,"Learn how to configure Scalafmt at\n",(0,r.kt)("a",{parentName:"p",href:"https://scalameta.org/scalafmt/docs/configuration.html"},"https://scalameta.org/scalafmt/docs/configuration.html"),"."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://user-images.githubusercontent.com/1408093/50635748-b0894880-0f53-11e9-913b-acfd5f505351.gif",alt:"Formatting"})),(0,r.kt)("h2",{id:"code-folding"},"Code folding"),(0,r.kt)("p",null,"Fold ranges such as large multi-line expressions, import groups and comments."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://camo.githubusercontent.com/3fdd7ae28907ac61c0a1ac5fdc07d085245957aa/68747470733a2f2f692e696d6775722e636f6d2f667149554a54472e676966",alt:null})),(0,r.kt)("h2",{id:"document-highlight"},"Document highlight"),(0,r.kt)("p",null,"Highlight references to the same symbol in the open file."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://i.imgur.com/0uhc9P5.gif",alt:null})),(0,r.kt)("h2",{id:"package-explorer"},"Package explorer"),(0,r.kt)("p",null,"Browse packages, classes and methods in the workspace and library dependencies\nusing the Metals sidebar. This feature is only implemented in VS Code."),(0,r.kt)("h2",{id:"test-explorer"},"Test Explorer"),(0,r.kt)("p",null,"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,r.kt)("a",{parentName:"p",href:"https://code.visualstudio.com/api/extension-guides/testing"},"Testing API"),". The Test\nExplorer API is editor agnostic and can be used by other editors than just VS\nCode. ",(0,r.kt)("img",{parentName:"p",src:"https://i.imgur.com/Z3VtS0O.gif",alt:"test-explorer"})),(0,r.kt)("p",null,"Work on the Test Explorer is still in progress and the feature has some known\nlimitations:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Test Explorer is able to discover single test cases only for JUnit4 test\nclasses. Support for other test frameworks is being worked on."),(0,r.kt)("li",{parentName:"ul"},"detecting suites in cross scala-version projects is inconsistent, see\n",(0,r.kt)("a",{parentName:"li",href:"https://github.com/scalameta/metals/issues/3503"},"this issue"),"."),(0,r.kt)("li",{parentName:"ul"},"there is no support for JS and Native platforms. For any changes subscribe to\nthe related\n",(0,r.kt)("a",{parentName:"li",href:"https://github.com/scalameta/metals-feature-requests/issues/256"},"feature request"),".")),(0,r.kt)("p",null,"You can find more information about Test Explorer under the\n",(0,r.kt)("a",{parentName:"p",href:"/metals/docs/editors/vscode#test-explorer"},"VS Code")," specific section."),(0,r.kt)("h3",{id:"running-tests"},"Running Tests"),(0,r.kt)("p",null,"Both run and debug under the hood use BSP's debug request. More information\nabout it can be found at\n",(0,r.kt)("a",{parentName:"p",href:"https://github.com/scalacenter/bloop/blob/master/docs/assets/dap-example-metals.png"},"Bloop DAP diagram"),"\nor\n",(0,r.kt)("a",{parentName:"p",href:"https://build-server-protocol.github.io/docs/specification.html#debug-request"},"BSP specification"),"\nwebsite."),(0,r.kt)("h2",{id:"metals-extensions"},"Metals Extensions"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Status bar"),": Editor client implements the ",(0,r.kt)("inlineCode",{parentName:"p"},"metals/status")," notification."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Decoration protocol"),": Editor client implements the\n",(0,r.kt)("a",{parentName:"p",href:"/metals/docs/integrations/decoration-protocol"},"Decoration Protocol"),"."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Tree view"),": Editor client implements the\n",(0,r.kt)("a",{parentName:"p",href:"/metals/docs/integrations/tree-view-protocol"},"Tree View Protocol"),"."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Did focus"),": Editor client implements the ",(0,r.kt)("inlineCode",{parentName:"p"},"metals/didFocusTextDocument"),"\nnotification."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Slow task"),": Editor client implements the ",(0,r.kt)("inlineCode",{parentName:"p"},"metals/slowTask")," request."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Input box"),": Editor client implements the ",(0,r.kt)("inlineCode",{parentName:"p"},"metals/inputBox")," request."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Quick pick"),": Editor client implements the ",(0,r.kt)("inlineCode",{parentName:"p"},"metals/quickPick")," request."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Window state"),": Editor client implements the ",(0,r.kt)("inlineCode",{parentName:"p"},"metals/windowStateDidChange"),"\nnotification."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u2705"),": Editor implements all Metals extension endpoints."),(0,r.kt)("p",null,"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,r.kt)("a",{parentName:"p",href:"/metals/docs/integrations/new-editor"},"integrating a new editor"),"."),(0,r.kt)("h2",{id:"implicit-decorations"},"Implicit decorations"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u2705"),": Additional information inferred from the code can be show within the\ncode using virtual text."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"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."),(0,r.kt)("h2",{id:"additional-file-types"},"Additional file types"),(0,r.kt)("p",null,"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."),(0,r.kt)("table",null,(0,r.kt)("thead",null,(0,r.kt)("tr",null,(0,r.kt)("td",null),(0,r.kt)("td",{align:"center"},"sbt scripts"),(0,r.kt)("td",{align:"center"},"Worksheets"),(0,r.kt)("td",{align:"center"},"Ammonite scripts*"),(0,r.kt)("td",{align:"center"},"Standalone Scala files"))),(0,r.kt)("tbody",null,(0,r.kt)("tr",null,(0,r.kt)("td",null,"Diagnostics"),(0,r.kt)("td",{align:"center"},"\u2705*"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705*")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Goto definition"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Completions"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Hover"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Parameter hints"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Find references"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Run/Debug"),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"})),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Find implementations"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Rename symbol"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Code actions"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Document symbols"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Workspace symbols"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"All symbols are local"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Formatting"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Folding"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Highlight"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Organize imports"),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"})),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Implicit decorations"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Decode file (cfr, semanticdb, tasty, javap)"),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"})))),(0,r.kt)("p",null,"*"," Note that there are some specific Ammonite features that aren't supported\nlike ",(0,r.kt)("a",{parentName:"p",href:"https://ammonite.io/#Multi-stageScripts"},"multi-stage")," scripts. Currently\nAmmonite support is also limited to Scala 2."),(0,r.kt)("p",null,"*"," Diagnostics for sbt script and standalone Scala files will only show parsing\nerrors, but not diagnostics coming from the compiler."))}m.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5688],{3905:(t,e,n)=>{n.d(e,{Zo:()=>c,kt:()=>m});var l=n(7294);function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);e&&(l=l.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,l)}return n}function a(t){for(var e=1;e=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var s=l.createContext({}),d=function(t){var e=l.useContext(s),n=e;return t&&(n="function"==typeof t?t(e):a(a({},e),t)),n},c=function(t){var e=d(t.components);return l.createElement(s.Provider,{value:e},t.children)},k="mdxType",u={inlineCode:"code",wrapper:function(t){var e=t.children;return l.createElement(l.Fragment,{},e)}},p=l.forwardRef((function(t,e){var n=t.components,i=t.mdxType,r=t.originalType,s=t.parentName,c=o(t,["components","mdxType","originalType","parentName"]),k=d(n),p=i,m=k["".concat(s,".").concat(p)]||k[p]||u[p]||r;return n?l.createElement(m,a(a({ref:e},c),{},{components:n})):l.createElement(m,a({ref:e},c))}));function m(t,e){var n=arguments,i=e&&e.mdxType;if("string"==typeof t||i){var r=n.length,a=new Array(r);a[0]=p;var o={};for(var s in e)hasOwnProperty.call(e,s)&&(o[s]=e[s]);o.originalType=t,o[k]="string"==typeof t?t:i,a[1]=o;for(var d=2;d{n.r(e),n.d(e,{assets:()=>c,contentTitle:()=>s,default:()=>m,frontMatter:()=>o,metadata:()=>d,toc:()=>k});var l=n(7462),i=n(3366),r=(n(7294),n(3905)),a=["components"],o={id:"overview",title:"Text Editors",sidebar_label:"Overview",slug:"/"},s=void 0,d={unversionedId:"editors/overview",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,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={},k=[{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}],u={toc:k},p="wrapper";function m(t){var e=t.components,n=(0,i.Z)(t,a);return(0,r.kt)(p,(0,l.Z)({},u,n,{components:e,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"latest-metals-server-versions"},"Latest Metals server versions"),(0,r.kt)("p",null,"To find out how to set the version in your editor please check out the editor\nspecific sections."),(0,r.kt)("table",null,(0,r.kt)("thead",null,(0,r.kt)("tr",null,(0,r.kt)("th",null,"Version"),(0,r.kt)("th",null,"Published"))),(0,r.kt)("tbody",null,(0,r.kt)("tr",null,(0,r.kt)("td",null,"1.0.1"),(0,r.kt)("td",null,"28 Aug 2023 14:46")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"1.0.1+66-8f590ee4-SNAPSHOT"),(0,r.kt)("td",null,"01 Oct 2023 20:35")))),"Snapshot releases are not guaranteed to work.",(0,r.kt)("h2",{id:"editor-support"},"Editor support"),(0,r.kt)("p",null,"Metals works with the following text editors with varying degree of\nfunctionality."),(0,r.kt)("table",null,(0,r.kt)("thead",null,(0,r.kt)("tr",null,(0,r.kt)("td",null),(0,r.kt)("td",{align:"center"},"Visual Studio Code"),(0,r.kt)("td",{align:"center"},"Vim"),(0,r.kt)("td",{align:"center"},"Sublime Text"),(0,r.kt)("td",{align:"center"},"Emacs"))),(0,r.kt)("tbody",null,(0,r.kt)("tr",null,(0,r.kt)("td",null,"Installation"),(0,r.kt)("td",{align:"center"},"Single click"),(0,r.kt)("td",{align:"center"},"Single click"),(0,r.kt)("td",{align:"center"},"Single click"),(0,r.kt)("td",{align:"center"},"Single click")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Build import"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Diagnostics"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Goto definition"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Goto type definition"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Completions"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705*"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Hover"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Hover for selection"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u274c")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Parameter hints"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Find references"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Run/Debug"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Find implementations"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Rename symbol"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Code actions"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Worksheets"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Document symbols"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"Flat"),(0,r.kt)("td",{align:"center"},"Flat"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Workspace symbols"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Formatting"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Folding"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"}," "),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Highlight"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Metals Extensions"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"Status bar, Input box, Decoration protocol, Did focus"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Organize imports"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Implicit decorations"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"Shown in hover"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Source file analyzer"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Find text in dependency JAR files"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u274c")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Run scalafix rules"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")))),(0,r.kt)("h2",{id:"installation"},"Installation"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Single click"),": Metals is easy to install and requires minimal configuration\nout-of-the-box."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Few steps"),": installing Metals requires a few custom steps and minimal\nconfiguration to work."),(0,r.kt)("p",null,(0,r.kt)("em",{parentName:"p"},"You can find instructions on how to install Metals for your editor on its\nspecific page.")),(0,r.kt)("h2",{id:"build-import"},"Build import"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u2705"),": it is possible to import a build such as an sbt project directly from\nthe editor."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"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."),(0,r.kt)("h2",{id:"diagnostics"},"Diagnostics"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u2705"),": Diagnostics are correctly published on compile."),(0,r.kt)("p",null,"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."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://user-images.githubusercontent.com/1408093/48774587-f4d5c780-ecca-11e8-8087-acca5a05ca78.png",alt:"Diagnostics"})),(0,r.kt)("h3",{id:"known-limitations"},"Known limitations"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"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.")),(0,r.kt)("h2",{id:"goto-definition"},"Goto definition"),(0,r.kt)("p",null,"Navigate to symbol definitions for project sources and Scala/Java library\ndependencies."),(0,r.kt)("p",null,"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."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://user-images.githubusercontent.com/1408093/48776422-1f764f00-ecd0-11e8-96d1-170f2354d50e.gif",alt:"Goto Definition"})),(0,r.kt)("h3",{id:"known-limitations-1"},"Known limitations"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Navigation does not work for buffers that do not tokenize, for example due to\nunclosed string literals."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://github.com/scalameta/scalameta/issues/1802"},"scalameta/scalameta#1802"),"\nreflective invocations (methods calls on structural types) do not resolve to a\ndefinition.")),(0,r.kt)("h2",{id:"completions"},"Completions"),(0,r.kt)("p",null,"Use code completions to explore APIs, implement interfaces, generate exhaustive\npattern matches and more."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://user-images.githubusercontent.com/1408093/56036958-725bac00-5d2e-11e9-9cf7-46249125494a.gif",alt:"2019-04-12 14 19 39"})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"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."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Override def"),": implement methods from the super class."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Exhaustive match"),": generate an exhaustive pattern match for sealed types."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"String interpolator"),": automatically convert string literals into string\ninterpolators."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Filename"),": complete classnames based on the enclosing file."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Documentation"),": read the docstring for method symbols by pressing\nctrl+space in VS Code.")),(0,r.kt)("h3",{id:"known-limitations-2"},"Known limitations"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"completion results don't include symbols that have just been typed in separate\nfiles without a successful compilation in the build tool.")),(0,r.kt)("h2",{id:"hover-aka-type-at-point"},"Hover (aka. type at point)"),(0,r.kt)("p",null,"See the expression type and symbol signature under the cursor."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://i.imgur.com/2MfQvsM.gif",alt:null})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Expression type"),": shows the non-generic type of the highlighted expression."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Symbol signature"),": shows the generic signature of symbol under the cursor\nalong with its docstring, if available.")),(0,r.kt)("h2",{id:"signature-help-aka-parameter-hints"},"Signature help (aka. parameter hints)"),(0,r.kt)("p",null,"View a method signature and method overloads as you fill in the arguments."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://i.imgur.com/DAWIrHu.gif",alt:null})),(0,r.kt)("h2",{id:"find-references"},"Find references"),(0,r.kt)("p",null,"Find symbol references in project sources. References include implicits,\ninferred ",(0,r.kt)("inlineCode",{parentName:"p"},".apply"),", desugared ",(0,r.kt)("inlineCode",{parentName:"p"},".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."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://user-images.githubusercontent.com/1408093/51089190-75fc8880-1769-11e9-819c-95262205e95c.png",alt:"Find references"})),(0,r.kt)("h3",{id:"known-limitations-3"},"Known limitations"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},'References to overridden methods are not included in the results. For example,\nif you run "find references" on the method ',(0,r.kt)("inlineCode",{parentName:"li"},"Dog.name()")," then it won't include\nreferences to the super method ",(0,r.kt)("inlineCode",{parentName:"li"},"Animal.name()"),".")),(0,r.kt)("h2",{id:"worksheets"},"Worksheets"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u2705"),": Worksheets work via the Decoration protocol and are added as a\nnon-editable side decoration."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Comments"),": Worksheets work via ",(0,r.kt)("inlineCode",{parentName:"p"},"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,r.kt)("a",{parentName:"p",href:"/metals/docs/editors/vscode#worksheets"},"here for VS Code"),"."),(0,r.kt)("h2",{id:"document-symbols"},"Document symbols"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u2705"),": Document symbols are displayed in a hierarchical outline."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Flat"),": Document symbols are displayed in a flat outline."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://user-images.githubusercontent.com/1408093/50635569-014c7180-0f53-11e9-8898-62803898781c.gif",alt:"Document Symbols"})),(0,r.kt)("h2",{id:"workspace-symbols"},"Workspace symbols"),(0,r.kt)("p",null,"Fuzzy search a symbol in the workspace of library dependencies by its name."),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"All-lowercase queries are treated as case-insensitive searches."),(0,r.kt)("li",{parentName:"ul"},"Queries ending with a dot ",(0,r.kt)("inlineCode",{parentName:"li"},".")," list nested symbols."),(0,r.kt)("li",{parentName:"ul"},"Queries containing a semicolon ",(0,r.kt)("inlineCode",{parentName:"li"},";")," search library dependencies.")),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://i.imgur.com/w5yrK1w.gif",alt:"Fuzzy symbol search example"})),(0,r.kt)("h2",{id:"formatting"},"Formatting"),(0,r.kt)("p",null,"Metals uses Scalafmt to respond to formatting requests from the editor,\naccording to the configuration defined in ",(0,r.kt)("inlineCode",{parentName:"p"},".scalafmt.conf"),"."),(0,r.kt)("p",null,"Learn how to configure Scalafmt at\n",(0,r.kt)("a",{parentName:"p",href:"https://scalameta.org/scalafmt/docs/configuration.html"},"https://scalameta.org/scalafmt/docs/configuration.html"),"."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://user-images.githubusercontent.com/1408093/50635748-b0894880-0f53-11e9-913b-acfd5f505351.gif",alt:"Formatting"})),(0,r.kt)("h2",{id:"code-folding"},"Code folding"),(0,r.kt)("p",null,"Fold ranges such as large multi-line expressions, import groups and comments."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://camo.githubusercontent.com/3fdd7ae28907ac61c0a1ac5fdc07d085245957aa/68747470733a2f2f692e696d6775722e636f6d2f667149554a54472e676966",alt:null})),(0,r.kt)("h2",{id:"document-highlight"},"Document highlight"),(0,r.kt)("p",null,"Highlight references to the same symbol in the open file."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://i.imgur.com/0uhc9P5.gif",alt:null})),(0,r.kt)("h2",{id:"package-explorer"},"Package explorer"),(0,r.kt)("p",null,"Browse packages, classes and methods in the workspace and library dependencies\nusing the Metals sidebar. This feature is only implemented in VS Code."),(0,r.kt)("h2",{id:"test-explorer"},"Test Explorer"),(0,r.kt)("p",null,"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,r.kt)("a",{parentName:"p",href:"https://code.visualstudio.com/api/extension-guides/testing"},"Testing API"),". The Test\nExplorer API is editor agnostic and can be used by other editors than just VS\nCode. ",(0,r.kt)("img",{parentName:"p",src:"https://i.imgur.com/Z3VtS0O.gif",alt:"test-explorer"})),(0,r.kt)("p",null,"Work on the Test Explorer is still in progress and the feature has some known\nlimitations:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Test Explorer is able to discover single test cases only for JUnit4 test\nclasses. Support for other test frameworks is being worked on."),(0,r.kt)("li",{parentName:"ul"},"detecting suites in cross scala-version projects is inconsistent, see\n",(0,r.kt)("a",{parentName:"li",href:"https://github.com/scalameta/metals/issues/3503"},"this issue"),"."),(0,r.kt)("li",{parentName:"ul"},"there is no support for JS and Native platforms. For any changes subscribe to\nthe related\n",(0,r.kt)("a",{parentName:"li",href:"https://github.com/scalameta/metals-feature-requests/issues/256"},"feature request"),".")),(0,r.kt)("p",null,"You can find more information about Test Explorer under the\n",(0,r.kt)("a",{parentName:"p",href:"/metals/docs/editors/vscode#test-explorer"},"VS Code")," specific section."),(0,r.kt)("h3",{id:"running-tests"},"Running Tests"),(0,r.kt)("p",null,"Both run and debug under the hood use BSP's debug request. More information\nabout it can be found at\n",(0,r.kt)("a",{parentName:"p",href:"https://github.com/scalacenter/bloop/blob/master/docs/assets/dap-example-metals.png"},"Bloop DAP diagram"),"\nor\n",(0,r.kt)("a",{parentName:"p",href:"https://build-server-protocol.github.io/docs/specification.html#debug-request"},"BSP specification"),"\nwebsite."),(0,r.kt)("h2",{id:"metals-extensions"},"Metals Extensions"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Status bar"),": Editor client implements the ",(0,r.kt)("inlineCode",{parentName:"p"},"metals/status")," notification."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Decoration protocol"),": Editor client implements the\n",(0,r.kt)("a",{parentName:"p",href:"/metals/docs/integrations/decoration-protocol"},"Decoration Protocol"),"."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Tree view"),": Editor client implements the\n",(0,r.kt)("a",{parentName:"p",href:"/metals/docs/integrations/tree-view-protocol"},"Tree View Protocol"),"."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Did focus"),": Editor client implements the ",(0,r.kt)("inlineCode",{parentName:"p"},"metals/didFocusTextDocument"),"\nnotification."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Slow task"),": Editor client implements the ",(0,r.kt)("inlineCode",{parentName:"p"},"metals/slowTask")," request."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Input box"),": Editor client implements the ",(0,r.kt)("inlineCode",{parentName:"p"},"metals/inputBox")," request."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Quick pick"),": Editor client implements the ",(0,r.kt)("inlineCode",{parentName:"p"},"metals/quickPick")," request."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Window state"),": Editor client implements the ",(0,r.kt)("inlineCode",{parentName:"p"},"metals/windowStateDidChange"),"\nnotification."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u2705"),": Editor implements all Metals extension endpoints."),(0,r.kt)("p",null,"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,r.kt)("a",{parentName:"p",href:"/metals/docs/integrations/new-editor"},"integrating a new editor"),"."),(0,r.kt)("h2",{id:"implicit-decorations"},"Implicit decorations"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"\u2705"),": Additional information inferred from the code can be show within the\ncode using virtual text."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"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."),(0,r.kt)("h2",{id:"additional-file-types"},"Additional file types"),(0,r.kt)("p",null,"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."),(0,r.kt)("table",null,(0,r.kt)("thead",null,(0,r.kt)("tr",null,(0,r.kt)("td",null),(0,r.kt)("td",{align:"center"},"sbt scripts"),(0,r.kt)("td",{align:"center"},"Worksheets"),(0,r.kt)("td",{align:"center"},"Ammonite scripts*"),(0,r.kt)("td",{align:"center"},"Standalone Scala files"))),(0,r.kt)("tbody",null,(0,r.kt)("tr",null,(0,r.kt)("td",null,"Diagnostics"),(0,r.kt)("td",{align:"center"},"\u2705*"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705*")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Goto definition"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Completions"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Hover"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Parameter hints"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Find references"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Run/Debug"),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"})),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Find implementations"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Rename symbol"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Code actions"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Document symbols"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Workspace symbols"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"All symbols are local"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Formatting"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Folding"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Highlight"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Organize imports"),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"})),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Implicit decorations"),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"},"\u2705"),(0,r.kt)("td",{align:"center"},"\u2705")),(0,r.kt)("tr",null,(0,r.kt)("td",null,"Decode file (cfr, semanticdb, tasty, javap)"),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"}),(0,r.kt)("td",{align:"center"})))),(0,r.kt)("p",null,"*"," Note that there are some specific Ammonite features that aren't supported\nlike ",(0,r.kt)("a",{parentName:"p",href:"https://ammonite.io/#Multi-stageScripts"},"multi-stage")," scripts. Currently\nAmmonite support is also limited to Scala 2."),(0,r.kt)("p",null,"*"," Diagnostics for sbt script and standalone Scala files will only show parsing\nerrors, but not diagnostics coming from the compiler."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/main.6a0f58f8.js b/assets/js/main.961a7d07.js similarity index 99% rename from assets/js/main.6a0f58f8.js rename to assets/js/main.961a7d07.js index 4de815bffb5..18fa17a7c9b 100644 --- a/assets/js/main.6a0f58f8.js +++ b/assets/js/main.961a7d07.js @@ -1,2 +1,2 @@ -/*! For license information please see main.6a0f58f8.js.LICENSE.txt */ -(self.webpackChunk=self.webpackChunk||[]).push([[179],{4334:(e,t,n)=>{"use strict";function r(e){var t,n,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;ta});const a=function(){for(var e,t,n=0,a="";n{"use strict";function r(e){var t,n,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;ta});const a=function(){for(var e,t,n=0,a="";n{"use strict";function r(e){var t,n,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;ta});const a=function(){for(var e,t,n=0,a="";n{"use strict";n.d(t,{Z:()=>p});var r=n(7294),a=n(7462),o=n(8356),i=n.n(o),l=n(6887);const s={"00813942":[function(){return n.e(517).then(n.bind(n,6811))},"@site/blog/2022-07-04-aluminium.md?truncated=true",6811],"01456d3b":[function(){return n.e(7099).then(n.t.bind(n,6777,19))},"~blog/default/metals-blog-page-14-de1.json",6777],"01706c44":[function(){return n.e(3315).then(n.bind(n,2665))},"@site/blog/2022-06-03-aluminium.md",2665],"022bb252":[function(){return n.e(5975).then(n.t.bind(n,685,19))},"~blog/default/metals-blog-page-51-bb4.json",685],"03b2a692":[function(){return n.e(5949).then(n.bind(n,4754))},"@site/blog/2021-02-24-tungsten.md",4754],"0529b5a5":[function(){return n.e(6002).then(n.bind(n,5235))},"@site/blog/2021-05-31-tungsten.md",5235],"07ab39c8":[function(){return n.e(8031).then(n.t.bind(n,2218,19))},"~blog/default/metals-blog-page-38-ec7.json",2218],"07c8b2d8":[function(){return n.e(8131).then(n.t.bind(n,2625,19))},"~blog/default/metals-blog-page-33-38b.json",2625],"08b44b83":[function(){return n.e(8821).then(n.bind(n,7e3))},"@site/target/docs/features/scripts.md",7e3],"0beb67bc":[function(){return n.e(7705).then(n.bind(n,7853))},"@site/blog/2020-09-21-lithium.md?truncated=true",7853],"0c130405":[function(){return n.e(198).then(n.t.bind(n,2880,19))},"~blog/default/metals-blog-page-12-a5a.json",2880],"0c485ec1":[function(){return n.e(190).then(n.bind(n,4346))},"@site/blog/2019-09-12-thorium.md?truncated=true",4346],"0d126b35":[function(){return n.e(6622).then(n.t.bind(n,4560,19))},"~blog/default/metals-blog-page-17-c89.json",4560],"0d7cd0de":[function(){return n.e(3164).then(n.bind(n,2410))},"@site/blog/2020-01-10-cobalt.md",2410],"0d8e09e6":[function(){return n.e(2063).then(n.t.bind(n,9246,19))},"~blog/default/metals-blog-page-25-e19.json",9246],"0e2b725e":[function(){return n.e(4256).then(n.t.bind(n,4893,19))},"~blog/default/metals-blog-page-40-1c4.json",4893],"143cbec3":[function(){return n.e(119).then(n.t.bind(n,8681,19))},"~blog/default/metals-blog-page-3-7ee.json",8681],"1512f001":[function(){return n.e(569).then(n.t.bind(n,7893,19))},"~blog/default/metals-blog-page-57-0bb.json",7893],"15b090c7":[function(){return n.e(3214).then(n.t.bind(n,5359,19))},"~blog/default/metals-blog-page-5-02c.json",5359],"17823fa5":[function(){return n.e(3553).then(n.bind(n,2964))},"@site/target/docs/build-tools/mill.md",2964],17896441:[function(){return Promise.all([n.e(532),n.e(394),n.e(7918)]).then(n.bind(n,8945))},"@theme/DocItem",8945],"17a26cd8":[function(){return n.e(2822).then(n.bind(n,8552))},"@site/blog/2020-12-19-lithium.md",8552],"1a1ad967":[function(){return n.e(1977).then(n.bind(n,1217))},"@site/blog/2021-02-24-tungsten.md?truncated=true",1217],"1a4e3797":[function(){return Promise.all([n.e(532),n.e(7920)]).then(n.bind(n,1473))},"@theme/SearchPage",1473],"1a79d8f3":[function(){return n.e(4167).then(n.t.bind(n,9536,19))},"~blog/default/metals-blog-page-41-7a1.json",9536],"1b9d5eae":[function(){return n.e(9624).then(n.bind(n,3483))},"@site/blog/2019-09-23-thorium.md",3483],"1be78505":[function(){return Promise.all([n.e(532),n.e(9514)]).then(n.bind(n,9963))},"@theme/DocPage",9963],"1ed82af1":[function(){return n.e(9135).then(n.bind(n,9735))},"@site/target/docs/features/code-actions.md",9735],"205a1816":[function(){return n.e(8778).then(n.bind(n,345))},"@site/blog/2022-08-10-aluminium.md?truncated=true",345],"2131c61b":[function(){return n.e(8797).then(n.bind(n,6243))},"@site/blog/2020-07-23-configuring-a-client.md?truncated=true",6243],"21dcb4fb":[function(){return n.e(5642).then(n.t.bind(n,6858,19))},"~blog/default/metals-blog-page-50-6cb.json",6858],"2216edbc":[function(){return n.e(9253).then(n.bind(n,5786))},"@site/blog/2018-12-06-iron.md?truncated=true",5786],"22c2c9b0":[function(){return n.e(3980).then(n.t.bind(n,1940,19))},"~blog/default/metals-blog-page-4-20a.json",1940],"2328fd63":[function(){return n.e(9043).then(n.bind(n,4727))},"@site/blog/2020-02-26-cobalt.md?truncated=true",4727],"2387c651":[function(){return n.e(2036).then(n.t.bind(n,2217,19))},"~blog/default/metals-blog-page-30-56d.json",2217],"243d370e":[function(){return n.e(5016).then(n.bind(n,9410))},"@site/blog/2022-04-26-aluminium.md?truncated=true",9410],"25446b1f":[function(){return n.e(3681).then(n.bind(n,1664))},"@site/target/docs/build-tools/maven.md",1664],"26934d81":[function(){return n.e(5264).then(n.bind(n,1791))},"@site/target/docs/build-tools/sbt.md",1791],"27feb48a":[function(){return n.e(3351).then(n.bind(n,9423))},"@site/target/docs/diagrams/instruction.md",9423],28906591:[function(){return n.e(1648).then(n.bind(n,5691))},"@site/target/docs/integrations/new-editor.md",5691],"291a747b":[function(){return n.e(7205).then(n.t.bind(n,6116,19))},"~blog/default/metals-blog-page-18-eff.json",6116],"2c5862c4":[function(){return n.e(4019).then(n.t.bind(n,9499,19))},"~blog/default/metals-blog-page-37-3bb.json",9499],"2d522398":[function(){return n.e(6251).then(n.bind(n,4781))},"@site/blog/2019-02-01-tin.md?truncated=true",4781],"2e1ac853":[function(){return n.e(2041).then(n.t.bind(n,5023,19))},"~blog/default/metals-blog-page-20-935.json",5023],"2ff5ad1b":[function(){return n.e(8840).then(n.bind(n,5212))},"@site/target/docs/integrations/debug-adapter-protocol.md",5212],30083153:[function(){return n.e(7372).then(n.bind(n,7858))},"@site/blog/2023-01-02-aluminium.md?truncated=true",7858],"309b8d38":[function(){return n.e(1753).then(n.bind(n,6263))},"@site/blog/2019-06-11-radium.md?truncated=true",6263],"35bd5843":[function(){return n.e(9632).then(n.bind(n,7297))},"@site/blog/2020-11-06-sbt-BSP-support.md?truncated=true",7297],"36958d65":[function(){return n.e(7429).then(n.t.bind(n,3121,19))},"~blog/default/metals-blog-page-16-975.json",3121],"3839ad99":[function(){return n.e(2882).then(n.bind(n,6355))},"@site/blog/2021-11-03-tungsten.md",6355],"38b82327":[function(){return n.e(6573).then(n.bind(n,730))},"@site/blog/2022-02-23-towards-better-releases.md",730],"39178d36":[function(){return n.e(3710).then(n.bind(n,3007))},"@site/target/docs/editors/online-ides.md",3007],"3cf1e930":[function(){return n.e(4408).then(n.bind(n,9048))},"@site/blog/2020-11-20-lithium.md?truncated=true",9048],"3d6e158a":[function(){return n.e(448).then(n.bind(n,9847))},"@site/blog/2018-12-14-iron.md",9847],"3f977ffc":[function(){return n.e(6469).then(n.bind(n,3830))},"@site/blog/2020-03-19-cobalt.md?truncated=true",3830],"400a1ae3":[function(){return n.e(5014).then(n.bind(n,2141))},"@site/blog/2021-02-02-metals-retro-part1.md",2141],"404bab64":[function(){return n.e(2240).then(n.t.bind(n,1681,19))},"~blog/default/metals-blog-page-54-0ed.json",1681],"432804b2":[function(){return n.e(9191).then(n.bind(n,189))},"@site/target/docs/editors/user-configuration.md",189],"4844a7cd":[function(){return n.e(2975).then(n.bind(n,417))},"@site/blog/2019-01-22-bloom-filters.md",417],"48a1d228":[function(){return n.e(4694).then(n.bind(n,7195))},"@site/blog/2021-02-02-metals-retro-part1.md?truncated=true",7195],49773175:[function(){return n.e(4100).then(n.bind(n,357))},"@site/target/docs/editors/vim.md",357],"4ad5693c":[function(){return n.e(2859).then(n.t.bind(n,1277,19))},"~blog/default/metals-blog-page-6-d90.json",1277],"4af6d88b":[function(){return n.e(8476).then(n.t.bind(n,4247,19))},"~blog/default/metals-blog-page-56-a80.json",4247],"4e26f5de":[function(){return n.e(4015).then(n.bind(n,2748))},"@site/blog/2021-01-19-lithium.md",2748],"508e58e7":[function(){return n.e(9952).then(n.bind(n,7732))},"@site/target/docs/troubleshooting/faq.md",7732],"515fa385":[function(){return n.e(3333).then(n.t.bind(n,9035,19))},"~blog/default/metals-blog-page-15-ac6.json",9035],"5346cb4e":[function(){return n.e(8563).then(n.bind(n,7735))},"@site/blog/2023-07-19-silver.md?truncated=true",7735],"53c82ccc":[function(){return n.e(98).then(n.bind(n,4675))},"@site/blog/2019-04-12-mercury.md?truncated=true",4675],"55a95aa3":[function(){return n.e(48).then(n.bind(n,8175))},"@site/blog/2021-11-03-tungsten.md?truncated=true",8175],"560d1d3c":[function(){return n.e(5890).then(n.bind(n,7830))},"@site/blog/2020-12-19-lithium.md?truncated=true",7830],"56bbb0f8":[function(){return n.e(504).then(n.bind(n,3329))},"@site/blog/2020-02-26-cobalt.md",3329],"56cef870":[function(){return n.e(1566).then(n.bind(n,3947))},"@site/blog/2022-02-23-towards-better-releases.md?truncated=true",3947],"57d9d0fa":[function(){return n.e(5865).then(n.t.bind(n,9775,19))},"~blog/default/metals-blog-page-24-d22.json",9775],"5980cb66":[function(){return n.e(9707).then(n.t.bind(n,9479,19))},"~blog/default/metals-blog-page-13-35f.json",9479],"5d80abc8":[function(){return n.e(9282).then(n.bind(n,9041))},"@site/target/docs/integrations/test-explorer.md",9041],"5d99d17c":[function(){return n.e(9820).then(n.bind(n,2365))},"@site/target/docs/contributors/getting-started.md",2365],"5e9f5e1a":[function(){return Promise.resolve().then(n.bind(n,6809))},"@generated/docusaurus.config",6809],"5ec07b8b":[function(){return n.e(9537).then(n.bind(n,9100))},"@site/blog/2020-09-21-lithium.md",9100],"6079a6bf":[function(){return n.e(490).then(n.bind(n,4191))},"@site/blog/2019-02-01-tin.md",4191],"615063b9":[function(){return n.e(9783).then(n.bind(n,9526))},"@site/blog/2018-12-14-iron.md?truncated=true",9526],"627fd629":[function(){return n.e(6013).then(n.bind(n,4660))},"@site/blog/2021-04-06-tungsten.md?truncated=true",4660],"643c52ed":[function(){return n.e(984).then(n.bind(n,597))},"@site/blog/2020-08-19-lithium.md?truncated=true",597],"64912a2b":[function(){return n.e(3104).then(n.t.bind(n,3813,19))},"~blog/default/metals-blog-page-28-689.json",3813],"64d6e9a7":[function(){return n.e(8377).then(n.bind(n,8593))},"@site/blog/2020-11-26-lithium.md?truncated=true",8593],"6722346e":[function(){return n.e(833).then(n.t.bind(n,7489,19))},"~blog/default/metals-blog-page-26-c9a.json",7489],"674a37b6":[function(){return n.e(7472).then(n.t.bind(n,3330,19))},"~blog/default/metals-blog-page-32-721.json",3330],"6999e097":[function(){return n.e(3282).then(n.bind(n,2203))},"@site/blog/2020-07-15-lithium.md?truncated=true",2203],"6a125964":[function(){return n.e(6466).then(n.bind(n,8040))},"@site/blog/2020-07-01-lithium.md",8040],"6a60bac4":[function(){return n.e(6162).then(n.t.bind(n,815,19))},"~blog/default/metals-blog-page-9-d5d.json",815],"6ea6fc78":[function(){return n.e(6999).then(n.bind(n,9747))},"@site/target/docs/contributors/updating-website.md",9747],"6ed4e313":[function(){return n.e(8607).then(n.t.bind(n,6711,19))},"~blog/default/metals-blog-page-7-2e5.json",6711],"70f9df55":[function(){return n.e(4797).then(n.bind(n,707))},"@site/blog/2019-09-02-thorium.md?truncated=true",707],"71846d42":[function(){return n.e(9777).then(n.bind(n,1400))},"@site/blog/2022-01-12-aluminium.md?truncated=true",1400],"71926bbd":[function(){return n.e(328).then(n.bind(n,4944))},"@site/blog/2020-04-12-mercury.md?truncated=true",4944],"73043cbc":[function(){return n.e(224).then(n.t.bind(n,3381,19))},"~blog/default/metals-blog-page-53-d27.json",3381],"7475f9e7":[function(){return n.e(463).then(n.bind(n,4520))},"@site/blog/2023-04-21-aluminium.md?truncated=true",4520],"74f6f7a6":[function(){return n.e(1295).then(n.bind(n,6742))},"@site/blog/2019-04-12-mercury.md",6742],"752eae27":[function(){return n.e(8984).then(n.bind(n,111))},"@site/blog/2021-10-26-tungsten.md?truncated=true",111],"75d4c63e":[function(){return n.e(3726).then(n.bind(n,4538))},"@site/blog/2019-09-12-thorium.md",4538],"7745fd32":[function(){return n.e(5372).then(n.bind(n,6463))},"@site/blog/2022-04-28-aluminium.md",6463],"77892e30":[function(){return n.e(202).then(n.bind(n,2366))},"@site/blog/2020-11-10-lithium.md?truncated=true",2366],"786192e2":[function(){return n.e(1557).then(n.t.bind(n,4100,19))},"~blog/default/metals-blog-page-58-0c4.json",4100],"794071d8":[function(){return n.e(989).then(n.bind(n,2459))},"@site/blog/2018-12-12-fast-goto-definition.md",2459],79920604:[function(){return n.e(7785).then(n.t.bind(n,8064,19))},"~blog/default/metals-blog-page-35-352.json",8064],"7af95c3c":[function(){return n.e(3470).then(n.t.bind(n,6708,19))},"~blog/default/metals-blog-page-19-203.json",6708],"7c0269a6":[function(){return n.e(5430).then(n.t.bind(n,1494,19))},"~blog/default/metals-blog-page-34-212.json",1494],"7d4f68c1":[function(){return n.e(1733).then(n.bind(n,2589))},"@site/blog/2018-12-06-iron.md",2589],"7d61c055":[function(){return n.e(6583).then(n.bind(n,3597))},"@site/target/docs/build-tools/overview.md",3597],"7ea62e57":[function(){return n.e(9774).then(n.t.bind(n,9375,19))},"~blog/default/metals-blog-page-10-3da.json",9375],"801caf39":[function(){return n.e(5561).then(n.bind(n,6049))},"@site/blog/2021-05-17-tungsten.md?truncated=true",6049],"80d94b51":[function(){return n.e(2884).then(n.bind(n,7018))},"@site/blog/2019-09-02-thorium.md",7018],"814f3328":[function(){return n.e(2535).then(n.t.bind(n,5641,19))},"~blog/default/blog-post-list-prop-default.json",5641],"81c1ce9e":[function(){return n.e(5061).then(n.bind(n,7526))},"@site/blog/2022-07-04-aluminium.md",7526],"82e8fb15":[function(){return n.e(2010).then(n.bind(n,463))},"@site/blog/2020-08-19-lithium.md",463],"88d8e9a5":[function(){return n.e(6776).then(n.bind(n,2368))},"@site/blog/2021-10-26-tungsten.md",2368],"8947246e":[function(){return n.e(5130).then(n.bind(n,8152))},"@site/blog/2020-07-15-lithium.md",8152],"8a0b8ece":[function(){return n.e(4782).then(n.bind(n,1344))},"@site/target/docs/editors/sublime.md",1344],"8b7e7f73":[function(){return n.e(8933).then(n.bind(n,4572))},"@site/blog/2018-12-12-fast-goto-definition.md?truncated=true",4572],"8ead6264":[function(){return n.e(4391).then(n.bind(n,3567))},"@site/blog/2021-05-31-tungsten.md?truncated=true",3567],"8f9f6130":[function(){return n.e(1667).then(n.bind(n,3305))},"@site/blog/2022-06-03-aluminium.md?truncated=true",3305],"905a60c6":[function(){return n.e(5518).then(n.bind(n,2894))},"@site/target/docs/troubleshooting/proxy.md",2894],"9349bfb9":[function(){return n.e(2287).then(n.bind(n,3775))},"@site/blog/2020-11-26-lithium.md",3775],"935f2afb":[function(){return n.e(53).then(n.t.bind(n,1109,19))},"~docs/default/version-current-metadata-prop-751.json",1109],"94015cb6":[function(){return n.e(6520).then(n.bind(n,6761))},"@site/target/docs/editors/emacs.md",6761],"94cc8923":[function(){return n.e(8059).then(n.bind(n,3410))},"@site/blog/2022-04-27-aluminium.md?truncated=true",3410],"96a3e035":[function(){return n.e(6499).then(n.bind(n,7407))},"@site/blog/2022-04-26-aluminium.md",7407],"970a5f4e":[function(){return n.e(6561).then(n.bind(n,4755))},"@site/target/docs/editors/vscode.md",4755],"97ce67ef":[function(){return n.e(4839).then(n.t.bind(n,8076,19))},"~blog/default/metals-blog-page-44-066.json",8076],"995bfa6d":[function(){return n.e(9242).then(n.t.bind(n,7851,19))},"~blog/default/metals-blog-page-31-e79.json",7851],"99d3dc3a":[function(){return n.e(713).then(n.bind(n,2265))},"@site/blog/2019-09-23-thorium.md?truncated=true",2265],"99d7db30":[function(){return n.e(382).then(n.bind(n,2977))},"@site/blog/2019-04-26-mercury.md?truncated=true",2977],"9a20f037":[function(){return n.e(8978).then(n.bind(n,6639))},"@site/blog/2022-04-28-aluminium.md?truncated=true",6639],"9a7faebf":[function(){return n.e(2174).then(n.t.bind(n,3704,19))},"~blog/default/metals-blog-page-2-4e4.json",3704],"9ae6eeaa":[function(){return n.e(3737).then(n.bind(n,9982))},"@site/blog/2019-01-22-bloom-filters.md?truncated=true",9982],"9b49e051":[function(){return n.e(3621).then(n.bind(n,4817))},"@site/target/docs/integrations/new-build-tool.md",4817],"9b4a23be":[function(){return n.e(5688).then(n.bind(n,8731))},"@site/target/docs/editors/overview.md",8731],"9e4087bc":[function(){return n.e(3608).then(n.bind(n,3169))},"@theme/BlogArchivePage",3169],"9ea6b57a":[function(){return n.e(3740).then(n.bind(n,996))},"@site/target/docs/integrations/decoration-protocol.md",996],a1f1bc88:[function(){return n.e(9567).then(n.bind(n,3393))},"@site/target/docs/integrations/tree-view-protocol.md",3393],a4b63d05:[function(){return n.e(3733).then(n.t.bind(n,4236,19))},"~blog/default/metals-blog-page-43-574.json",4236],a4c9fa90:[function(){return n.e(7602).then(n.bind(n,1295))},"@site/blog/2020-11-06-sbt-BSP-support.md",1295],a64b4ddf:[function(){return n.e(4583).then(n.bind(n,782))},"@site/blog/2020-11-20-lithium.md",782],a6aa9e1f:[function(){return Promise.all([n.e(532),n.e(394),n.e(6048),n.e(3089)]).then(n.bind(n,3269))},"@theme/BlogListPage",3269],a81ab01c:[function(){return n.e(9981).then(n.t.bind(n,793,19))},"~blog/default/metals-blog-page-8-b21.json",793],a91b50a6:[function(){return n.e(9641).then(n.t.bind(n,5646,19))},"~blog/default/metals-blog-page-55-048.json",5646],a935f661:[function(){return n.e(1239).then(n.t.bind(n,1612,19))},"~blog/default/metals-blog-page-46-b19.json",1612],ab2e7d85:[function(){return n.e(5359).then(n.bind(n,5507))},"@site/blog/2019-06-28-thorium.md",5507],abf165a1:[function(){return n.e(1976).then(n.bind(n,8932))},"@site/blog/2020-07-01-lithium.md?truncated=true",8932],ac2e449c:[function(){return n.e(4307).then(n.bind(n,205))},"@site/blog/2019-01-24-tin.md?truncated=true",205],ad29d74f:[function(){return n.e(7031).then(n.bind(n,4419))},"@site/blog/2021-09-06-tungsten.md?truncated=true",4419],ad57a4da:[function(){return n.e(2847).then(n.bind(n,9340))},"@site/blog/2020-04-12-mercury.md",9340],adb52a11:[function(){return n.e(9959).then(n.bind(n,8149))},"@site/target/docs/contributors/releasing.md",8149],adce20d1:[function(){return n.e(9505).then(n.t.bind(n,1050,19))},"~blog/default/metals-blog-page-39-273.json",1050],af8d2261:[function(){return n.e(2604).then(n.bind(n,6633))},"@site/blog/2021-09-06-tungsten.md",6633],b04d5738:[function(){return n.e(1457).then(n.bind(n,1613))},"@site/blog/2019-06-28-thorium.md?truncated=true",1613],b0577adc:[function(){return n.e(9026).then(n.bind(n,3958))},"@site/blog/2020-03-19-cobalt.md",3958],b28f3685:[function(){return n.e(3707).then(n.bind(n,4705))},"@site/blog/2019-06-11-radium.md",4705],b3904d08:[function(){return n.e(7528).then(n.bind(n,6450))},"@site/blog/2022-01-17-aluminium.md",6450],b54e7820:[function(){return n.e(9766).then(n.t.bind(n,6717,19))},"~blog/default/metals-blog-page-23-a00.json",6717],b79c2638:[function(){return n.e(7769).then(n.bind(n,2557))},"@site/target/docs/build-tools/gradle.md",2557],bb177581:[function(){return n.e(4663).then(n.bind(n,5931))},"@site/blog/2023-01-02-aluminium.md",5931],bc8294f9:[function(){return n.e(2665).then(n.bind(n,9146))},"@site/blog/2022-10-06-aluminium.md",9146],bcb36622:[function(){return n.e(9748).then(n.bind(n,7088))},"@site/blog/2022-03-08-aluminium.md?truncated=true",7088],bd301d6b:[function(){return n.e(6596).then(n.bind(n,7263))},"@site/blog/2021-07-14-tungsten.md?truncated=true",7263],bd78ee39:[function(){return n.e(9732).then(n.t.bind(n,1529,19))},"~blog/default/metals-blog-eef.json",1529],bdbe54cc:[function(){return n.e(9423).then(n.t.bind(n,3877,19))},"~blog/default/metals-blog-page-27-3d6.json",3877],bdc47ac0:[function(){return n.e(1157).then(n.bind(n,2630))},"@site/blog/2020-11-10-lithium.md",2630],bdea20ec:[function(){return n.e(1181).then(n.bind(n,3283))},"@site/blog/2021-09-16-tungsten.md",3283],bfd27103:[function(){return n.e(867).then(n.bind(n,2602))},"@site/blog/2022-03-08-aluminium.md",2602],c278e024:[function(){return n.e(1046).then(n.bind(n,1356))},"@site/blog/2020-05-04-lithium.md?truncated=true",1356],c4083f57:[function(){return n.e(4766).then(n.t.bind(n,1285,19))},"~blog/default/metals-blog-page-29-2a4.json",1285],c424153c:[function(){return n.e(2994).then(n.bind(n,7239))},"@site/blog/2020-04-10-cobalt.md",7239],c4f5d8e4:[function(){return n.e(4195).then(n.bind(n,2841))},"@site/src/pages/index.js",2841],c64e8655:[function(){return n.e(8784).then(n.bind(n,5579))},"@site/target/docs/contributors/project-goals.md",5579],c6da16b1:[function(){return n.e(7696).then(n.t.bind(n,6964,19))},"~blog/default/metals-blog-page-36-aa5.json",6964],c7875d0d:[function(){return n.e(758).then(n.bind(n,4409))},"@site/blog/2023-08-28-silver.md",4409],cabfa371:[function(){return n.e(4073).then(n.bind(n,4895))},"@site/blog/2022-01-12-aluminium.md",4895],cb899f97:[function(){return n.e(2057).then(n.t.bind(n,2310,19))},"~blog/default/metals-blog-page-42-d3a.json",2310],cc1c03c7:[function(){return n.e(8313).then(n.bind(n,1089))},"@site/blog/2023-03-02-aluminium.md?truncated=true",1089],cc709768:[function(){return n.e(8858).then(n.bind(n,7296))},"@site/blog/2021-01-19-lithium.md?truncated=true",7296],ccc49370:[function(){return Promise.all([n.e(532),n.e(394),n.e(6048),n.e(6103)]).then(n.bind(n,5203))},"@theme/BlogPostPage",5203],cfe9f849:[function(){return n.e(4117).then(n.bind(n,8262))},"@site/blog/2020-05-04-lithium.md",8262],d11fc459:[function(){return n.e(5780).then(n.bind(n,727))},"@site/blog/2021-04-20-tungsten.md?truncated=true",727],d24c97fd:[function(){return n.e(8255).then(n.bind(n,3051))},"@site/blog/2022-04-27-aluminium.md",3051],d3dc0327:[function(){return n.e(6105).then(n.bind(n,5563))},"@site/blog/2020-01-10-cobalt.md?truncated=true",5563],d4d282d4:[function(){return n.e(6373).then(n.bind(n,4414))},"@site/blog/2022-10-06-aluminium.md?truncated=true",4414],d7024f94:[function(){return n.e(8180).then(n.t.bind(n,2379,19))},"~blog/default/metals-blog-page-11-d73.json",2379],d8176b79:[function(){return n.e(1650).then(n.t.bind(n,5745,19))},"/home/runner/work/metals/metals/website/.docusaurus/docusaurus-plugin-content-pages/default/plugin-route-context-module-100.json",5745],d8beb153:[function(){return n.e(9604).then(n.bind(n,9796))},"@site/blog/2023-07-17-workspace-folders.md",9796],d8cf581d:[function(){return n.e(3290).then(n.t.bind(n,2776,19))},"/home/runner/work/metals/metals/website/.docusaurus/@easyops-cn/docusaurus-search-local/default/plugin-route-context-module-100.json",2776],d94b0c5c:[function(){return n.e(7792).then(n.bind(n,2262))},"@site/blog/2021-05-17-tungsten.md",2262],da363e62:[function(){return n.e(5555).then(n.t.bind(n,7688,19))},"~blog/default/metals-blog-archive-d94.json",7688],db18f655:[function(){return n.e(4372).then(n.bind(n,607))},"@site/blog/2023-03-02-aluminium.md",607],dc0c48b3:[function(){return n.e(8534).then(n.bind(n,761))},"@site/blog/2020-07-23-configuring-a-client.md",761],dd4c9461:[function(){return n.e(8225).then(n.bind(n,7911))},"@site/blog/2023-04-21-aluminium.md",7911],df53e5ec:[function(){return n.e(450).then(n.bind(n,6093))},"@site/blog/2023-07-17-workspace-folders.md?truncated=true",6093],e2e5f5d1:[function(){return n.e(363).then(n.bind(n,6625))},"@site/blog/2022-01-17-aluminium.md?truncated=true",6625],e38d6f3f:[function(){return n.e(4355).then(n.t.bind(n,1863,19))},"~blog/default/metals-blog-page-22-3e0.json",1863],e68a2502:[function(){return n.e(6290).then(n.bind(n,6810))},"@site/blog/2019-04-26-mercury.md",6810],e82430ca:[function(){return n.e(5411).then(n.t.bind(n,2121,19))},"~blog/default/metals-blog-page-47-8cb.json",2121],e879be1f:[function(){return n.e(7591).then(n.t.bind(n,6213,19))},"~blog/default/metals-blog-page-45-113.json",6213],e882c012:[function(){return n.e(6275).then(n.bind(n,4102))},"@site/blog/2019-01-24-tin.md",4102],e8c5917f:[function(){return n.e(6633).then(n.bind(n,203))},"@site/blog/2022-08-10-aluminium.md",203],e9356b00:[function(){return n.e(608).then(n.bind(n,5800))},"@site/blog/2021-04-20-tungsten.md",5800],eac4f91f:[function(){return n.e(3808).then(n.t.bind(n,3808,19))},"~blog/default/metals-blog-page-52-e3a.json",3808],eae80572:[function(){return n.e(7457).then(n.bind(n,2470))},"@site/blog/2021-04-06-tungsten.md",2470],ed7c6679:[function(){return n.e(9025).then(n.bind(n,3463))},"@site/blog/2020-04-10-cobalt.md?truncated=true",3463],ef440da7:[function(){return n.e(2172).then(n.t.bind(n,4469,19))},"/home/runner/work/metals/metals/website/.docusaurus/docusaurus-plugin-content-blog/default/plugin-route-context-module-100.json",4469],ef96a7a2:[function(){return n.e(600).then(n.t.bind(n,3769,19))},"/home/runner/work/metals/metals/website/.docusaurus/docusaurus-plugin-content-docs/default/plugin-route-context-module-100.json",3769],f0507210:[function(){return n.e(9289).then(n.bind(n,2761))},"@site/target/docs/integrations/remote-language-server.md",2761],f1a7d268:[function(){return n.e(1228).then(n.bind(n,5761))},"@site/blog/2021-09-16-tungsten.md?truncated=true",5761],f3503827:[function(){return n.e(3827).then(n.bind(n,4506))},"@site/target/docs/build-tools/bloop.md",4506],f78a808a:[function(){return n.e(7962).then(n.bind(n,2886))},"@site/blog/2023-08-28-silver.md?truncated=true",2886],f87b843d:[function(){return n.e(2726).then(n.t.bind(n,6272,19))},"~blog/default/metals-blog-page-49-a73.json",6272],f9150bb6:[function(){return n.e(50).then(n.t.bind(n,1455,19))},"~blog/default/metals-blog-page-48-2f5.json",1455],f922820e:[function(){return n.e(4807).then(n.bind(n,4239))},"@site/blog/2023-07-19-silver.md",4239],fb11efee:[function(){return n.e(3758).then(n.t.bind(n,8027,19))},"~blog/default/metals-blog-page-21-4bb.json",8027],fda909f7:[function(){return n.e(7631).then(n.bind(n,7318))},"@site/blog/2021-07-14-tungsten.md",7318]};function u(e){var t=e.error,n=e.retry,a=e.pastDelay;return t?r.createElement("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"}},r.createElement("p",null,String(t)),r.createElement("div",null,r.createElement("button",{type:"button",onClick:n},"Retry"))):a?r.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"}},r.createElement("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb"},r.createElement("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2"},r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"8"},r.createElement("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"}))))):null}var c=n(9670),d=n(226);function f(e,t){if("*"===e)return i()({loading:u,loader:function(){return n.e(4972).then(n.bind(n,4972))},modules:["@theme/NotFound"],webpack:function(){return[4972]},render:function(e,t){var n=e.default;return r.createElement(d.z,{value:{plugin:{name:"native",id:"default"}}},r.createElement(n,t))}});var o=l[e+"-"+t],f={},p=[],m=[],g=(0,c.Z)(o);return Object.entries(g).forEach((function(e){var t=e[0],n=e[1],r=s[n];r&&(f[t]=r[0],p.push(r[1]),m.push(r[2]))})),i().Map({loading:u,loader:f,modules:p,webpack:function(){return m},render:function(t,n){var i=JSON.parse(JSON.stringify(o));Object.entries(t).forEach((function(t){var n=t[0],r=t[1],a=r.default;if(!a)throw new Error("The page component at "+e+" doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.");"object"!=typeof a&&"function"!=typeof a||Object.keys(r).filter((function(e){return"default"!==e})).forEach((function(e){a[e]=r[e]}));var o=i,l=n.split(".");l.slice(0,-1).forEach((function(e){o=o[e]})),o[l[l.length-1]]=a}));var l=i.__comp;delete i.__comp;var s=i.__context;return delete i.__context,r.createElement(d.z,{value:s},r.createElement(l,(0,a.Z)({},i,n)))}})}const p=[{path:"/metals/blog",component:f("/metals/blog","d6a"),exact:!0},{path:"/metals/blog/2018/12/06/iron",component:f("/metals/blog/2018/12/06/iron","935"),exact:!0},{path:"/metals/blog/2018/12/12/fast-goto-definition",component:f("/metals/blog/2018/12/12/fast-goto-definition","7cc"),exact:!0},{path:"/metals/blog/2018/12/14/iron",component:f("/metals/blog/2018/12/14/iron","36f"),exact:!0},{path:"/metals/blog/2019/01/22/bloom-filters",component:f("/metals/blog/2019/01/22/bloom-filters","208"),exact:!0},{path:"/metals/blog/2019/01/24/tin",component:f("/metals/blog/2019/01/24/tin","c8d"),exact:!0},{path:"/metals/blog/2019/02/01/tin",component:f("/metals/blog/2019/02/01/tin","872"),exact:!0},{path:"/metals/blog/2019/04/12/mercury",component:f("/metals/blog/2019/04/12/mercury","9d1"),exact:!0},{path:"/metals/blog/2019/04/26/mercury",component:f("/metals/blog/2019/04/26/mercury","f9e"),exact:!0},{path:"/metals/blog/2019/06/11/radium",component:f("/metals/blog/2019/06/11/radium","294"),exact:!0},{path:"/metals/blog/2019/06/28/thorium",component:f("/metals/blog/2019/06/28/thorium","c3d"),exact:!0},{path:"/metals/blog/2019/09/02/thorium",component:f("/metals/blog/2019/09/02/thorium","db9"),exact:!0},{path:"/metals/blog/2019/09/12/thorium",component:f("/metals/blog/2019/09/12/thorium","139"),exact:!0},{path:"/metals/blog/2019/09/23/thorium",component:f("/metals/blog/2019/09/23/thorium","456"),exact:!0},{path:"/metals/blog/2020/01/10/cobalt",component:f("/metals/blog/2020/01/10/cobalt","821"),exact:!0},{path:"/metals/blog/2020/02/26/cobalt",component:f("/metals/blog/2020/02/26/cobalt","765"),exact:!0},{path:"/metals/blog/2020/03/19/cobalt",component:f("/metals/blog/2020/03/19/cobalt","b1c"),exact:!0},{path:"/metals/blog/2020/04/10/cobalt",component:f("/metals/blog/2020/04/10/cobalt","e65"),exact:!0},{path:"/metals/blog/2020/04/12/mercury",component:f("/metals/blog/2020/04/12/mercury","aee"),exact:!0},{path:"/metals/blog/2020/05/04/lithium",component:f("/metals/blog/2020/05/04/lithium","b0e"),exact:!0},{path:"/metals/blog/2020/07/01/lithium",component:f("/metals/blog/2020/07/01/lithium","388"),exact:!0},{path:"/metals/blog/2020/07/15/lithium",component:f("/metals/blog/2020/07/15/lithium","993"),exact:!0},{path:"/metals/blog/2020/07/23/configuring-a-client",component:f("/metals/blog/2020/07/23/configuring-a-client","21c"),exact:!0},{path:"/metals/blog/2020/08/19/lithium",component:f("/metals/blog/2020/08/19/lithium","5ac"),exact:!0},{path:"/metals/blog/2020/09/21/lithium",component:f("/metals/blog/2020/09/21/lithium","8f1"),exact:!0},{path:"/metals/blog/2020/11/06/sbt-BSP-support",component:f("/metals/blog/2020/11/06/sbt-BSP-support","080"),exact:!0},{path:"/metals/blog/2020/11/10/lithium",component:f("/metals/blog/2020/11/10/lithium","fb8"),exact:!0},{path:"/metals/blog/2020/11/20/lithium",component:f("/metals/blog/2020/11/20/lithium","4c6"),exact:!0},{path:"/metals/blog/2020/11/26/lithium",component:f("/metals/blog/2020/11/26/lithium","0bc"),exact:!0},{path:"/metals/blog/2020/12/19/lithium",component:f("/metals/blog/2020/12/19/lithium","749"),exact:!0},{path:"/metals/blog/2021/01/19/lithium",component:f("/metals/blog/2021/01/19/lithium","596"),exact:!0},{path:"/metals/blog/2021/02/02/metals-retro-part1",component:f("/metals/blog/2021/02/02/metals-retro-part1","0a1"),exact:!0},{path:"/metals/blog/2021/02/24/tungsten",component:f("/metals/blog/2021/02/24/tungsten","c0d"),exact:!0},{path:"/metals/blog/2021/04/06/tungsten",component:f("/metals/blog/2021/04/06/tungsten","4b8"),exact:!0},{path:"/metals/blog/2021/04/20/tungsten",component:f("/metals/blog/2021/04/20/tungsten","949"),exact:!0},{path:"/metals/blog/2021/05/17/tungsten",component:f("/metals/blog/2021/05/17/tungsten","57d"),exact:!0},{path:"/metals/blog/2021/05/31/tungsten",component:f("/metals/blog/2021/05/31/tungsten","daf"),exact:!0},{path:"/metals/blog/2021/07/14/tungsten",component:f("/metals/blog/2021/07/14/tungsten","824"),exact:!0},{path:"/metals/blog/2021/09/06/tungsten",component:f("/metals/blog/2021/09/06/tungsten","fc2"),exact:!0},{path:"/metals/blog/2021/09/16/tungsten",component:f("/metals/blog/2021/09/16/tungsten","4f3"),exact:!0},{path:"/metals/blog/2021/10/26/tungsten",component:f("/metals/blog/2021/10/26/tungsten","f60"),exact:!0},{path:"/metals/blog/2021/11/03/tungsten",component:f("/metals/blog/2021/11/03/tungsten","7de"),exact:!0},{path:"/metals/blog/2022/01/12/aluminium",component:f("/metals/blog/2022/01/12/aluminium","0c3"),exact:!0},{path:"/metals/blog/2022/01/17/aluminium",component:f("/metals/blog/2022/01/17/aluminium","b4d"),exact:!0},{path:"/metals/blog/2022/02/23/towards-better-releases",component:f("/metals/blog/2022/02/23/towards-better-releases","510"),exact:!0},{path:"/metals/blog/2022/03/08/aluminium",component:f("/metals/blog/2022/03/08/aluminium","3df"),exact:!0},{path:"/metals/blog/2022/04/26/aluminium",component:f("/metals/blog/2022/04/26/aluminium","9db"),exact:!0},{path:"/metals/blog/2022/04/27/aluminium",component:f("/metals/blog/2022/04/27/aluminium","1e7"),exact:!0},{path:"/metals/blog/2022/04/28/aluminium",component:f("/metals/blog/2022/04/28/aluminium","91e"),exact:!0},{path:"/metals/blog/2022/06/03/aluminium",component:f("/metals/blog/2022/06/03/aluminium","0e3"),exact:!0},{path:"/metals/blog/2022/07/04/aluminium",component:f("/metals/blog/2022/07/04/aluminium","76f"),exact:!0},{path:"/metals/blog/2022/08/10/aluminium",component:f("/metals/blog/2022/08/10/aluminium","f97"),exact:!0},{path:"/metals/blog/2022/10/06/aluminium",component:f("/metals/blog/2022/10/06/aluminium","b38"),exact:!0},{path:"/metals/blog/2023/01/02/aluminium",component:f("/metals/blog/2023/01/02/aluminium","289"),exact:!0},{path:"/metals/blog/2023/03/02/aluminium",component:f("/metals/blog/2023/03/02/aluminium","aef"),exact:!0},{path:"/metals/blog/2023/04/21/aluminium",component:f("/metals/blog/2023/04/21/aluminium","eb5"),exact:!0},{path:"/metals/blog/2023/07/17/workspace-folders",component:f("/metals/blog/2023/07/17/workspace-folders","2c8"),exact:!0},{path:"/metals/blog/2023/07/19/silver",component:f("/metals/blog/2023/07/19/silver","eb6"),exact:!0},{path:"/metals/blog/2023/08/28/silver",component:f("/metals/blog/2023/08/28/silver","7a2"),exact:!0},{path:"/metals/blog/archive",component:f("/metals/blog/archive","857"),exact:!0},{path:"/metals/blog/page/10",component:f("/metals/blog/page/10","b68"),exact:!0},{path:"/metals/blog/page/11",component:f("/metals/blog/page/11","a92"),exact:!0},{path:"/metals/blog/page/12",component:f("/metals/blog/page/12","3e4"),exact:!0},{path:"/metals/blog/page/13",component:f("/metals/blog/page/13","766"),exact:!0},{path:"/metals/blog/page/14",component:f("/metals/blog/page/14","323"),exact:!0},{path:"/metals/blog/page/15",component:f("/metals/blog/page/15","0e4"),exact:!0},{path:"/metals/blog/page/16",component:f("/metals/blog/page/16","709"),exact:!0},{path:"/metals/blog/page/17",component:f("/metals/blog/page/17","c6f"),exact:!0},{path:"/metals/blog/page/18",component:f("/metals/blog/page/18","ff3"),exact:!0},{path:"/metals/blog/page/19",component:f("/metals/blog/page/19","e6e"),exact:!0},{path:"/metals/blog/page/2",component:f("/metals/blog/page/2","27f"),exact:!0},{path:"/metals/blog/page/20",component:f("/metals/blog/page/20","8bf"),exact:!0},{path:"/metals/blog/page/21",component:f("/metals/blog/page/21","0a8"),exact:!0},{path:"/metals/blog/page/22",component:f("/metals/blog/page/22","ee9"),exact:!0},{path:"/metals/blog/page/23",component:f("/metals/blog/page/23","4a3"),exact:!0},{path:"/metals/blog/page/24",component:f("/metals/blog/page/24","d59"),exact:!0},{path:"/metals/blog/page/25",component:f("/metals/blog/page/25","318"),exact:!0},{path:"/metals/blog/page/26",component:f("/metals/blog/page/26","8c6"),exact:!0},{path:"/metals/blog/page/27",component:f("/metals/blog/page/27","0f1"),exact:!0},{path:"/metals/blog/page/28",component:f("/metals/blog/page/28","0f7"),exact:!0},{path:"/metals/blog/page/29",component:f("/metals/blog/page/29","1d8"),exact:!0},{path:"/metals/blog/page/3",component:f("/metals/blog/page/3","657"),exact:!0},{path:"/metals/blog/page/30",component:f("/metals/blog/page/30","373"),exact:!0},{path:"/metals/blog/page/31",component:f("/metals/blog/page/31","479"),exact:!0},{path:"/metals/blog/page/32",component:f("/metals/blog/page/32","400"),exact:!0},{path:"/metals/blog/page/33",component:f("/metals/blog/page/33","33e"),exact:!0},{path:"/metals/blog/page/34",component:f("/metals/blog/page/34","11c"),exact:!0},{path:"/metals/blog/page/35",component:f("/metals/blog/page/35","555"),exact:!0},{path:"/metals/blog/page/36",component:f("/metals/blog/page/36","b80"),exact:!0},{path:"/metals/blog/page/37",component:f("/metals/blog/page/37","b60"),exact:!0},{path:"/metals/blog/page/38",component:f("/metals/blog/page/38","815"),exact:!0},{path:"/metals/blog/page/39",component:f("/metals/blog/page/39","72a"),exact:!0},{path:"/metals/blog/page/4",component:f("/metals/blog/page/4","261"),exact:!0},{path:"/metals/blog/page/40",component:f("/metals/blog/page/40","a32"),exact:!0},{path:"/metals/blog/page/41",component:f("/metals/blog/page/41","ad0"),exact:!0},{path:"/metals/blog/page/42",component:f("/metals/blog/page/42","c48"),exact:!0},{path:"/metals/blog/page/43",component:f("/metals/blog/page/43","d42"),exact:!0},{path:"/metals/blog/page/44",component:f("/metals/blog/page/44","bc2"),exact:!0},{path:"/metals/blog/page/45",component:f("/metals/blog/page/45","b2d"),exact:!0},{path:"/metals/blog/page/46",component:f("/metals/blog/page/46","a55"),exact:!0},{path:"/metals/blog/page/47",component:f("/metals/blog/page/47","22d"),exact:!0},{path:"/metals/blog/page/48",component:f("/metals/blog/page/48","e6d"),exact:!0},{path:"/metals/blog/page/49",component:f("/metals/blog/page/49","470"),exact:!0},{path:"/metals/blog/page/5",component:f("/metals/blog/page/5","4db"),exact:!0},{path:"/metals/blog/page/50",component:f("/metals/blog/page/50","bc9"),exact:!0},{path:"/metals/blog/page/51",component:f("/metals/blog/page/51","6e7"),exact:!0},{path:"/metals/blog/page/52",component:f("/metals/blog/page/52","319"),exact:!0},{path:"/metals/blog/page/53",component:f("/metals/blog/page/53","f9e"),exact:!0},{path:"/metals/blog/page/54",component:f("/metals/blog/page/54","3d9"),exact:!0},{path:"/metals/blog/page/55",component:f("/metals/blog/page/55","1e8"),exact:!0},{path:"/metals/blog/page/56",component:f("/metals/blog/page/56","68f"),exact:!0},{path:"/metals/blog/page/57",component:f("/metals/blog/page/57","7e9"),exact:!0},{path:"/metals/blog/page/58",component:f("/metals/blog/page/58","957"),exact:!0},{path:"/metals/blog/page/6",component:f("/metals/blog/page/6","277"),exact:!0},{path:"/metals/blog/page/7",component:f("/metals/blog/page/7","700"),exact:!0},{path:"/metals/blog/page/8",component:f("/metals/blog/page/8","2fc"),exact:!0},{path:"/metals/blog/page/9",component:f("/metals/blog/page/9","1fd"),exact:!0},{path:"/metals/search",component:f("/metals/search","b6a"),exact:!0},{path:"/metals/docs",component:f("/metals/docs","c9d"),routes:[{path:"/metals/docs/",component:f("/metals/docs/","436"),exact:!0,sidebar:"docs"},{path:"/metals/docs/build-tools/bloop",component:f("/metals/docs/build-tools/bloop","89f"),exact:!0,sidebar:"docs"},{path:"/metals/docs/build-tools/gradle",component:f("/metals/docs/build-tools/gradle","7ea"),exact:!0,sidebar:"docs"},{path:"/metals/docs/build-tools/maven",component:f("/metals/docs/build-tools/maven","d5a"),exact:!0,sidebar:"docs"},{path:"/metals/docs/build-tools/mill",component:f("/metals/docs/build-tools/mill","ec6"),exact:!0,sidebar:"docs"},{path:"/metals/docs/build-tools/overview",component:f("/metals/docs/build-tools/overview","1fd"),exact:!0,sidebar:"docs"},{path:"/metals/docs/build-tools/sbt",component:f("/metals/docs/build-tools/sbt","fee"),exact:!0,sidebar:"docs"},{path:"/metals/docs/contributors/getting-started",component:f("/metals/docs/contributors/getting-started","31b"),exact:!0,sidebar:"docs"},{path:"/metals/docs/contributors/project-goals",component:f("/metals/docs/contributors/project-goals","46c"),exact:!0,sidebar:"docs"},{path:"/metals/docs/contributors/releasing",component:f("/metals/docs/contributors/releasing","550"),exact:!0,sidebar:"docs"},{path:"/metals/docs/contributors/updating-website",component:f("/metals/docs/contributors/updating-website","918"),exact:!0,sidebar:"docs"},{path:"/metals/docs/diagrams/instruction",component:f("/metals/docs/diagrams/instruction","f59"),exact:!0},{path:"/metals/docs/editors/emacs",component:f("/metals/docs/editors/emacs","a6f"),exact:!0,sidebar:"docs"},{path:"/metals/docs/editors/online-ides",component:f("/metals/docs/editors/online-ides","00b"),exact:!0,sidebar:"docs"},{path:"/metals/docs/editors/sublime",component:f("/metals/docs/editors/sublime","921"),exact:!0,sidebar:"docs"},{path:"/metals/docs/editors/user-configuration",component:f("/metals/docs/editors/user-configuration","154"),exact:!0,sidebar:"docs"},{path:"/metals/docs/editors/vim",component:f("/metals/docs/editors/vim","06e"),exact:!0,sidebar:"docs"},{path:"/metals/docs/editors/vscode",component:f("/metals/docs/editors/vscode","fa2"),exact:!0,sidebar:"docs"},{path:"/metals/docs/features/codeactions",component:f("/metals/docs/features/codeactions","306"),exact:!0,sidebar:"docs"},{path:"/metals/docs/features/scripts",component:f("/metals/docs/features/scripts","6c5"),exact:!0,sidebar:"docs"},{path:"/metals/docs/integrations/debug-adapter-protocol",component:f("/metals/docs/integrations/debug-adapter-protocol","899"),exact:!0,sidebar:"docs"},{path:"/metals/docs/integrations/decoration-protocol",component:f("/metals/docs/integrations/decoration-protocol","9ed"),exact:!0,sidebar:"docs"},{path:"/metals/docs/integrations/new-build-tool",component:f("/metals/docs/integrations/new-build-tool","332"),exact:!0,sidebar:"docs"},{path:"/metals/docs/integrations/new-editor",component:f("/metals/docs/integrations/new-editor","3f0"),exact:!0,sidebar:"docs"},{path:"/metals/docs/integrations/remote-language-server",component:f("/metals/docs/integrations/remote-language-server","c40"),exact:!0,sidebar:"docs"},{path:"/metals/docs/integrations/test-explorer",component:f("/metals/docs/integrations/test-explorer","afb"),exact:!0,sidebar:"docs"},{path:"/metals/docs/integrations/tree-view-protocol",component:f("/metals/docs/integrations/tree-view-protocol","33c"),exact:!0,sidebar:"docs"},{path:"/metals/docs/troubleshooting/faq",component:f("/metals/docs/troubleshooting/faq","261"),exact:!0,sidebar:"docs"},{path:"/metals/docs/troubleshooting/proxy",component:f("/metals/docs/troubleshooting/proxy","4bf"),exact:!0,sidebar:"docs"}]},{path:"/metals/",component:f("/metals/","925"),exact:!0},{path:"*",component:f("*")}]},8934:(e,t,n)=>{"use strict";n.d(t,{_:()=>a,t:()=>o});var r=n(7294),a=r.createContext(!1);function o(e){var t=e.children,n=(0,r.useState)(!1),o=n[0],i=n[1];return(0,r.useEffect)((function(){i(!0)}),[]),r.createElement(a.Provider,{value:o},t)}},7221:(e,t,n)=>{"use strict";var r=n(7294),a=n(3935),o=n(3727),i=n(405),l=n(412);const s=[n(6657),n(2497),n(3310),n(8320),n(7253)];var u=n(723),c=n(6550),d=n(8790);function f(e){var t=e.children;return r.createElement(r.Fragment,null,t)}var p=n(7462),m=n(5742),g=n(2263),h=n(4996),b=n(6668),v=n(1944),y=n(4711),w=n(9727),k=n(3320),E=n(8780),x=n(197);function _(){var e=(0,g.Z)().i18n,t=e.defaultLocale,n=e.localeConfigs,a=(0,y.l)();return r.createElement(m.Z,null,Object.entries(n).map((function(e){var t=e[0],n=e[1].htmlLang;return r.createElement("link",{key:t,rel:"alternate",href:a.createUrl({locale:t,fullyQualified:!0}),hrefLang:n})})),r.createElement("link",{rel:"alternate",href:a.createUrl({locale:t,fullyQualified:!0}),hrefLang:"x-default"}))}function S(e){var t=e.permalink,n=(0,g.Z)().siteConfig.url,a=function(){var e=(0,g.Z)().siteConfig,t=e.url,n=e.baseUrl,r=e.trailingSlash,a=(0,c.TH)().pathname;return t+(0,E.applyTrailingSlash)((0,h.Z)(a),{trailingSlash:r,baseUrl:n})}(),o=t?""+n+t:a;return r.createElement(m.Z,null,r.createElement("meta",{property:"og:url",content:o}),r.createElement("link",{rel:"canonical",href:o}))}function C(){var e=(0,g.Z)().i18n.currentLocale,t=(0,b.L)(),n=t.metadata,a=t.image;return r.createElement(r.Fragment,null,r.createElement(m.Z,null,r.createElement("meta",{name:"twitter:card",content:"summary_large_image"}),r.createElement("body",{className:w.h})),a&&r.createElement(v.d,{image:a}),r.createElement(S,null),r.createElement(_,null),r.createElement(x.Z,{tag:k.HX,locale:e}),r.createElement(m.Z,null,n.map((function(e,t){return r.createElement("meta",(0,p.Z)({key:t},e))}))))}var T=new Map;function L(e){if(T.has(e.pathname))return Object.assign({},e,{pathname:T.get(e.pathname)});if((0,d.f)(u.Z,e.pathname).some((function(e){return!0===e.route.exact})))return T.set(e.pathname,e.pathname),e;var t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return T.set(e.pathname,t),Object.assign({},e,{pathname:t})}var A=n(8934),D=n(8940),P=n(4578);function N(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

Current configured baseUrl = '+e+" "+("/"===e?" (default value)":"")+'

\n

We suggest trying baseUrl =

\n\n'}(e)).replace(/{"use strict";n.d(t,{_:()=>c,M:()=>d});var r=n(7294),a=n(6809);const o=JSON.parse('{"docusaurus-plugin-google-gtag":{"default":{"trackingID":["UA-140140828-1"],"anonymizeIP":false,"id":"default"}},"docusaurus-plugin-content-docs":{"default":{"path":"/metals/docs","versions":[{"name":"current","label":"Next","isLast":true,"path":"/metals/docs","mainDocId":"editors/overview","docs":[{"id":"build-tools/bloop","path":"/metals/docs/build-tools/bloop","sidebar":"docs"},{"id":"build-tools/gradle","path":"/metals/docs/build-tools/gradle","sidebar":"docs"},{"id":"build-tools/maven","path":"/metals/docs/build-tools/maven","sidebar":"docs"},{"id":"build-tools/mill","path":"/metals/docs/build-tools/mill","sidebar":"docs"},{"id":"build-tools/overview","path":"/metals/docs/build-tools/overview","sidebar":"docs"},{"id":"build-tools/sbt","path":"/metals/docs/build-tools/sbt","sidebar":"docs"},{"id":"contributors/getting-started","path":"/metals/docs/contributors/getting-started","sidebar":"docs"},{"id":"contributors/project-goals","path":"/metals/docs/contributors/project-goals","sidebar":"docs"},{"id":"contributors/releasing","path":"/metals/docs/contributors/releasing","sidebar":"docs"},{"id":"contributors/updating-website","path":"/metals/docs/contributors/updating-website","sidebar":"docs"},{"id":"diagrams/instruction","path":"/metals/docs/diagrams/instruction"},{"id":"editors/emacs","path":"/metals/docs/editors/emacs","sidebar":"docs"},{"id":"editors/online-ides","path":"/metals/docs/editors/online-ides","sidebar":"docs"},{"id":"editors/overview","path":"/metals/docs/","sidebar":"docs"},{"id":"editors/sublime","path":"/metals/docs/editors/sublime","sidebar":"docs"},{"id":"editors/user-configuration","path":"/metals/docs/editors/user-configuration","sidebar":"docs"},{"id":"editors/vim","path":"/metals/docs/editors/vim","sidebar":"docs"},{"id":"editors/vscode","path":"/metals/docs/editors/vscode","sidebar":"docs"},{"id":"features/codeactions","path":"/metals/docs/features/codeactions","sidebar":"docs"},{"id":"features/scripts","path":"/metals/docs/features/scripts","sidebar":"docs"},{"id":"integrations/debug-adapter-protocol","path":"/metals/docs/integrations/debug-adapter-protocol","sidebar":"docs"},{"id":"integrations/decoration-protocol","path":"/metals/docs/integrations/decoration-protocol","sidebar":"docs"},{"id":"integrations/new-build-tool","path":"/metals/docs/integrations/new-build-tool","sidebar":"docs"},{"id":"integrations/new-editor","path":"/metals/docs/integrations/new-editor","sidebar":"docs"},{"id":"integrations/remote-language-server","path":"/metals/docs/integrations/remote-language-server","sidebar":"docs"},{"id":"integrations/test-explorer","path":"/metals/docs/integrations/test-explorer","sidebar":"docs"},{"id":"integrations/tree-view-protocol","path":"/metals/docs/integrations/tree-view-protocol","sidebar":"docs"},{"id":"troubleshooting/faq","path":"/metals/docs/troubleshooting/faq","sidebar":"docs"},{"id":"troubleshooting/proxy","path":"/metals/docs/troubleshooting/proxy","sidebar":"docs"}],"draftIds":[],"sidebars":{"docs":{"link":{"path":"/metals/docs/","label":"editors/overview"}}}}],"breadcrumbs":true}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var l=n(7529);const s=JSON.parse('{"docusaurusVersion":"2.4.3","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"2.4.3"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"2.4.3"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"2.4.3"},"docusaurus-plugin-google-gtag":{"type":"package","name":"@docusaurus/plugin-google-gtag","version":"2.4.3"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"2.4.3"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"2.4.3"},"docusaurus-plugin-client-redirects":{"type":"package","name":"@docusaurus/plugin-client-redirects","version":"2.4.1"},"@easyops-cn/docusaurus-search-local":{"type":"package","name":"@easyops-cn/docusaurus-search-local","version":"0.36.0"}}}');var u={siteConfig:a.default,siteMetadata:s,globalData:o,i18n:i,codeTranslations:l},c=r.createContext(u);function d(e){var t=e.children;return r.createElement(c.Provider,{value:u},t)}},4763:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(4578),a=n(7294),o=n(412),i=n(5742),l=n(8780),s=n(179);function u(e){var t=e.error,n=e.tryAgain;return a.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"}},a.createElement("h1",{style:{fontSize:"3rem"}},"This page crashed"),a.createElement("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"}},"Try again"),a.createElement(c,{error:t}))}function c(e){var t=e.error,n=(0,l.getErrorCausalChain)(t).map((function(e){return e.message})).join("\n\nCause:\n");return a.createElement("p",{style:{whiteSpace:"pre-wrap"}},n)}function d(e){var t=e.error,n=e.tryAgain;return a.createElement(p,{fallback:function(){return a.createElement(u,{error:t,tryAgain:n})}},a.createElement(i.Z,null,a.createElement("title",null,"Page Error")),a.createElement(s.Z,null,a.createElement(u,{error:t,tryAgain:n})))}var f=function(e){return a.createElement(d,e)},p=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={error:null},n}(0,r.Z)(t,e);var n=t.prototype;return n.componentDidCatch=function(e){o.Z.canUseDOM&&this.setState({error:e})},n.render=function(){var e=this,t=this.props.children,n=this.state.error;if(n){var r,a={error:n,tryAgain:function(){return e.setState({error:null})}};return(null!=(r=this.props.fallback)?r:f)(a)}return null!=t?t:null},t}(a.Component)},412:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document;const a={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},5742:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(7294),a=n(405);function o(e){return r.createElement(a.ql,e)}},9960:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(7462),a=n(3366),o=n(7294),i=n(3727),l=n(8780),s=n(2263),u=n(3919),c=n(412),d=o.createContext({collectLink:function(){}});var f=n(4996),p=["isNavLink","to","href","activeClassName","isActive","data-noBrokenLinkCheck","autoAddBaseUrl"];function m(e,t){var n,m,g=e.isNavLink,h=e.to,b=e.href,v=e.activeClassName,y=e.isActive,w=e["data-noBrokenLinkCheck"],k=e.autoAddBaseUrl,E=void 0===k||k,x=(0,a.Z)(e,p),_=(0,s.Z)().siteConfig,S=_.trailingSlash,C=_.baseUrl,T=(0,f.C)().withBaseUrl,L=(0,o.useContext)(d),A=(0,o.useRef)(null);(0,o.useImperativeHandle)(t,(function(){return A.current}));var D=h||b;var P,N=(0,u.Z)(D),O=null==D?void 0:D.replace("pathname://",""),F=void 0!==O?(P=O,E&&function(e){return e.startsWith("/")}(P)?T(P):P):void 0;F&&N&&(F=(0,l.applyTrailingSlash)(F,{trailingSlash:S,baseUrl:C}));var I=(0,o.useRef)(!1),R=g?i.OL:i.rU,M=c.Z.canUseIntersectionObserver,B=(0,o.useRef)(),j=function(){I.current||null==F||(window.docusaurus.preload(F),I.current=!0)};(0,o.useEffect)((function(){return!M&&N&&null!=F&&window.docusaurus.prefetch(F),function(){M&&B.current&&B.current.disconnect()}}),[B,F,M,N]);var z=null!=(n=null==(m=F)?void 0:m.startsWith("#"))&&n,U=!F||!N||z;return U||w||L.collectLink(F),U?o.createElement("a",(0,r.Z)({ref:A,href:F},D&&!N&&{target:"_blank",rel:"noopener noreferrer"},x)):o.createElement(R,(0,r.Z)({},x,{onMouseEnter:j,onTouchStart:j,innerRef:function(e){A.current=e,M&&e&&N&&(B.current=new window.IntersectionObserver((function(t){t.forEach((function(t){e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(B.current.unobserve(e),B.current.disconnect(),null!=F&&window.docusaurus.prefetch(F))}))})),B.current.observe(e))},to:F},g&&{isActive:y,activeClassName:v}))}const g=o.forwardRef(m)},5999:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s,I:()=>l});var r=n(7294);function a(e,t){var n=e.split(/(\{\w+\})/).map((function(e,n){if(n%2==1){var r=null==t?void 0:t[e.slice(1,-1)];if(void 0!==r)return r}return e}));return n.some((function(e){return(0,r.isValidElement)(e)}))?n.map((function(e,t){return(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e})).filter((function(e){return""!==e})):n.join("")}var o=n(7529);function i(e){var t,n,r=e.id,a=e.message;if(void 0===r&&void 0===a)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return null!=(t=null!=(n=o[null!=r?r:a])?n:a)?t:r}function l(e,t){return a(i({message:e.message,id:e.id}),t)}function s(e){var t=e.children,n=e.id,o=e.values;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");var l=i({message:t,id:n});return r.createElement(r.Fragment,null,a(l,o))}},9935:(e,t,n)=>{"use strict";n.d(t,{m:()=>r});var r="default"},3919:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function a(e){return void 0!==e&&!r(e)}n.d(t,{Z:()=>a,b:()=>r})},4996:(e,t,n)=>{"use strict";n.d(t,{C:()=>i,Z:()=>l});var r=n(7294),a=n(2263),o=n(3919);function i(){var e=(0,a.Z)().siteConfig,t=e.baseUrl,n=e.url,i=(0,r.useCallback)((function(e,r){return function(e,t,n,r){var a=void 0===r?{}:r,i=a.forcePrependBaseUrl,l=void 0!==i&&i,s=a.absolute,u=void 0!==s&&s;if(!n||n.startsWith("#")||(0,o.b)(n))return n;if(l)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;var c=n.startsWith(t)?n:t+n.replace(/^\//,"");return u?e+c:c}(n,t,e,r)}),[n,t]);return{withBaseUrl:i}}function l(e,t){return void 0===t&&(t={}),(0,i().withBaseUrl)(e,t)}},2263:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(7294),a=n(8940);function o(){return(0,r.useContext)(a._)}},2389:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(7294),a=n(8934);function o(){return(0,r.useContext)(a._)}},9670:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=function(e){return"object"==typeof e&&!!e&&Object.keys(e).length>0};function a(e){var t={};return function e(n,a){Object.entries(n).forEach((function(n){var o=n[0],i=n[1],l=a?a+"."+o:o;r(i)?e(i,l):t[l]=i}))}(e),t}},226:(e,t,n)=>{"use strict";n.d(t,{_:()=>a,z:()=>o});var r=n(7294),a=r.createContext(null);function o(e){var t=e.children,n=e.value,o=r.useContext(a),i=(0,r.useMemo)((function(){return function(e){var t=e.parent,n=e.value;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}var r=Object.assign({},t.data,null==n?void 0:n.data);return{plugin:t.plugin,data:r}}({parent:o,value:n})}),[o,n]);return r.createElement(a.Provider,{value:i},t)}},143:(e,t,n)=>{"use strict";n.d(t,{Iw:()=>g,gA:()=>f,_r:()=>c,Jo:()=>h,zh:()=>d,yW:()=>m,gB:()=>p});var r=n(6550),a=n(2263),o=n(9935);function i(e,t){void 0===t&&(t={});var n=(0,a.Z)().globalData[e];if(!n&&t.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin.');return n}var l=function(e){return e.versions.find((function(e){return e.isLast}))};function s(e,t){var n,a,o=function(e,t){var n=l(e);return[].concat(e.versions.filter((function(e){return e!==n})),[n]).find((function(e){return!!(0,r.LX)(t,{path:e.path,exact:!1,strict:!1})}))}(e,t),i=null==o?void 0:o.docs.find((function(e){return!!(0,r.LX)(t,{path:e.path,exact:!0,strict:!1})}));return{activeVersion:o,activeDoc:i,alternateDocVersions:i?(n=i.id,a={},e.versions.forEach((function(e){e.docs.forEach((function(t){t.id===n&&(a[e.name]=t)}))})),a):{}}}var u={},c=function(){var e;return null!=(e=i("docusaurus-plugin-content-docs"))?e:u},d=function(e){return function(e,t,n){void 0===t&&(t=o.m),void 0===n&&(n={});var r=i(e),a=null==r?void 0:r[t];if(!a&&n.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin with id "'+t+'".');return a}("docusaurus-plugin-content-docs",e,{failfast:!0})};function f(e){return void 0===e&&(e={}),function(e,t,n){void 0===n&&(n={});var a=Object.entries(e).sort((function(e,t){return t[1].path.localeCompare(e[1].path)})).find((function(e){var n=e[1];return!!(0,r.LX)(t,{path:n.path,exact:!1,strict:!1})})),o=a?{pluginId:a[0],pluginData:a[1]}:void 0;if(!o&&n.failfast)throw new Error("Can't find active docs plugin for \""+t+'" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: '+Object.values(e).map((function(e){return e.path})).join(", "));return o}(c(),(0,r.TH)().pathname,e)}function p(e){return d(e).versions}function m(e){var t=d(e);return l(t)}function g(e){return s(d(e),(0,r.TH)().pathname)}function h(e){return function(e,t){var n=l(e);return{latestDocSuggestion:s(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(d(e),(0,r.TH)().pathname)}},6657:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r={onRouteDidUpdate:function(e){var t=e.location,n=e.previousLocation;!n||t.pathname===n.pathname&&t.search===n.search&&t.hash===n.hash||setTimeout((function(){window.gtag("event","page_view",{page_title:document.title,page_location:window.location.href,page_path:t.pathname+t.search+t.hash})}))}}},8320:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(4865),a=n.n(r);a().configure({showSpinner:!1});const o={onRouteUpdate:function(e){var t=e.location,n=e.previousLocation;if(n&&t.pathname!==n.pathname){var r=window.setTimeout((function(){a().start()}),200);return function(){return window.clearTimeout(r)}}},onRouteDidUpdate:function(){a().done()}}},3310:(e,t,n)=>{"use strict";n.r(t);var r,a,o=n(7410),i=n(6809);r=o.Z,a=i.default.themeConfig.prism.additionalLanguages,globalThis.Prism=r,a.forEach((function(e){n(4961)("./prism-"+e)})),delete globalThis.Prism},9471:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(7294);const a={iconExternalLink:"iconExternalLink_nPIU"};function o(e){var t=e.width,n=void 0===t?13.5:t,o=e.height,i=void 0===o?13.5:o;return r.createElement("svg",{width:n,height:i,"aria-hidden":"true",viewBox:"0 0 24 24",className:a.iconExternalLink},r.createElement("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"}))}},179:(e,t,n)=>{"use strict";n.d(t,{Z:()=>nn});var r=n(7294),a=n(4334),o=n(4763),i=n(1944),l=n(7462),s=n(6550),u=n(5999),c=n(5936),d="__docusaurus_skipToContent_fallback";function f(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function p(){var e=(0,r.useRef)(null),t=(0,s.k6)().action,n=(0,r.useCallback)((function(e){e.preventDefault();var t,n=null!=(t=document.querySelector("main:first-of-type"))?t:document.getElementById(d);n&&f(n)}),[]);return(0,c.S)((function(n){var r=n.location;e.current&&!r.hash&&"PUSH"===t&&f(e.current)})),{containerRef:e,onClick:n}}var m=(0,u.I)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function g(e){var t,n=null!=(t=e.children)?t:m,a=p(),o=a.containerRef,i=a.onClick;return r.createElement("div",{ref:o,role:"region","aria-label":m},r.createElement("a",(0,l.Z)({},e,{href:"#"+d,onClick:i}),n))}var h=n(5281),b=n(9727);const v={skipToContent:"skipToContent_fXgn"};function y(){return r.createElement(g,{className:v.skipToContent})}var w=n(6668),k=n(9689),E=n(3366),x=["width","height","color","strokeWidth","className"];function _(e){var t=e.width,n=void 0===t?21:t,a=e.height,o=void 0===a?21:a,i=e.color,s=void 0===i?"currentColor":i,u=e.strokeWidth,c=void 0===u?1.2:u,d=(e.className,(0,E.Z)(e,x));return r.createElement("svg",(0,l.Z)({viewBox:"0 0 15 15",width:n,height:o},d),r.createElement("g",{stroke:s,strokeWidth:c},r.createElement("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})))}const S={closeButton:"closeButton_CVFx"};function C(e){return r.createElement("button",(0,l.Z)({type:"button","aria-label":(0,u.I)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},e,{className:(0,a.Z)("clean-btn close",S.closeButton,e.className)}),r.createElement(_,{width:14,height:14,strokeWidth:3.1}))}const T={content:"content_knG7"};function L(e){var t=(0,w.L)().announcementBar.content;return r.createElement("div",(0,l.Z)({},e,{className:(0,a.Z)(T.content,e.className),dangerouslySetInnerHTML:{__html:t}}))}const A={announcementBar:"announcementBar_mb4j",announcementBarPlaceholder:"announcementBarPlaceholder_vyr4",announcementBarClose:"announcementBarClose_gvF7",announcementBarContent:"announcementBarContent_xLdY"};function D(){var e=(0,w.L)().announcementBar,t=(0,k.nT)(),n=t.isActive,a=t.close;if(!n)return null;var o=e.backgroundColor,i=e.textColor,l=e.isCloseable;return r.createElement("div",{className:A.announcementBar,style:{backgroundColor:o,color:i},role:"banner"},l&&r.createElement("div",{className:A.announcementBarPlaceholder}),r.createElement(L,{className:A.announcementBarContent}),l&&r.createElement(C,{onClick:a,className:A.announcementBarClose}))}var P=n(2961),N=n(2466);var O=n(9688),F=n(3102),I=r.createContext(null);function R(e){var t,n,a,o,i,l,s,u=e.children,c=(t=(0,P.e)(),n=(0,F.HY)(),a=(0,r.useState)(!1),o=a[0],i=a[1],l=null!==n.component,s=(0,O.D9)(l),(0,r.useEffect)((function(){l&&!s&&i(!0)}),[l,s]),(0,r.useEffect)((function(){l?t.shown||i(!0):i(!1)}),[t.shown,l]),(0,r.useMemo)((function(){return[o,i]}),[o]));return r.createElement(I.Provider,{value:c},u)}function M(e){if(e.component){var t=e.component;return r.createElement(t,e.props)}}function B(){var e=(0,r.useContext)(I);if(!e)throw new O.i6("NavbarSecondaryMenuDisplayProvider");var t=e[0],n=e[1],a=(0,r.useCallback)((function(){return n(!1)}),[n]),o=(0,F.HY)();return(0,r.useMemo)((function(){return{shown:t,hide:a,content:M(o)}}),[a,o,t])}function j(e){var t=e.header,n=e.primaryMenu,o=e.secondaryMenu,i=B().shown;return r.createElement("div",{className:"navbar-sidebar"},t,r.createElement("div",{className:(0,a.Z)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":i})},r.createElement("div",{className:"navbar-sidebar__item menu"},n),r.createElement("div",{className:"navbar-sidebar__item menu"},o)))}var z=n(2949),U=n(2389);function Z(e){return r.createElement("svg",(0,l.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"}))}function $(e){return r.createElement("svg",(0,l.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"}))}const H={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function Q(e){var t=e.className,n=e.buttonClassName,o=e.value,i=e.onChange,l=(0,U.Z)(),s=(0,u.I)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===o?(0,u.I)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,u.I)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return r.createElement("div",{className:(0,a.Z)(H.toggle,t)},r.createElement("button",{className:(0,a.Z)("clean-btn",H.toggleButton,!l&&H.toggleButtonDisabled,n),type:"button",onClick:function(){return i("dark"===o?"light":"dark")},disabled:!l,title:s,"aria-label":s,"aria-live":"polite"},r.createElement(Z,{className:(0,a.Z)(H.toggleIcon,H.lightToggleIcon)}),r.createElement($,{className:(0,a.Z)(H.toggleIcon,H.darkToggleIcon)})))}const V=r.memo(Q),W={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_X3D1"};function G(e){var t=e.className,n=(0,w.L)().navbar.style,a=(0,w.L)().colorMode.disableSwitch,o=(0,z.I)(),i=o.colorMode,l=o.setColorMode;return a?null:r.createElement(V,{className:t,buttonClassName:"dark"===n?W.darkNavbarColorModeToggle:void 0,value:i,onChange:l})}var q=n(1327);function Y(){return r.createElement(q.Z,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function K(){var e=(0,P.e)();return r.createElement("button",{type:"button","aria-label":(0,u.I)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:function(){return e.toggle()}},r.createElement(_,{color:"var(--ifm-color-emphasis-600)"}))}function X(){return r.createElement("div",{className:"navbar-sidebar__brand"},r.createElement(Y,null),r.createElement(G,{className:"margin-right--md"}),r.createElement(K,null))}var J=n(9960),ee=n(4996),te=n(3919);function ne(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}var re=n(9471),ae=["activeBasePath","activeBaseRegex","to","href","label","html","isDropdownLink","prependBaseUrlToHref"];function oe(e){var t=e.activeBasePath,n=e.activeBaseRegex,a=e.to,o=e.href,i=e.label,s=e.html,u=e.isDropdownLink,c=e.prependBaseUrlToHref,d=(0,E.Z)(e,ae),f=(0,ee.Z)(a),p=(0,ee.Z)(t),m=(0,ee.Z)(o,{forcePrependBaseUrl:!0}),g=i&&o&&!(0,te.Z)(o),h=s?{dangerouslySetInnerHTML:{__html:s}}:{children:r.createElement(r.Fragment,null,i,g&&r.createElement(re.Z,u&&{width:12,height:12}))};return o?r.createElement(J.Z,(0,l.Z)({href:c?m:o},d,h)):r.createElement(J.Z,(0,l.Z)({to:f,isNavLink:!0},(t||n)&&{isActive:function(e,t){return n?ne(n,t.pathname):t.pathname.startsWith(p)}},d,h))}var ie=["className","isDropdownItem"],le=["className","isDropdownItem"],se=["mobile","position"];function ue(e){var t=e.className,n=e.isDropdownItem,o=void 0!==n&&n,i=(0,E.Z)(e,ie),s=r.createElement(oe,(0,l.Z)({className:(0,a.Z)(o?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:o},i));return o?r.createElement("li",null,s):s}function ce(e){var t=e.className,n=(e.isDropdownItem,(0,E.Z)(e,le));return r.createElement("li",{className:"menu__list-item"},r.createElement(oe,(0,l.Z)({className:(0,a.Z)("menu__link",t)},n)))}function de(e){var t,n=e.mobile,a=void 0!==n&&n,o=(e.position,(0,E.Z)(e,se)),i=a?ce:ue;return r.createElement(i,(0,l.Z)({},o,{activeClassName:null!=(t=o.activeClassName)?t:a?"menu__link--active":"navbar__link--active"}))}var fe=n(6043),pe=n(8596),me=n(2263);var ge=["items","position","className","onClick"],he=["items","className","position","onClick"],be=["mobile"];function ve(e,t){return e.some((function(e){return function(e,t){return!!(0,pe.Mg)(e.to,t)||!!ne(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)}))}function ye(e){var t,n=e.items,o=e.position,i=e.className,s=(e.onClick,(0,E.Z)(e,ge)),u=(0,r.useRef)(null),c=(0,r.useState)(!1),d=c[0],f=c[1];return(0,r.useEffect)((function(){var e=function(e){u.current&&!u.current.contains(e.target)&&f(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[u]),r.createElement("div",{ref:u,className:(0,a.Z)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===o,"dropdown--show":d})},r.createElement(oe,(0,l.Z)({"aria-haspopup":"true","aria-expanded":d,role:"button",href:s.to?void 0:"#",className:(0,a.Z)("navbar__link",i)},s,{onClick:s.to?void 0:function(e){return e.preventDefault()},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),f(!d))}}),null!=(t=s.children)?t:s.label),r.createElement("ul",{className:"dropdown__menu"},n.map((function(e,t){return r.createElement(ft,(0,l.Z)({isDropdownItem:!0,activeClassName:"dropdown__link--active"},e,{key:t}))}))))}function we(e){var t,n,o=e.items,i=e.className,u=(e.position,e.onClick),c=(0,E.Z)(e,he),d=(n=(0,me.Z)().siteConfig.baseUrl,(0,s.TH)().pathname.replace(n,"/")),f=ve(o,d),p=(0,fe.u)({initialState:function(){return!f}}),m=p.collapsed,g=p.toggleCollapsed,h=p.setCollapsed;return(0,r.useEffect)((function(){f&&h(!f)}),[d,f,h]),r.createElement("li",{className:(0,a.Z)("menu__list-item",{"menu__list-item--collapsed":m})},r.createElement(oe,(0,l.Z)({role:"button",className:(0,a.Z)("menu__link menu__link--sublist menu__link--sublist-caret",i)},c,{onClick:function(e){e.preventDefault(),g()}}),null!=(t=c.children)?t:c.label),r.createElement(fe.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:m},o.map((function(e,t){return r.createElement(ft,(0,l.Z)({mobile:!0,isDropdownItem:!0,onClick:u,activeClassName:"menu__link--active"},e,{key:t}))}))))}function ke(e){var t=e.mobile,n=void 0!==t&&t,a=(0,E.Z)(e,be),o=n?we:ye;return r.createElement(o,a)}var Ee=n(4711),xe=["width","height"];function _e(e){var t=e.width,n=void 0===t?20:t,a=e.height,o=void 0===a?20:a,i=(0,E.Z)(e,xe);return r.createElement("svg",(0,l.Z)({viewBox:"0 0 24 24",width:n,height:o,"aria-hidden":!0},i),r.createElement("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"}))}const Se="iconLanguage_nlXk";var Ce=["mobile","dropdownItemsBefore","dropdownItemsAfter"];var Te=n(1029),Le=n(4165),Ae=n(7855),De=n(5861),Pe=n(1728),Ne=n(412),Oe=n(373),Fe=n(143),Ie=n(22),Re=n(8202),Me=n(3926),Be=n(1073),je=n(2539),ze=n(726),Ue='',Ze='',$e='',He='',Qe='',Ve='',We='';const Ge={searchBar:"searchBar_RVTs",dropdownMenu:"dropdownMenu_qbY6",searchBarLeft:"searchBarLeft_MXDe",suggestion:"suggestion_fB_2",cursor:"cursor_eG29",hitTree:"hitTree_kk6K",hitIcon:"hitIcon_a7Zy",hitPath:"hitPath_ieM4",noResultsIcon:"noResultsIcon_EBY5",hitFooter:"hitFooter_E9YW",hitWrapper:"hitWrapper_sAK8",hitTitle:"hitTitle_vyVt",hitAction:"hitAction_NqkB",hideAction:"hideAction_vcyE",noResults:"noResults_l6Q3",searchBarContainer:"searchBarContainer_NW3z",searchBarLoadingRing:"searchBarLoadingRing_YnHq",searchClearButton:"searchClearButton_qk4g",searchIndexLoading:"searchIndexLoading_EJ1f",searchHintContainer:"searchHintContainer_Pkmr",searchHint:"searchHint_iIMx",focused:"focused_OWtg",input:"input_FOTf",hint:"hint_URu1",suggestions:"suggestions_X8XU",dataset:"dataset_QiCy",empty:"empty_eITn"};function qe(e){var t=e.document,n=e.type,r=e.page,a=e.metadata,o=e.tokens,i=e.isInterOfTree,l=e.isLastOfTree,s=0===n,u=1===n,c=[];i?c.push(Ve):l&&c.push(We);var d=c.map((function(e){return''+e+""})),f=''+(s?Ue:u?Ze:$e)+"",p=[''+(0,ze.o)(t.t,(0,Be.m)(a,"t"),o)+""];if(!i&&!l&&Te.H6){var m,g=r?(null!=(m=r.b)?m:[]).concat(r.t).concat(t.s&&t.s!==r.t?t.s:[]):t.b;p.push(''+(0,Me.e)(null!=g?g:[])+"")}else s||p.push(''+(0,je.C)(r.t||(t.u.startsWith("/docs/api-reference/")?"API Reference":""),o)+"");var h=''+He+"";return[].concat(d,[f,''],p,["",h]).join("")}function Ye(){return''+Qe+""+(0,u.I)({id:"theme.SearchBar.noResultsText",message:"No results"})+""}var Ke=n(311);function Xe(){return Je.apply(this,arguments)}function Je(){return(Je=(0,De.Z)((0,Le.Z)().mark((function e(){var t,r;return(0,Le.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([n.e(8443),n.e(5525)]).then(n.t.bind(n,8443,23));case 2:return t=e.sent,(r=t.default).noConflict?r.noConflict():t.noConflict&&t.noConflict(),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var et="_highlight";const tt=function(e){var t,n,a,o=e.handleSearchBarToggle,i=(0,me.Z)().siteConfig.baseUrl,l=(0,Fe.gA)(),c=i;try{var d,f=(0,Oe.J)(null!=(d=null==l?void 0:l.pluginId)?d:Te.gQ).preferredVersion;f&&!f.isLast&&(c=f.path+"/")}catch(H){if(Te.l9&&!(H instanceof O.i6))throw H}var p=(0,s.k6)(),m=(0,s.TH)(),g=(0,r.useRef)(null),h=(0,r.useRef)(new Map),b=(0,r.useRef)(!1),v=(0,r.useState)(!1),y=v[0],w=v[1],k=(0,r.useState)(!1),E=k[0],x=k[1],_=(0,r.useState)(""),S=_[0],C=_[1],T=(0,r.useRef)(null),L=(0,r.useRef)(""),A=(0,r.useState)(""),D=A[0],P=A[1];(0,r.useEffect)((function(){if(Array.isArray(Te.Kc)){var e="";if(m.pathname.startsWith(c)){var t=m.pathname.substring(c.length),n=Te.Kc.find((function(e){return t===e||t.startsWith(e+"/")}));n&&(e=n)}L.current!==e&&(h.current.delete(e),L.current=e),P(e)}}),[m.pathname,c]);var N=!!Te.hG&&Array.isArray(Te.Kc)&&""===D,F=(0,r.useCallback)((0,De.Z)((0,Le.Z)().mark((function e(){var t,n,r,a,o,l,s,d,f,m;return(0,Le.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!N&&!h.current.get(D)){e.next=2;break}return e.abrupt("return");case 2:return h.current.set(D,"loading"),null==(t=T.current)||t.autocomplete.destroy(),w(!0),e.next=7,Promise.all([(0,Ie.w)(c,D),Xe()]);case 7:r=e.sent,a=r[0],o=a.wrappedIndexes,l=a.zhDictionary,s=r[1],d=function(e){var t,n=e.query,r=e.isEmpty,a=document.createElement("a"),o=new URLSearchParams,l=(0,u.I)({id:"theme.SearchBar.seeAll",message:"See all results"}),s=(0,u.I)({id:"theme.SearchBar.seeAllOutsideContext",message:"See results outside {context}"},{context:D}),d=(0,u.I)({id:"theme.SearchBar.searchInContext",message:"See all results in {context}"},{context:D});if(o.set("q",n),t=D&&r?s:D?d:l,Array.isArray(Te.Kc)&&!r&&o.set("ctx",D),c!==i){if(!c.startsWith(i))throw new Error("Version url '"+c+"' does not start with base url '"+i+"', this is a bug of `@easyops-cn/docusaurus-search-local`, please report it.");o.set("version",c.substring(i.length))}var f=i+"search?"+o.toString();return a.href=f,a.textContent=t,a.addEventListener("click",(function(e){var t;e.ctrlKey||e.metaKey||(e.preventDefault(),null==(t=T.current)||t.autocomplete.close(),p.push(f))})),a},T.current=s(g.current,{hint:!1,autoselect:!0,openOnFocus:!0,cssClasses:{root:(0,Pe.Z)(Ge.searchBar,(n={},n[Ge.searchBarLeft]="left"===Te.pu,n)),noPrefix:!0,dropdownMenu:Ge.dropdownMenu,input:Ge.input,hint:Ge.hint,suggestions:Ge.suggestions,suggestion:Ge.suggestion,cursor:Ge.cursor,dataset:Ge.dataset,empty:Ge.empty}},[{source:(0,Re.v)(o,l,Te.qo),templates:{suggestion:qe,empty:Ye,footer:function(e){var t=e.query,n=e.isEmpty;if(!n||D){var r=d({query:t,isEmpty:n}),a=document.createElement("div");return a.className=Ge.hitFooter,a.appendChild(r),a}}}}]).on("autocomplete:selected",(function(e,t){var n,r=t.document,a=r.u,o=r.h,i=t.tokens;null==(n=g.current)||n.blur();var l=a;if(Te.vc&&i.length>0){for(var s,u=new URLSearchParams,c=(0,Ae.Z)(i);!(s=c()).done;){var d=s.value;u.append(et,d)}l+="?"+u.toString()}o&&(l+=o),p.push(l)})).on("autocomplete:closed",(function(){var e;null==(e=g.current)||e.blur()})),h.current.set(D,"done"),w(!1),b.current&&((f=g.current).value&&(null==(m=T.current)||m.autocomplete.open()),f.focus());case 17:case"end":return e.stop()}}),e)}))),[N,D,c,i,p]);(0,r.useEffect)((function(){if(Te.vc){var e=Ne.Z.canUseDOM?new URLSearchParams(m.search).getAll(et):[];setTimeout((function(){var t,n=document.querySelector("article");if(n){var r=new Te.vc(n);r.unmark(),0!==e.length&&r.mark(e),C(e.join(" ")),null==(t=T.current)||t.autocomplete.setVal(e.join(" "))}}))}}),[m.search,m.pathname]);var I=(0,r.useState)(!1),R=I[0],M=I[1],B=(0,r.useCallback)((function(){b.current=!0,F(),M(!0),null==o||o(!0)}),[o,F]),j=(0,r.useCallback)((function(){M(!1),null==o||o(!1)}),[o]),z=(0,r.useCallback)((function(){F()}),[F]),U=(0,r.useCallback)((function(e){C(e.target.value),e.target.value&&x(!0)}),[]),Z=!!Ne.Z.canUseDOM&&/mac/i.test(null!=(t=null==(n=navigator.userAgentData)?void 0:n.platform)?t:navigator.platform);(0,r.useEffect)((function(){if(Te.AY){var e=function(e){var t;!(Z?e.metaKey:e.ctrlKey)||"k"!==e.key&&"K"!==e.key||(e.preventDefault(),null==(t=g.current)||t.focus(),B())};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}}),[Z,B]);var $=(0,r.useCallback)((function(){var e,t=new URLSearchParams(m.search);t.delete(et);var n=t.toString(),r=m.pathname+(""!=n?"?"+n:"")+m.hash;r!=m.pathname+m.search+m.hash&&p.push(r),C(""),null==(e=T.current)||e.autocomplete.setVal("")}),[m.pathname,m.search,m.hash,p]);return r.createElement("div",{className:(0,Pe.Z)("navbar__search",Ge.searchBarContainer,(a={},a[Ge.searchIndexLoading]=y&&E,a[Ge.focused]=R,a)),hidden:N},r.createElement("input",{placeholder:(0,u.I)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"}),"aria-label":"Search",className:"navbar__search-input",onMouseEnter:z,onFocus:B,onBlur:j,onChange:U,ref:g,value:S}),r.createElement(Ke.Z,{className:Ge.searchBarLoadingRing}),Te.AY&&Te.t_&&(""!==S?r.createElement("button",{className:Ge.searchClearButton,onClick:$},"\u2715"):Ne.Z.canUseDOM&&r.createElement("div",{className:Ge.searchHintContainer},r.createElement("kbd",{className:Ge.searchHint},Z?"\u2318":"ctrl"),r.createElement("kbd",{className:Ge.searchHint},"K"))))},nt={searchBox:"searchBox_ZlJk"};function rt(e){var t=e.children,n=e.className;return r.createElement("div",{className:(0,a.Z)(n,nt.searchBox)},t)}var at=n(2802),ot=["docId","label","docsPluginId"];var it=["sidebarId","label","docsPluginId"];var lt=["label","to","docsPluginId"];var st=["mobile","docsPluginId","dropdownActiveClassDisabled","dropdownItemsBefore","dropdownItemsAfter"],ut=function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))};const ct={default:de,localeDropdown:function(e){var t=e.mobile,n=e.dropdownItemsBefore,a=e.dropdownItemsAfter,o=(0,E.Z)(e,Ce),i=(0,me.Z)().i18n,c=i.currentLocale,d=i.locales,f=i.localeConfigs,p=(0,Ee.l)(),m=(0,s.TH)(),g=m.search,h=m.hash,b=d.map((function(e){var n=""+("pathname://"+p.createUrl({locale:e,fullyQualified:!1}))+g+h;return{label:f[e].label,lang:f[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===c?t?"menu__link--active":"dropdown__link--active":""}})),v=[].concat(n,b,a),y=t?(0,u.I)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):f[c].label;return r.createElement(ke,(0,l.Z)({},o,{mobile:t,label:r.createElement(r.Fragment,null,r.createElement(_e,{className:Se}),y),items:v}))},search:function(e){var t=e.mobile,n=e.className;return t?null:r.createElement(rt,{className:n},r.createElement(tt,null))},dropdown:ke,html:function(e){var t=e.value,n=e.className,o=e.mobile,i=void 0!==o&&o,l=e.isDropdownItem,s=void 0!==l&&l,u=s?"li":"div";return r.createElement(u,{className:(0,a.Z)({navbar__item:!i&&!s,"menu__list-item":i},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){var t=e.docId,n=e.label,a=e.docsPluginId,o=(0,E.Z)(e,ot),i=(0,Fe.Iw)(a).activeDoc,s=(0,at.vY)(t,a);return null===s?null:r.createElement(de,(0,l.Z)({exact:!0},o,{isActive:function(){return(null==i?void 0:i.path)===s.path||!(null==i||!i.sidebar)&&i.sidebar===s.sidebar},label:null!=n?n:s.id,to:s.path}))},docSidebar:function(e){var t=e.sidebarId,n=e.label,a=e.docsPluginId,o=(0,E.Z)(e,it),i=(0,Fe.Iw)(a).activeDoc,s=(0,at.oz)(t,a).link;if(!s)throw new Error('DocSidebarNavbarItem: Sidebar with ID "'+t+"\" doesn't have anything to be linked to.");return r.createElement(de,(0,l.Z)({exact:!0},o,{isActive:function(){return(null==i?void 0:i.sidebar)===t},label:null!=n?n:s.label,to:s.path}))},docsVersion:function(e){var t=e.label,n=e.to,a=e.docsPluginId,o=(0,E.Z)(e,lt),i=(0,at.lO)(a)[0],s=null!=t?t:i.label,u=null!=n?n:function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))}(i).path;return r.createElement(de,(0,l.Z)({},o,{label:s,to:u}))},docsVersionDropdown:function(e){var t=e.mobile,n=e.docsPluginId,a=e.dropdownActiveClassDisabled,o=e.dropdownItemsBefore,i=e.dropdownItemsAfter,c=(0,E.Z)(e,st),d=(0,s.TH)(),f=d.search,p=d.hash,m=(0,Fe.Iw)(n),g=(0,Fe.gB)(n),h=(0,Oe.J)(n).savePreferredVersionName,b=g.map((function(e){var t,n=null!=(t=m.alternateDocVersions[e.name])?t:ut(e);return{label:e.label,to:""+n.path+f+p,isActive:function(){return e===m.activeVersion},onClick:function(){return h(e.name)}}})),v=[].concat(o,b,i),y=(0,at.lO)(n)[0],w=t&&v.length>1?(0,u.I)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):y.label,k=t&&v.length>1?void 0:ut(y).path;return v.length<=1?r.createElement(de,(0,l.Z)({},c,{mobile:t,label:w,to:k,isActive:a?function(){return!1}:void 0})):r.createElement(ke,(0,l.Z)({},c,{mobile:t,label:w,to:k,items:v,isActive:a?function(){return!1}:void 0}))}};var dt=["type"];function ft(e){var t=e.type,n=(0,E.Z)(e,dt),a=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),o=ct[a];if(!o)throw new Error('No NavbarItem component found for type "'+t+'".');return r.createElement(o,n)}function pt(){var e=(0,P.e)(),t=(0,w.L)().navbar.items;return r.createElement("ul",{className:"menu__list"},t.map((function(t,n){return r.createElement(ft,(0,l.Z)({mobile:!0},t,{onClick:function(){return e.toggle()},key:n}))})))}function mt(e){return r.createElement("button",(0,l.Z)({},e,{type:"button",className:"clean-btn navbar-sidebar__back"}),r.createElement(u.Z,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)"},"\u2190 Back to main menu"))}function gt(){var e=0===(0,w.L)().navbar.items.length,t=B();return r.createElement(r.Fragment,null,!e&&r.createElement(mt,{onClick:function(){return t.hide()}}),t.content)}function ht(){var e,t=(0,P.e)();return void 0===(e=t.shown)&&(e=!0),(0,r.useEffect)((function(){return document.body.style.overflow=e?"hidden":"visible",function(){document.body.style.overflow="visible"}}),[e]),t.shouldRender?r.createElement(j,{header:r.createElement(X,null),primaryMenu:r.createElement(pt,null),secondaryMenu:r.createElement(gt,null)}):null}const bt={navbarHideable:"navbarHideable_m1mJ",navbarHidden:"navbarHidden_jGov"};function vt(e){return r.createElement("div",(0,l.Z)({role:"presentation"},e,{className:(0,a.Z)("navbar-sidebar__backdrop",e.className)}))}function yt(e){var t=e.children,n=(0,w.L)().navbar,o=n.hideOnScroll,i=n.style,l=(0,P.e)(),s=function(e){var t=(0,r.useState)(e),n=t[0],a=t[1],o=(0,r.useRef)(!1),i=(0,r.useRef)(0),l=(0,r.useCallback)((function(e){null!==e&&(i.current=e.getBoundingClientRect().height)}),[]);return(0,N.RF)((function(t,n){var r=t.scrollY;if(e)if(r=l?a(!1):r+u0&&r.createElement($t,{links:n}),logo:a&&r.createElement(Wt,{logo:a}),copyright:t&&r.createElement(Gt,{copyright:t})})}const Kt=r.memo(Yt);var Xt=(0,O.Qc)([z.S,k.pl,N.OC,Oe.L5,i.VC,function(e){var t=e.children;return r.createElement(F.n2,null,r.createElement(P.M,null,r.createElement(R,null,t)))}]);function Jt(e){var t=e.children;return r.createElement(Xt,null,t)}function en(e){var t=e.error,n=e.tryAgain;return r.createElement("main",{className:"container margin-vert--xl"},r.createElement("div",{className:"row"},r.createElement("div",{className:"col col--6 col--offset-3"},r.createElement("h1",{className:"hero__title"},r.createElement(u.Z,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed"},"This page crashed.")),r.createElement("div",{className:"margin-vert--lg"},r.createElement(xt,{onClick:n,className:"button button--primary shadow--lw"})),r.createElement("hr",null),r.createElement("div",{className:"margin-vert--md"},r.createElement(_t,{error:t})))))}const tn={mainWrapper:"mainWrapper_z2l0"};function nn(e){var t=e.children,n=e.noFooter,l=e.wrapperClassName,s=e.title,u=e.description;return(0,b.t)(),r.createElement(Jt,null,r.createElement(i.d,{title:s,description:u}),r.createElement(y,null),r.createElement(D,null),r.createElement(Ft,null),r.createElement("div",{id:d,className:(0,a.Z)(h.k.wrapper.main,tn.mainWrapper,l)},r.createElement(o.Z,{fallback:function(e){return r.createElement(en,e)}},t)),!n&&r.createElement(Kt,null))}},1327:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(7462),a=n(3366),o=n(7294),i=n(9960),l=n(4996),s=n(2263),u=n(6668),c=n(941),d=["imageClassName","titleClassName"];function f(e){var t=e.logo,n=e.alt,r=e.imageClassName,a={light:(0,l.Z)(t.src),dark:(0,l.Z)(t.srcDark||t.src)},i=o.createElement(c.Z,{className:t.className,sources:a,height:t.height,width:t.width,alt:n,style:t.style});return r?o.createElement("div",{className:r},i):i}function p(e){var t,n=(0,s.Z)().siteConfig.title,c=(0,u.L)().navbar,p=c.title,m=c.logo,g=e.imageClassName,h=e.titleClassName,b=(0,a.Z)(e,d),v=(0,l.Z)((null==m?void 0:m.href)||"/"),y=p?"":n,w=null!=(t=null==m?void 0:m.alt)?t:y;return o.createElement(i.Z,(0,r.Z)({to:v},b,(null==m?void 0:m.target)&&{target:m.target}),m&&o.createElement(f,{logo:m,alt:w,imageClassName:g}),null!=p&&o.createElement("b",{className:h},p))}},197:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(7294),a=n(5742);function o(e){var t=e.locale,n=e.version,o=e.tag,i=t;return r.createElement(a.Z,null,t&&r.createElement("meta",{name:"docusaurus_locale",content:t}),n&&r.createElement("meta",{name:"docusaurus_version",content:n}),o&&r.createElement("meta",{name:"docusaurus_tag",content:o}),i&&r.createElement("meta",{name:"docsearch:language",content:i}),n&&r.createElement("meta",{name:"docsearch:version",content:n}),o&&r.createElement("meta",{name:"docsearch:docusaurus_tag",content:o}))}},941:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(7462),a=n(3366),o=n(7294),i=n(4334),l=n(2389),s=n(2949);const u={themedImage:"themedImage_ToTc","themedImage--light":"themedImage--light_HNdA","themedImage--dark":"themedImage--dark_i4oU"};var c=["sources","className","alt"];function d(e){var t=(0,l.Z)(),n=(0,s.I)().colorMode,d=e.sources,f=e.className,p=e.alt,m=(0,a.Z)(e,c),g=t?"dark"===n?["dark"]:["light"]:["light","dark"];return o.createElement(o.Fragment,null,g.map((function(e){return o.createElement("img",(0,r.Z)({key:e,src:d[e],alt:p,className:(0,i.Z)(u.themedImage,u["themedImage--"+e],f)},m))})))}},6043:(e,t,n)=>{"use strict";n.d(t,{u:()=>d,z:()=>y});var r=n(7462),a=n(3366),o=n(7294),i=n(412),l=n(1442),s=["collapsed"],u=["lazy"],c="ease-in-out";function d(e){var t=e.initialState,n=(0,o.useState)(null!=t&&t),r=n[0],a=n[1],i=(0,o.useCallback)((function(){a((function(e){return!e}))}),[]);return{collapsed:r,setCollapsed:a,toggleCollapsed:i}}var f={display:"none",overflow:"hidden",height:"0px"},p={display:"block",overflow:"visible",height:"auto"};function m(e,t){var n=t?f:p;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function g(e){var t=e.collapsibleRef,n=e.collapsed,r=e.animation,a=(0,o.useRef)(!1);(0,o.useEffect)((function(){var e,o=t.current;function i(){var e,t,n=o.scrollHeight,a=null!=(e=null==r?void 0:r.duration)?e:function(e){if((0,l.n)())return 1;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}(n);return{transition:"height "+a+"ms "+(null!=(t=null==r?void 0:r.easing)?t:c),height:n+"px"}}function s(){var e=i();o.style.transition=e.transition,o.style.height=e.height}if(!a.current)return m(o,n),void(a.current=!0);return o.style.willChange="height",e=requestAnimationFrame((function(){n?(s(),requestAnimationFrame((function(){o.style.height=f.height,o.style.overflow=f.overflow}))):(o.style.display="block",requestAnimationFrame((function(){s()})))})),function(){return cancelAnimationFrame(e)}}),[t,n,r])}function h(e){if(!i.Z.canUseDOM)return e?f:p}function b(e){var t=e.as,n=void 0===t?"div":t,r=e.collapsed,a=e.children,i=e.animation,l=e.onCollapseTransitionEnd,s=e.className,u=e.disableSSRStyle,c=(0,o.useRef)(null);return g({collapsibleRef:c,collapsed:r,animation:i}),o.createElement(n,{ref:c,style:u?void 0:h(r),onTransitionEnd:function(e){"height"===e.propertyName&&(m(c.current,r),null==l||l(r))},className:s},a)}function v(e){var t=e.collapsed,n=(0,a.Z)(e,s),i=(0,o.useState)(!t),l=i[0],u=i[1],c=(0,o.useState)(t),d=c[0],f=c[1];return(0,o.useLayoutEffect)((function(){t||u(!0)}),[t]),(0,o.useLayoutEffect)((function(){l&&f(t)}),[l,t]),l?o.createElement(b,(0,r.Z)({},n,{collapsed:d})):null}function y(e){var t=e.lazy,n=(0,a.Z)(e,u),r=t?v:b;return o.createElement(r,n)}},9689:(e,t,n)=>{"use strict";n.d(t,{nT:()=>m,pl:()=>p});var r=n(7294),a=n(2389),o=n(12),i=n(9688),l=n(6668),s=(0,o.WA)("docusaurus.announcement.dismiss"),u=(0,o.WA)("docusaurus.announcement.id"),c=function(){return"true"===s.get()},d=function(e){return s.set(String(e))},f=r.createContext(null);function p(e){var t=e.children,n=function(){var e=(0,l.L)().announcementBar,t=(0,a.Z)(),n=(0,r.useState)((function(){return!!t&&c()})),o=n[0],i=n[1];(0,r.useEffect)((function(){i(c())}),[]);var s=(0,r.useCallback)((function(){d(!0),i(!0)}),[]);return(0,r.useEffect)((function(){if(e){var t=e.id,n=u.get();"annoucement-bar"===n&&(n="announcement-bar");var r=t!==n;u.set(t),r&&d(!1),!r&&c()||i(!1)}}),[e]),(0,r.useMemo)((function(){return{isActive:!!e&&!o,close:s}}),[e,o,s])}();return r.createElement(f.Provider,{value:n},t)}function m(){var e=(0,r.useContext)(f);if(!e)throw new i.i6("AnnouncementBarProvider");return e}},2949:(e,t,n)=>{"use strict";n.d(t,{I:()=>h,S:()=>g});var r=n(7294),a=n(412),o=n(9688),i=n(12),l=n(6668),s=r.createContext(void 0),u="theme",c=(0,i.WA)(u),d={light:"light",dark:"dark"},f=function(e){return e===d.dark?d.dark:d.light},p=function(e){return a.Z.canUseDOM?f(document.documentElement.getAttribute("data-theme")):f(e)},m=function(e){c.set(f(e))};function g(e){var t=e.children,n=function(){var e=(0,l.L)().colorMode,t=e.defaultMode,n=e.disableSwitch,a=e.respectPrefersColorScheme,o=(0,r.useState)(p(t)),i=o[0],s=o[1];(0,r.useEffect)((function(){n&&c.del()}),[n]);var g=(0,r.useCallback)((function(e,n){void 0===n&&(n={});var r=n.persist,o=void 0===r||r;e?(s(e),o&&m(e)):(s(a?window.matchMedia("(prefers-color-scheme: dark)").matches?d.dark:d.light:t),c.del())}),[a,t]);(0,r.useEffect)((function(){document.documentElement.setAttribute("data-theme",f(i))}),[i]),(0,r.useEffect)((function(){if(!n){var e=function(e){if(e.key===u){var t=c.get();null!==t&&g(f(t))}};return window.addEventListener("storage",e),function(){return window.removeEventListener("storage",e)}}}),[n,g]);var h=(0,r.useRef)(!1);return(0,r.useEffect)((function(){if(!n||a){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=function(){window.matchMedia("print").matches||h.current?h.current=window.matchMedia("print").matches:g(null)};return e.addListener(t),function(){return e.removeListener(t)}}}),[g,n,a]),(0,r.useMemo)((function(){return{colorMode:i,setColorMode:g,get isDarkTheme(){return i===d.dark},setLightTheme:function(){g(d.light)},setDarkTheme:function(){g(d.dark)}}}),[i,g])}();return r.createElement(s.Provider,{value:n},t)}function h(){var e=(0,r.useContext)(s);if(null==e)throw new o.i6("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},373:(e,t,n)=>{"use strict";n.d(t,{J:()=>v,L5:()=>h});var r=n(7294),a=n(143),o=n(9935),i=n(6668),l=n(2802),s=n(9688),u=n(12),c=function(e){return"docs-preferred-version-"+e},d={save:function(e,t,n){(0,u.WA)(c(e),{persistence:t}).set(n)},read:function(e,t){return(0,u.WA)(c(e),{persistence:t}).get()},clear:function(e,t){(0,u.WA)(c(e),{persistence:t}).del()}},f=function(e){return Object.fromEntries(e.map((function(e){return[e,{preferredVersionName:null}]})))};var p=r.createContext(null);function m(){var e=(0,a._r)(),t=(0,i.L)().docs.versionPersistence,n=(0,r.useMemo)((function(){return Object.keys(e)}),[e]),o=(0,r.useState)((function(){return f(n)})),l=o[0],s=o[1];return(0,r.useEffect)((function(){s(function(e){var t=e.pluginIds,n=e.versionPersistence,r=e.allDocsData;return Object.fromEntries(t.map((function(e){return[e,(t=e,a=d.read(t,n),r[t].versions.some((function(e){return e.name===a}))?{preferredVersionName:a}:(d.clear(t,n),{preferredVersionName:null}))];var t,a})))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]),[l,(0,r.useMemo)((function(){return{savePreferredVersion:function(e,n){d.save(e,t,n),s((function(t){var r;return Object.assign({},t,((r={})[e]={preferredVersionName:n},r))}))}}}),[t])]}function g(e){var t=e.children,n=m();return r.createElement(p.Provider,{value:n},t)}function h(e){var t=e.children;return l.cE?r.createElement(g,null,t):r.createElement(r.Fragment,null,t)}function b(){var e=(0,r.useContext)(p);if(!e)throw new s.i6("DocsPreferredVersionContextProvider");return e}function v(e){var t;void 0===e&&(e=o.m);var n=(0,a.zh)(e),i=b(),l=i[0],s=i[1],u=l[e].preferredVersionName;return{preferredVersion:null!=(t=n.versions.find((function(e){return e.name===u})))?t:null,savePreferredVersionName:(0,r.useCallback)((function(t){s.savePreferredVersion(e,t)}),[s,e])}}},1116:(e,t,n)=>{"use strict";n.d(t,{V:()=>s,b:()=>l});var r=n(7294),a=n(9688),o=Symbol("EmptyContext"),i=r.createContext(o);function l(e){var t=e.children,n=e.name,a=e.items,o=(0,r.useMemo)((function(){return n&&a?{name:n,items:a}:null}),[n,a]);return r.createElement(i.Provider,{value:o},t)}function s(){var e=(0,r.useContext)(i);if(e===o)throw new a.i6("DocsSidebarProvider");return e}},2961:(e,t,n)=>{"use strict";n.d(t,{M:()=>f,e:()=>p});var r=n(7294),a=n(3102),o=n(7524),i=n(6550),l=(n(1688),n(9688));function s(e){!function(e){var t=(0,i.k6)(),n=(0,l.zX)(e);(0,r.useEffect)((function(){return t.block((function(e,t){return n(e,t)}))}),[t,n])}((function(t,n){if("POP"===n)return e(t,n)}))}var u=n(6668),c=r.createContext(void 0);function d(){var e,t=(e=(0,a.HY)(),0===(0,u.L)().navbar.items.length&&!e.component),n=(0,o.i)(),i=!t&&"mobile"===n,l=(0,r.useState)(!1),c=l[0],d=l[1];s((function(){if(c)return d(!1),!1}));var f=(0,r.useCallback)((function(){d((function(e){return!e}))}),[]);return(0,r.useEffect)((function(){"desktop"===n&&d(!1)}),[n]),(0,r.useMemo)((function(){return{disabled:t,shouldRender:i,toggle:f,shown:c}}),[t,i,f,c])}function f(e){var t=e.children,n=d();return r.createElement(c.Provider,{value:n},t)}function p(){var e=r.useContext(c);if(void 0===e)throw new l.i6("NavbarMobileSidebarProvider");return e}},3102:(e,t,n)=>{"use strict";n.d(t,{HY:()=>l,Zo:()=>s,n2:()=>i});var r=n(7294),a=n(9688),o=r.createContext(null);function i(e){var t=e.children,n=(0,r.useState)({component:null,props:null});return r.createElement(o.Provider,{value:n},t)}function l(){var e=(0,r.useContext)(o);if(!e)throw new a.i6("NavbarSecondaryMenuContentProvider");return e[0]}function s(e){var t=e.component,n=e.props,i=(0,r.useContext)(o);if(!i)throw new a.i6("NavbarSecondaryMenuContentProvider");var l=i[1],s=(0,a.Ql)(n);return(0,r.useEffect)((function(){l({component:t,props:s})}),[l,t,s]),(0,r.useEffect)((function(){return function(){return l({component:null,props:null})}}),[l]),null}},9727:(e,t,n)=>{"use strict";n.d(t,{h:()=>a,t:()=>o});var r=n(7294),a="navigation-with-keyboard";function o(){(0,r.useEffect)((function(){function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(a),"mousedown"===e.type&&document.body.classList.remove(a)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),function(){document.body.classList.remove(a),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},7524:(e,t,n)=>{"use strict";n.d(t,{i:()=>u});var r=n(7294),a=n(412),o={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function l(){return a.Z.canUseDOM?window.innerWidth>i?o.desktop:o.mobile:o.ssr}var s=!1;function u(){var e=(0,r.useState)((function(){return s?"ssr":l()})),t=e[0],n=e[1];return(0,r.useEffect)((function(){function e(){n(l())}var t=s?window.setTimeout(e,1e3):void 0;return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e),clearTimeout(t)}}),[]),t}},5281:(e,t,n)=>{"use strict";n.d(t,{k:()=>r});var r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",admonitionType:function(e){return"theme-admonition-"+e}},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:function(e){return"theme-doc-sidebar-item-category-level-"+e},docSidebarItemLinkLevel:function(e){return"theme-doc-sidebar-item-link-level-"+e}},blog:{}}},1442:(e,t,n)=>{"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{n:()=>r})},2802:(e,t,n)=>{"use strict";n.d(t,{Wl:()=>p,_F:()=>h,cE:()=>f,hI:()=>E,lO:()=>y,vY:()=>k,oz:()=>w,s1:()=>v});var r=n(7855),a=n(7294),o=n(6550),i=n(8790),l=n(143),s=n(373),u=n(1116);function c(e){return Array.from(new Set(e))}var d=n(8596),f=!!l._r;function p(e){if(e.href)return e.href;for(var t,n=(0,r.Z)(e.items);!(t=n()).done;){var a=t.value;if("link"===a.type)return a.href;if("category"===a.type){var o=p(a);if(o)return o}}}var m=function(e,t){return void 0!==e&&(0,d.Mg)(e,t)},g=function(e,t){return e.some((function(e){return h(e,t)}))};function h(e,t){return"link"===e.type?m(e.href,t):"category"===e.type&&(m(e.href,t)||g(e.items,t))}function b(e){var t=e.sidebarItems,n=e.pathname,a=e.onlyCategories,o=void 0!==a&&a,i=[];return function e(t){for(var a,l=(0,r.Z)(t);!(a=l()).done;){var s=a.value;if("category"===s.type&&((0,d.Mg)(s.href,n)||e(s.items))||"link"===s.type&&(0,d.Mg)(s.href,n))return o&&"category"!==s.type||i.unshift(s),!0}return!1}(t),i}function v(){var e,t=(0,u.V)(),n=(0,o.TH)().pathname;return!1!==(null==(e=(0,l.gA)())?void 0:e.pluginData.breadcrumbs)&&t?b({sidebarItems:t.items,pathname:n}):null}function y(e){var t=(0,l.Iw)(e).activeVersion,n=(0,s.J)(e).preferredVersion,r=(0,l.yW)(e);return(0,a.useMemo)((function(){return c([t,n,r].filter(Boolean))}),[t,n,r])}function w(e,t){var n=y(t);return(0,a.useMemo)((function(){var t=n.flatMap((function(e){return e.sidebars?Object.entries(e.sidebars):[]})),r=t.find((function(t){return t[0]===e}));if(!r)throw new Error("Can't find any sidebar with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map((function(e){return e.name})).join(", ")+'".\nAvailable sidebar ids are:\n- '+t.map((function(e){return e[0]})).join("\n- "));return r[1]}),[e,n])}function k(e,t){var n=y(t);return(0,a.useMemo)((function(){var t=n.flatMap((function(e){return e.docs})),r=t.find((function(t){return t.id===e}));if(!r){if(n.flatMap((function(e){return e.draftIds})).includes(e))return null;throw new Error("Couldn't find any doc with id \""+e+'" in version'+(n.length>1?"s":"")+' "'+n.map((function(e){return e.name})).join(", ")+'".\nAvailable doc ids are:\n- '+c(t.map((function(e){return e.id}))).join("\n- "))}return r}),[e,n])}function E(e){var t=e.route,n=e.versionMetadata,r=(0,o.TH)(),a=t.routes,l=a.find((function(e){return(0,o.LX)(r.pathname,e)}));if(!l)return null;var s=l.sidebar,u=s?n.docsSidebars[s]:void 0;return{docElement:(0,i.H)(a),sidebarName:s,sidebarItems:u}}},1944:(e,t,n)=>{"use strict";n.d(t,{FG:()=>f,d:()=>c,VC:()=>p});var r=n(7294),a=n(7459),o=n(5742),i=n(226);function l(){var e=r.useContext(i._);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var s=n(4996),u=n(2263);function c(e){var t=e.title,n=e.description,a=e.keywords,i=e.image,l=e.children,c=function(e){var t=(0,u.Z)().siteConfig,n=t.title,r=t.titleDelimiter;return null!=e&&e.trim().length?e.trim()+" "+r+" "+n:n}(t),d=(0,s.C)().withBaseUrl,f=i?d(i,{absolute:!0}):void 0;return r.createElement(o.Z,null,t&&r.createElement("title",null,c),t&&r.createElement("meta",{property:"og:title",content:c}),n&&r.createElement("meta",{name:"description",content:n}),n&&r.createElement("meta",{property:"og:description",content:n}),a&&r.createElement("meta",{name:"keywords",content:Array.isArray(a)?a.join(","):a}),f&&r.createElement("meta",{property:"og:image",content:f}),f&&r.createElement("meta",{name:"twitter:image",content:f}),l)}var d=r.createContext(void 0);function f(e){var t=e.className,n=e.children,i=r.useContext(d),l=(0,a.Z)(i,t);return r.createElement(d.Provider,{value:l},r.createElement(o.Z,null,r.createElement("html",{className:l})),n)}function p(e){var t=e.children,n=l(),o="plugin-"+n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,""),i="plugin-id-"+n.plugin.id;return r.createElement(f,{className:(0,a.Z)(o,i)},t)}},9688:(e,t,n)=>{"use strict";n.d(t,{i6:()=>p,Qc:()=>g,zX:()=>d,D9:()=>f,Ql:()=>m});var r=n(7099),a=n(4578);function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}var i=n(9611);function l(e,t,n){return l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&(0,i.Z)(a,n.prototype),a},l.apply(null,arguments)}function s(e){var t="function"==typeof Map?new Map:void 0;return s=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return l(e,arguments,o(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,i.Z)(r,e)},s(e)}var u=n(7294),c=n(412).Z.canUseDOM?u.useLayoutEffect:u.useEffect;function d(e){var t=(0,u.useRef)(e);return c((function(){t.current=e}),[e]),(0,u.useCallback)((function(){return t.current.apply(t,arguments)}),[])}function f(e){var t=(0,u.useRef)();return c((function(){t.current=e})),t.current}var p=function(e){function t(t,n){var a,o,i;return(i=e.call(this)||this).name="ReactContextError",i.message="Hook "+(null!=(a=null==(o=i.stack)||null==(o=o.split("\n")[1])||null==(o=o.match((0,r.Z)(/at (?:\w+\.)?(\w+)/,{name:1})))?void 0:o.groups.name)?a:"")+" is called outside the <"+t+">. "+(null!=n?n:""),i}return(0,a.Z)(t,e),t}(s(Error));function m(e){var t=Object.entries(e);return t.sort((function(e,t){return e[0].localeCompare(t[0])})),(0,u.useMemo)((function(){return e}),t.flat())}function g(e){return function(t){var n=t.children;return u.createElement(u.Fragment,null,e.reduceRight((function(e,t){return u.createElement(t,null,e)}),n))}}},8596:(e,t,n)=>{"use strict";n.d(t,{Mg:()=>i,Ns:()=>l});var r=n(7294),a=n(723),o=n(2263);function i(e,t){var n=function(e){var t;return null==(t=!e||e.endsWith("/")?e:e+"/")?void 0:t.toLowerCase()};return n(e)===n(t)}function l(){var e=(0,o.Z)().siteConfig.baseUrl;return(0,r.useMemo)((function(){return function(e){var t=e.baseUrl;function n(e){return e.path===t&&!0===e.exact}function r(e){return e.path===t&&!e.exact}return function e(t){if(0!==t.length)return t.find(n)||e(t.filter(r).flatMap((function(e){var t;return null!=(t=e.routes)?t:[]})))}(e.routes)}({routes:a.Z,baseUrl:e})}),[e])}},2466:(e,t,n)=>{"use strict";n.d(t,{Ct:()=>f,OC:()=>s,RF:()=>d});var r=n(7294),a=n(412),o=n(2389),i=n(9688);var l=r.createContext(void 0);function s(e){var t,n=e.children,a=(t=(0,r.useRef)(!0),(0,r.useMemo)((function(){return{scrollEventsEnabledRef:t,enableScrollEvents:function(){t.current=!0},disableScrollEvents:function(){t.current=!1}}}),[]));return r.createElement(l.Provider,{value:a},n)}function u(){var e=(0,r.useContext)(l);if(null==e)throw new i.i6("ScrollControllerProvider");return e}var c=function(){return a.Z.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null};function d(e,t){void 0===t&&(t=[]);var n=u().scrollEventsEnabledRef,a=(0,r.useRef)(c()),o=(0,i.zX)(e);(0,r.useEffect)((function(){var e=function(){if(n.current){var e=c();o(e,a.current),a.current=e}},t={passive:!0};return e(),window.addEventListener("scroll",e,t),function(){return window.removeEventListener("scroll",e,t)}}),[o,n].concat(t))}function f(){var e=(0,r.useRef)(null),t=(0,o.Z)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:function(n){e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),function(){}}(n):function(e){var t=null,n=document.documentElement.scrollTop>e;return function r(){var a=document.documentElement.scrollTop;(n&&a>e||!n&&a{"use strict";n.d(t,{HX:()=>r,os:()=>a});n(2263);var r="default";function a(e,t){return"docs-"+e+"-"+t}},12:(e,t,n)=>{"use strict";n.d(t,{WA:()=>s});n(7294),n(1688);var r="localStorage";function a(e){var t=e.key,n=e.oldValue,r=e.newValue,a=e.storage;if(n!==r){var o=document.createEvent("StorageEvent");o.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,a),window.dispatchEvent(o)}}function o(e){if(void 0===e&&(e=r),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,i||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),i=!0),null}var t}var i=!1;var l={get:function(){return null},set:function(){},del:function(){},listen:function(){return function(){}}};function s(e,t){if("undefined"==typeof window)return function(e){function t(){throw new Error('Illegal storage API usage for storage key "'+e+'".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.')}return{get:t,set:t,del:t,listen:t}}(e);var n=o(null==t?void 0:t.persistence);return null===n?l:{get:function(){try{return n.getItem(e)}catch(t){return console.error("Docusaurus storage error, can't get key="+e,t),null}},set:function(t){try{var r=n.getItem(e);n.setItem(e,t),a({key:e,oldValue:r,newValue:t,storage:n})}catch(o){console.error("Docusaurus storage error, can't set "+e+"="+t,o)}},del:function(){try{var t=n.getItem(e);n.removeItem(e),a({key:e,oldValue:t,newValue:null,storage:n})}catch(r){console.error("Docusaurus storage error, can't delete key="+e,r)}},listen:function(t){try{var r=function(r){r.storageArea===n&&r.key===e&&t(r)};return window.addEventListener("storage",r),function(){return window.removeEventListener("storage",r)}}catch(a){return console.error("Docusaurus storage error, can't listen for changes of key="+e,a),function(){}}}}}},4711:(e,t,n)=>{"use strict";n.d(t,{l:()=>i});var r=n(2263),a=n(6550),o=n(8780);function i(){var e=(0,r.Z)(),t=e.siteConfig,n=t.baseUrl,i=t.url,l=t.trailingSlash,s=e.i18n,u=s.defaultLocale,c=s.currentLocale,d=(0,a.TH)().pathname,f=(0,o.applyTrailingSlash)(d,{trailingSlash:l,baseUrl:n}),p=c===u?n:n.replace("/"+c+"/","/"),m=f.replace(n,"");return{createUrl:function(e){var t=e.locale;return""+(e.fullyQualified?i:"")+function(e){return e===u?""+p:""+p+e+"/"}(t)+m}}}},5936:(e,t,n)=>{"use strict";n.d(t,{S:()=>i});var r=n(7294),a=n(6550),o=n(9688);function i(e){var t=(0,a.TH)(),n=(0,o.D9)(t),i=(0,o.zX)(e);(0,r.useEffect)((function(){n&&t!==n&&i({location:t,previousLocation:n})}),[i,t,n])}},6668:(e,t,n)=>{"use strict";n.d(t,{L:()=>a});var r=n(2263);function a(){return(0,r.Z)().siteConfig.themeConfig}},8802:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=t.trailingSlash,r=t.baseUrl;if(e.startsWith("#"))return e;if(void 0===n)return e;var a,o=e.split(/[#?]/)[0],i="/"===o||o===r?o:(a=o,n?function(e){return e.endsWith("/")?e:e+"/"}(a):function(e){return e.endsWith("/")?e.slice(0,-1):e}(a));return e.replace(o,i)}},4143:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=void 0,t.getErrorCausalChain=function e(t){return t.cause?[t].concat(e(t.cause)):[t]}},8780:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=t.applyTrailingSlash=t.blogPostContainerID=void 0,t.blogPostContainerID="__blog-post-container";var a=n(8802);Object.defineProperty(t,"applyTrailingSlash",{enumerable:!0,get:function(){return r(a).default}});var o=n(4143);Object.defineProperty(t,"getErrorCausalChain",{enumerable:!0,get:function(){return o.getErrorCausalChain}})},311:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(7294),a=n(1728);const o={loadingRing:"loadingRing_RJI3","loading-ring":"loading-ring_FB5o"};function i(e){var t=e.className;return r.createElement("div",{className:(0,a.Z)(o.loadingRing,t)},r.createElement("div",null),r.createElement("div",null),r.createElement("div",null),r.createElement("div",null))}},22:(e,t,n)=>{"use strict";n.d(t,{w:()=>c});var r=n(4165),a=n(7855),o=n(5861),i=n(1336),l=n.n(i),s=n(1029),u=new Map;function c(e,t){var n=""+e+t,r=u.get(n);return r||(r=function(e,t){return d.apply(this,arguments)}(e,t),u.set(n,r)),r}function d(){return(d=(0,o.Z)((0,r.Z)().mark((function e(t,n){var o,i,u,c;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=""+t+s.J.replace("{dir}",n?"-"+n.replace(/\//g,"-"):""),new URL(o,location.origin).origin===location.origin){e.next=5;break}throw new Error("Unexpected version url");case 5:return e.next=7,fetch(o);case 7:return e.next=9,e.sent.json();case 9:return i=e.sent,u=i.map((function(e,t){var n=e.documents,r=e.index;return{type:t,documents:n,index:l().Index.load(r)}})),c=i.reduce((function(e,t){for(var n,r=(0,a.Z)(t.index.invertedIndex);!(n=r()).done;){var o=n.value;/(?:[\u3400-\u4DBF\u4E00-\u9FFF\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/.test(o[0][0])&&e.add(o[0])}return e}),new Set),e.abrupt("return",{wrappedIndexes:u,zhDictionary:Array.from(c)});case 13:return e.abrupt("return",{wrappedIndexes:[],zhDictionary:[]});case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},8202:(e,t,n)=>{"use strict";n.d(t,{v:()=>c});var r=n(7855),a=n(1336),o=n.n(a);function i(e,t){var n=[];return function e(a,o){if(0!==a.length){var i=a[0];if(/(?:[\u3400-\u4DBF\u4E00-\u9FFF\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/.test(i))for(var l,s=function(e,t){var n=[];return function e(a,o){for(var i,l=0,s=!1,u=(0,r.Z)(t);!(i=u()).done;){var c=i.value;if(a.substr(0,c.length)===c){var d={missed:o.missed,term:o.term.concat({value:c})};a.length>c.length?e(a.substr(c.length),d):n.push(d),s=!0}else for(var f=c.length-1;f>l;f-=1){var p=c.substr(0,f);if(a.substr(0,f)===p){l=f;var m={missed:o.missed,term:o.term.concat({value:p,trailing:!0})};a.length>f?e(a.substr(f),m):n.push(m),s=!0;break}}}s||(a.length>0?e(a.substr(1),{missed:o.missed+1,term:o.term}):o.term.length>0&&n.push(o))}(e,{missed:0,term:[]}),n.sort((function(e,t){var n=e.missed>0?1:0,r=t.missed>0?1:0;return n!==r?n-r:e.term.length-t.term.length})).map((function(e){return e.term}))}(i,t),u=(0,r.Z)(s);!(l=u()).done;){var c=l.value,d=o.concat.apply(o,c);e(a.slice(1),d)}else{var f=o.concat({value:i});e(a.slice(1),f)}}else n.push(o)}(e,[]),n}var l=n(1029);function s(e){return u(e).concat(u(e.filter((function(e){var t=e[e.length-1];return!t.trailing&&t.maybeTyping})),!0))}function u(e,t){return e.map((function(e){return{tokens:e.map((function(e){return e.value})),term:e.map((function(e){return{value:e.value,presence:o().Query.presence.REQUIRED,wildcard:(t?e.trailing||e.maybeTyping:e.trailing)?o().Query.wildcard.TRAILING:o().Query.wildcard.NONE}}))}}))}function c(e,t,n){return function(a,u){var c=function(e,t){if(1===t.length&&["ja","jp","th"].includes(t[0]))return o()[t[0]].tokenizer(e).map((function(e){return e.toString()}));var n=/[^-\s]+/g;return t.includes("zh")&&(n=/[0-9A-Z_a-z]+|(?:[\u3400-\u4DBF\u4E00-\u9FFF\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])+/g),e.toLowerCase().match(n)||[]}(a,l.dK);if(0!==c.length){var d=function(e,t){var n=i(e,t);if(0===n.length)return[{tokens:e,term:e.map((function(e){return{value:e,presence:o().Query.presence.REQUIRED,wildcard:o().Query.wildcard.LEADING|o().Query.wildcard.TRAILING}}))}];for(var a,u=(0,r.Z)(n);!(a=u()).done;){var c=a.value;c[c.length-1].maybeTyping=!0}for(var d,f,p=[],m=(0,r.Z)(l.dK);!(d=m()).done;){var g=d.value;if("en"===g)l._k||p.unshift(o().stopWordFilter);else{var h=o()[g];h.stopWordFilter&&p.unshift(h.stopWordFilter)}}if(p.length>0){var b=function(e){return p.reduce((function(e,t){return e.filter((function(e){return t(e.value)}))}),e)};f=[];for(var v,y=[],w=(0,r.Z)(n);!(v=w()).done;){var k=v.value,E=b(k);f.push(E),E.length0&&y.push(E)}n.push.apply(n,y)}else f=n.slice();for(var x,_=[],S=(0,r.Z)(f);!(x=S()).done;){var C=x.value;if(C.length>2)for(var T=C.length-1;T>=0;T-=1)_.push(C.slice(0,T).concat(C.slice(T+1)))}return s(n).concat(s(_))}(c,t),f=[],p=function(){for(var t,a,o=m.value,i=o.term,l=o.tokens,s=function(){var t=a.value,o=t.documents,s=t.index,u=t.type;if(f.push.apply(f,s.query((function(e){for(var t,n=(0,r.Z)(i);!(t=n()).done;){var a=t.value;e.term(a.value,{wildcard:a.wildcard,presence:a.presence})}})).slice(0,n).filter((function(e){return!f.some((function(t){return t.document.i.toString()===e.ref}))})).slice(0,n-f.length).map((function(t){var n=o.find((function(e){return e.i.toString()===t.ref}));return{document:n,type:u,page:0!==u&&e[0].documents.find((function(e){return e.i===n.p})),metadata:t.matchData.metadata,tokens:l,score:t.score}}))),f.length>=n)return{v:1}},u=(0,r.Z)(e);!(a=u()).done;)if(t=s())return t.v};e:for(var m,g=(0,r.Z)(d);!(m=g()).done&&!p(););!function(e){e.forEach((function(e,t){e.index=t})),e.sort((function(t,n){var r=t.type>0&&t.page?e.findIndex((function(e){return e.document===t.page})):t.index,a=n.type>0&&n.page?e.findIndex((function(e){return e.document===n.page})):n.index;return-1===r&&(r=t.index),-1===a&&(a=n.index),r===a?0===t.type?-1:0===n.type?1:t.index-n.index:r-a}))}(f),function(e){e.forEach((function(t,n){n>0&&t.page&&e.some((function(e){return e.document===t.page}))&&(n{"use strict";function r(e){return e.join(" \u203a ")}n.d(t,{e:()=>r})},1690:(e,t,n)=>{"use strict";function r(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}n.d(t,{X:()=>r})},1073:(e,t,n)=>{"use strict";function r(e,t){for(var n=[],r=0,a=Object.values(e);rr})},2539:(e,t,n)=>{"use strict";n.d(t,{C:()=>o});var r=n(7855),a=n(1690);function o(e,t,n){for(var i,l=[],s=(0,r.Z)(t);!(i=s()).done;){var u=i.value,c=e.toLowerCase().indexOf(u);if(c>=0){c>0&&l.push(o(e.substr(0,c),t)),l.push(""+(0,a.X)(e.substr(c,u.length))+"");var d=c+u.length;d"+(0,a.X)(e)+"":(0,a.X)(e):l.join("")}},726:(e,t,n)=>{"use strict";n.d(t,{o:()=>u});var r=n(7855),a=n(1690),o=n(2539),i=/[0-9A-Z_a-z]+|(?:[\u3400-\u4DBF\u4E00-\u9FFF\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/;function l(e){for(var t=[],n=0,r=e;r.length>0;){var a=r.match(i);if(!a){t.push(r);break}a.index>0&&t.push(r.substring(0,a.index)),t.push(a[0]),n+=a.index+a[0].length,r=e.substring(n)}return t}var s=n(1029);function u(e,t,n,i){void 0===i&&(i=s.Hk);for(var u=function(e,t,n){var i=[],s=0,u=0,c=-1;for(;su)for(var m,g=l(e.substring(u,f)).map((function(e){return{html:(0,a.X)(e),textLength:e.length}})),h=(0,r.Z)(g);!(m=h()).done;){var b=m.value;i.push(b)}-1===c&&(c=i.length),u=f+p,i.push({html:(0,o.C)(e.substring(f,u),n,!0),textLength:p})}}if(u0){var k=f.pop();h+k.textLength<=i?(m.unshift(k.html),b+=k.textLength,h+=k.textLength):(y=!0,f.length=0)}else{if(!(g.length>0))break;var E=g.shift();h+E.textLength<=i?(m.push(E.html),v+=E.textLength,h+=E.textLength):(w=!0,g.length=0)}return(y||f.length>0)&&m.unshift("\u2026"),(w||g.length>0)&&m.push("\u2026"),m.join("")}},1029:(e,t,n)=>{"use strict";n.d(t,{vc:()=>o,gQ:()=>p,H6:()=>u,hG:()=>h,l9:()=>m,dK:()=>r,_k:()=>a,pu:()=>f,AY:()=>c,t_:()=>d,Kc:()=>g,J:()=>i,Hk:()=>s,qo:()=>l,pQ:()=>b});n(1336);var r=["en"],a=!1,o=null,i="search-index{dir}.json",l=8,s=50,u=!1,c=!0,d=!0,f="right",p=void 0,m=!0,g=null,h=!1,b=!1},9318:(e,t,n)=>{"use strict";n.d(t,{lX:()=>w,q_:()=>C,ob:()=>p,PP:()=>L,Ep:()=>f});var r=n(7462);function a(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,a=e.length;r=0;f--){var p=i[f];"."===p?o(i,f):".."===p?(o(i,f),d++):d&&(o(i,f),d--)}if(!u)for(;d--;d)i.unshift("..");!u||""===i[0]||i[0]&&a(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};var l=n(8776);function s(e){return"/"===e.charAt(0)?e:"/"+e}function u(e){return"/"===e.charAt(0)?e.substr(1):e}function c(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function f(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function p(e,t,n,a){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,r.Z)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,a):n.push(a),d({action:r,location:a,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",a=p(e,t,g(),w.location);c.confirmTransitionTo(a,r,n,(function(e){e&&(w.entries[w.index]=a,d({action:r,location:a}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=w.index+e;return t>=0&&t{"use strict";var r=n(9864),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?i:l[e.$$typeof]||a}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var a=p(n);a&&a!==m&&e(t,a,r)}var i=c(n);d&&(i=i.concat(d(n)));for(var l=s(t),g=s(n),h=0;h{"use strict";e.exports=function(e,t,n,r,a,o,i,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,a,o,i,l],c=0;(s=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},5826:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},1336:(e,t,n)=>{var r,a;!function(){var o,i,l,s,u,c,d,f,p,m,g,h,b,v,y,w,k,E,x,_,S,C,T,L,A,D,P,N,O,F,I=function(e){var t=new I.Builder;return t.pipeline.add(I.trimmer,I.stopWordFilter,I.stemmer),t.searchPipeline.add(I.stemmer),e.call(t,t),t.build()};I.version="2.3.9",I.utils={},I.utils.warn=(o=this,function(e){o.console&&console.warn&&console.warn(e)}),I.utils.asString=function(e){return null==e?"":e.toString()},I.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),n=Object.keys(e),r=0;r0){var s=I.utils.clone(t)||{};s.position=[i,l],s.index=a.length,a.push(new I.Token(n.slice(i,o),s))}i=o+1}}return a},I.tokenizer.separator=/[\s\-]+/,I.Pipeline=function(){this._stack=[]},I.Pipeline.registeredFunctions=Object.create(null),I.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&I.utils.warn("Overwriting existing registered function: "+t),e.label=t,I.Pipeline.registeredFunctions[e.label]=e},I.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||I.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},I.Pipeline.load=function(e){var t=new I.Pipeline;return e.forEach((function(e){var n=I.Pipeline.registeredFunctions[e];if(!n)throw new Error("Cannot load unregistered function: "+e);t.add(n)})),t},I.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach((function(e){I.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},I.Pipeline.prototype.after=function(e,t){I.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");n+=1,this._stack.splice(n,0,t)},I.Pipeline.prototype.before=function(e,t){I.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");this._stack.splice(n,0,t)},I.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},I.Pipeline.prototype.run=function(e){for(var t=this._stack.length,n=0;n1&&(oe&&(n=a),o!=e);)r=n-t,a=t+Math.floor(r/2),o=this.elements[2*a];return o==e||o>e?2*a:ol?u+=2:i==l&&(t+=n[s+1]*r[u+1],s+=2,u+=2);return t},I.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},I.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,n=0;t0){var o,i=a.str.charAt(0);i in a.node.edges?o=a.node.edges[i]:(o=new I.TokenSet,a.node.edges[i]=o),1==a.str.length&&(o.final=!0),r.push({node:o,editsRemaining:a.editsRemaining,str:a.str.slice(1)})}if(0!=a.editsRemaining){if("*"in a.node.edges)var l=a.node.edges["*"];else{l=new I.TokenSet;a.node.edges["*"]=l}if(0==a.str.length&&(l.final=!0),r.push({node:l,editsRemaining:a.editsRemaining-1,str:a.str}),a.str.length>1&&r.push({node:a.node,editsRemaining:a.editsRemaining-1,str:a.str.slice(1)}),1==a.str.length&&(a.node.final=!0),a.str.length>=1){if("*"in a.node.edges)var s=a.node.edges["*"];else{s=new I.TokenSet;a.node.edges["*"]=s}1==a.str.length&&(s.final=!0),r.push({node:s,editsRemaining:a.editsRemaining-1,str:a.str.slice(1)})}if(a.str.length>1){var u,c=a.str.charAt(0),d=a.str.charAt(1);d in a.node.edges?u=a.node.edges[d]:(u=new I.TokenSet,a.node.edges[d]=u),1==a.str.length&&(u.final=!0),r.push({node:u,editsRemaining:a.editsRemaining-1,str:c+a.str.slice(2)})}}}return n},I.TokenSet.fromString=function(e){for(var t=new I.TokenSet,n=t,r=0,a=e.length;r=e;t--){var n=this.uncheckedNodes[t],r=n.child.toString();r in this.minimizedNodes?n.parent.edges[n.char]=this.minimizedNodes[r]:(n.child._str=r,this.minimizedNodes[r]=n.child),this.uncheckedNodes.pop()}},I.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},I.Index.prototype.search=function(e){return this.query((function(t){new I.QueryParser(e,t).parse()}))},I.Index.prototype.query=function(e){for(var t=new I.Query(this.fields),n=Object.create(null),r=Object.create(null),a=Object.create(null),o=Object.create(null),i=Object.create(null),l=0;l1?1:e},I.Builder.prototype.k1=function(e){this._k1=e},I.Builder.prototype.add=function(e,t){var n=e[this._ref],r=Object.keys(this._fields);this._documents[n]=t||{},this.documentCount+=1;for(var a=0;a=this.length)return I.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},I.QueryLexer.prototype.width=function(){return this.pos-this.start},I.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},I.QueryLexer.prototype.backup=function(){this.pos-=1},I.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=I.QueryLexer.EOS&&this.backup()},I.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(I.QueryLexer.TERM)),e.ignore(),e.more())return I.QueryLexer.lexText},I.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(I.QueryLexer.EDIT_DISTANCE),I.QueryLexer.lexText},I.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(I.QueryLexer.BOOST),I.QueryLexer.lexText},I.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(I.QueryLexer.TERM)},I.QueryLexer.termSeparator=I.tokenizer.separator,I.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==I.QueryLexer.EOS)return I.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return I.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(I.QueryLexer.TERM),I.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(I.QueryLexer.TERM),I.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(I.QueryLexer.PRESENCE),I.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(I.QueryLexer.PRESENCE),I.QueryLexer.lexText;if(t.match(I.QueryLexer.termSeparator))return I.QueryLexer.lexTerm}else e.escapeCharacter()}},I.QueryParser=function(e,t){this.lexer=new I.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},I.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=I.QueryParser.parseClause;e;)e=e(this);return this.query},I.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},I.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},I.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},I.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case I.QueryLexer.PRESENCE:return I.QueryParser.parsePresence;case I.QueryLexer.FIELD:return I.QueryParser.parseField;case I.QueryLexer.TERM:return I.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(n+=" with value '"+t.str+"'"),new I.QueryParseError(n,t.start,t.end)}},I.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=I.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=I.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+t.str+"'";throw new I.QueryParseError(n,t.start,t.end)}var r=e.peekLexeme();if(null==r){n="expecting term or field, found nothing";throw new I.QueryParseError(n,t.start,t.end)}switch(r.type){case I.QueryLexer.FIELD:return I.QueryParser.parseField;case I.QueryLexer.TERM:return I.QueryParser.parseTerm;default:n="expecting term or field, found '"+r.type+"'";throw new I.QueryParseError(n,r.start,r.end)}}},I.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(null!=t){if(-1==e.query.allFields.indexOf(t.str)){var n=e.query.allFields.map((function(e){return"'"+e+"'"})).join(", "),r="unrecognised field '"+t.str+"', possible fields: "+n;throw new I.QueryParseError(r,t.start,t.end)}e.currentClause.fields=[t.str];var a=e.peekLexeme();if(null==a){r="expecting term, found nothing";throw new I.QueryParseError(r,t.start,t.end)}if(a.type===I.QueryLexer.TERM)return I.QueryParser.parseTerm;r="expecting term, found '"+a.type+"'";throw new I.QueryParseError(r,a.start,a.end)}},I.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(null!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var n=e.peekLexeme();if(null!=n)switch(n.type){case I.QueryLexer.TERM:return e.nextClause(),I.QueryParser.parseTerm;case I.QueryLexer.FIELD:return e.nextClause(),I.QueryParser.parseField;case I.QueryLexer.EDIT_DISTANCE:return I.QueryParser.parseEditDistance;case I.QueryLexer.BOOST:return I.QueryParser.parseBoost;case I.QueryLexer.PRESENCE:return e.nextClause(),I.QueryParser.parsePresence;default:var r="Unexpected lexeme type '"+n.type+"'";throw new I.QueryParseError(r,n.start,n.end)}else e.nextClause()}},I.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var r="edit distance must be numeric";throw new I.QueryParseError(r,t.start,t.end)}e.currentClause.editDistance=n;var a=e.peekLexeme();if(null!=a)switch(a.type){case I.QueryLexer.TERM:return e.nextClause(),I.QueryParser.parseTerm;case I.QueryLexer.FIELD:return e.nextClause(),I.QueryParser.parseField;case I.QueryLexer.EDIT_DISTANCE:return I.QueryParser.parseEditDistance;case I.QueryLexer.BOOST:return I.QueryParser.parseBoost;case I.QueryLexer.PRESENCE:return e.nextClause(),I.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+a.type+"'";throw new I.QueryParseError(r,a.start,a.end)}else e.nextClause()}},I.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var r="boost must be numeric";throw new I.QueryParseError(r,t.start,t.end)}e.currentClause.boost=n;var a=e.peekLexeme();if(null!=a)switch(a.type){case I.QueryLexer.TERM:return e.nextClause(),I.QueryParser.parseTerm;case I.QueryLexer.FIELD:return e.nextClause(),I.QueryParser.parseField;case I.QueryLexer.EDIT_DISTANCE:return I.QueryParser.parseEditDistance;case I.QueryLexer.BOOST:return I.QueryParser.parseBoost;case I.QueryLexer.PRESENCE:return e.nextClause(),I.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+a.type+"'";throw new I.QueryParseError(r,a.start,a.end)}else e.nextClause()}},void 0===(a="function"==typeof(r=function(){return I})?r.call(t,n,t,e):r)||(e.exports=a)}()},2497:(e,t,n)=>{"use strict";n.r(t)},7253:(e,t,n)=>{"use strict";n.r(t)},4865:function(e,t,n){var r,a;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};function a(e,t,n){return en?n:e}function o(e){return 100*(-1+e)}function i(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,a}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=a(e,r.minimum,1),n.status=1===e?null:e;var o=n.render(!t),u=o.querySelector(r.barSelector),c=r.speed,d=r.easing;return o.offsetWidth,l((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(u,i(e,c,d)),1===e?(s(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout((function(){s(o,{transition:"all "+c+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),c)}),c)):setTimeout(t,c)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*a(Math.random()*t,.1,.95)),t=a(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,i=t.querySelector(r.barSelector),l=e?"-100":o(n.status||0),u=document.querySelector(r.parent);return s(i,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&p(a),u!=document.body&&c(u,"nprogress-custom-parent"),u.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&p(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var l=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),s=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,a=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+o)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function o(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,a[1],a[2])}}();function u(e,t){return("string"==typeof e?e:f(e)).indexOf(" "+t+" ")>=0}function c(e,t){var n=f(e),r=n+t;u(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=f(e);u(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function f(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function p(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(a="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=a)},7410:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=d.reach);x+=E.value.length,E=E.next){var _=E.value;if(t.length>e.length)return;if(!(_ instanceof a)){var S,C=1;if(v){if(!(S=o(k,x,e,b))||S.index>=e.length)break;var T=S.index,L=S.index+S[0].length,A=x;for(A+=E.value.length;T>=A;)A+=(E=E.next).value.length;if(x=A-=E.value.length,E.value instanceof a)continue;for(var D=E;D!==t.tail&&(Ad.reach&&(d.reach=F);var I=E.prev;if(N&&(I=s(t,I,N),x+=N.length),u(t,I,C),E=s(t,I,new a(f,h?r.tokenize(P,h):P,y,P)),O&&s(t,E,O),C>1){var R={cause:f+","+m,reach:F};i(e,t,n,E.prev,x,R),d&&R.reach>d.reach&&(d.reach=R.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function s(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}function u(e,t,n){for(var r=t.next,a=0;a"+o.content+""},r}(),a=r;r.default=r,a.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},a.languages.markup.tag.inside["attr-value"].inside.entity=a.languages.markup.entity,a.languages.markup.doctype.inside["internal-subset"].inside=a.languages.markup,a.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(a.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:a.languages[t]},n.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:a.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},a.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(a.languages.markup.tag,"addAttribute",{value:function(e,t){a.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:a.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),a.languages.html=a.languages.markup,a.languages.mathml=a.languages.markup,a.languages.svg=a.languages.markup,a.languages.xml=a.languages.extend("markup",{}),a.languages.ssml=a.languages.xml,a.languages.atom=a.languages.xml,a.languages.rss=a.languages.xml,function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var a=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=r.variable[1].inside,i=0;i]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},a.languages.c=a.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),a.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),a.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},a.languages.c.string],char:a.languages.c.char,comment:a.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:a.languages.c}}}}),a.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete a.languages.c.boolean,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(a),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(a),function(e){var t,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var r={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},a={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:a,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:a})}(a),a.languages.javascript=a.languages.extend("clike",{"class-name":[a.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),a.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,a.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:a.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:a.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:a.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:a.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:a.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),a.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:a.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),a.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),a.languages.markup&&(a.languages.markup.tag.addInlined("script","javascript"),a.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),a.languages.js=a.languages.javascript,function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(a),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return"(?:"+a+"|"+o+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(o),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(a),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",quot:'"'},s=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(a),a.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:a.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},a.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n0)){var l=f(/^\{$/,/^\}$/);if(-1===l)continue;for(var s=n;s=0&&p(u,"variable-input")}}}}function c(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,a=r.inside["interpolation-punctuation"],o=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function l(e,t){return"___"+t.toUpperCase()+"_"+e+"___"}function s(t,n,r){var a={code:t,grammar:n,language:r};return e.hooks.run("before-tokenize",a),a.tokens=e.tokenize(a.code,a.grammar),e.hooks.run("after-tokenize",a),a.tokens}function u(t){var n={};n["interpolation-punctuation"]=a;var o=e.tokenize(t,n);if(3===o.length){var i=[1,1];i.push.apply(i,s(o[1],e.languages.javascript,"javascript")),o.splice.apply(o,i)}return new e.Token("interpolation",o,r.alias,t)}function c(t,n,r){var a=e.tokenize(t,{interpolation:{pattern:RegExp(o),lookbehind:!0}}),i=0,c={},d=s(a.map((function(e){if("string"==typeof e)return e;for(var n,a=e.content;-1!==t.indexOf(n=l(i++,r)););return c[n]=a,n})).join(""),n,r),f=Object.keys(c);return i=0,function e(t){for(var n=0;n=f.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var a=f[i],o="string"==typeof r?r:r.content,l=o.indexOf(a);if(-1!==l){++i;var s=o.substring(0,l),d=u(c[a]),p=o.substring(l+a.length),m=[];if(s&&m.push(s),m.push(d),p){var g=[p];e(g),m.push.apply(m,g)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(m)),n+=m.length-1):r.content=m}}else{var h=r.content;Array.isArray(h)?e(h):e([h])}}}(d),new e.Token(r,d,"language-"+r,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var d={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function f(e){return"string"==typeof e?e:Array.isArray(e)?e.map(f).join(""):f(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in d&&function t(n){for(var r=0,a=n.length;r]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(a),function(e){function t(e,t){return RegExp(e.replace(//g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r*\.{3}(?:[^{}]|)*\})/.source;function o(e,t){return e=e.replace(//g,(function(){return n})).replace(//g,(function(){return r})).replace(//g,(function(){return a})),RegExp(e,t)}a=o(a).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var i=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(i).join(""):""},l=function(t){for(var n=[],r=0;r0&&n[n.length-1].tagName===i(a.content[0].content[1])&&n.pop():"/>"===a.content[a.content.length-1].content||n.push({tagName:i(a.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===a.type&&"{"===a.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===a.type&&"}"===a.content?n[n.length-1].openedBraces--:o=!0),(o||"string"==typeof a)&&n.length>0&&0===n[n.length-1].openedBraces){var s=i(a);r0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(s=i(t[r-1])+s,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",s,null,s)}a.content&&"string"!=typeof a.content&&l(a.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||l(e.tokens)}))}(a),function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],a=[];/^\w+$/.test(n)||a.push(/\w+/.exec(n)[0]),"diff"===n&&a.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:a,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(a),a.languages.git={comment:/^#.*/m,deleted:/^[-\u2013].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m},a.languages.go=a.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),a.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete a.languages.go["class-name"],function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,o){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(a,(function(e){if("function"==typeof o&&!o(e))return e;for(var a,l=i.length;-1!==n.code.indexOf(a=t(r,l));)++l;return i[l]=e,a})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var a=0,o=Object.keys(n.tokenStack);!function i(l){for(var s=0;s=o.length);s++){var u=l[s];if("string"==typeof u||u.content&&"string"==typeof u.content){var c=o[a],d=n.tokenStack[c],f="string"==typeof u?u:u.content,p=t(r,c),m=f.indexOf(p);if(m>-1){++a;var g=f.substring(0,m),h=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),b=f.substring(m+p.length),v=[];g&&v.push.apply(v,i([g])),v.push(h),b&&v.push.apply(v,i([b])),"string"==typeof u?l.splice.apply(l,[s,1].concat(v)):u.content=v}}else u.content&&i(u.content)}return l}(n.tokens)}}}})}(a),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")})),e.languages.hbs=e.languages.handlebars}(a),a.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},a.languages.webmanifest=a.languages.json,a.languages.less=a.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),a.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),a.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},a.languages.objectivec=a.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete a.languages.objectivec["class-name"],a.languages.objc=a.languages.objectivec,a.languages.ocaml={comment:{pattern:/\(\*[\s\S]*?\*\)/,greedy:!0},char:{pattern:/'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,greedy:!0},string:[{pattern:/"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,greedy:!0},{pattern:/\{([a-z_]*)\|[\s\S]*?\|\1\}/,greedy:!0}],number:[/\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,/\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,/\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i],directive:{pattern:/\B#\w+/,alias:"property"},label:{pattern:/\B~\w+/,alias:"property"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"symbol"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,"operator-like-punctuation":{pattern:/\[[<>|]|[>|]\]|\{<|>\}/,alias:"punctuation"},operator:/\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/;;|::|[(){}\[\].,:;#]|\b_\b/},a.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},a.languages.python["string-interpolation"].inside.interpolation.inside.rest=a.languages.python,a.languages.py=a.languages.python,a.languages.reason=a.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),a.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete a.languages.reason.function,function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(a),a.languages.scss=a.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),a.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),a.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),a.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),a.languages.scss.atrule.inside.rest=a.languages.scss,function(e){var t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},r={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:n,punctuation:/[{}()\[\];:,]/};r.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:r}},r.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:r}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:r}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:r}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:r}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:r.interpolation}},rest:r}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:r.interpolation,comment:r.comment,punctuation:/[{},]/}},func:r.func,string:r.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:r.interpolation,punctuation:/[{}()\[\];:.]/}}(a),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(a),a.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/};const o=a},5520:()=>{!function(e){function t(e){return RegExp(/(\()/.source+"(?:"+e+")"+/(?=[\s\)])/.source)}function n(e){return RegExp(/([\s([])/.source+"(?:"+e+")"+/(?=[\s)])/.source)}var r=/(?!\d)[-+*/~!@$%^=<>{}\w]+/.source,a="&"+r,o="(\\()",i="(?=\\s)",l=/(?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\))*\))*\))*/.source,s={heading:{pattern:/;;;.*/,alias:["comment","title"]},comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0,inside:{argument:/[-A-Z]+(?=[.,\s])/,symbol:RegExp("`"+r+"'")}},"quoted-symbol":{pattern:RegExp("#?'"+r),alias:["variable","symbol"]},"lisp-property":{pattern:RegExp(":"+r),alias:"property"},splice:{pattern:RegExp(",@?"+r),alias:["symbol","variable"]},keyword:[{pattern:RegExp(o+"(?:and|(?:cl-)?letf|cl-loop|cond|cons|error|if|(?:lexical-)?let\\*?|message|not|null|or|provide|require|setq|unless|use-package|when|while)"+i),lookbehind:!0},{pattern:RegExp(o+"(?:append|by|collect|concat|do|finally|for|in|return)"+i),lookbehind:!0}],declare:{pattern:t(/declare/.source),lookbehind:!0,alias:"keyword"},interactive:{pattern:t(/interactive/.source),lookbehind:!0,alias:"keyword"},boolean:{pattern:n(/nil|t/.source),lookbehind:!0},number:{pattern:n(/[-+]?\d+(?:\.\d*)?/.source),lookbehind:!0},defvar:{pattern:RegExp(o+"def(?:const|custom|group|var)\\s+"+r),lookbehind:!0,inside:{keyword:/^def[a-z]+/,variable:RegExp(r)}},defun:{pattern:RegExp(o+/(?:cl-)?(?:defmacro|defun\*?)\s+/.source+r+/\s+\(/.source+l+/\)/.source),lookbehind:!0,greedy:!0,inside:{keyword:/^(?:cl-)?def\S+/,arguments:null,function:{pattern:RegExp("(^\\s)"+r),lookbehind:!0},punctuation:/[()]/}},lambda:{pattern:RegExp(o+"lambda\\s+\\(\\s*(?:&?"+r+"(?:\\s+&?"+r+")*\\s*)?\\)"),lookbehind:!0,greedy:!0,inside:{keyword:/^lambda/,arguments:null,punctuation:/[()]/}},car:{pattern:RegExp(o+r),lookbehind:!0},punctuation:[/(?:['`,]?\(|[)\[\]])/,{pattern:/(\s)\.(?=\s)/,lookbehind:!0}]},u={"lisp-marker":RegExp(a),varform:{pattern:RegExp(/\(/.source+r+/\s+(?=\S)/.source+l+/\)/.source),inside:s},argument:{pattern:RegExp(/(^|[\s(])/.source+r),lookbehind:!0,alias:"variable"},rest:s},c="\\S+(?:\\s+\\S+)*",d={pattern:RegExp(o+l+"(?=\\))"),lookbehind:!0,inside:{"rest-vars":{pattern:RegExp("&(?:body|rest)\\s+"+c),inside:u},"other-marker-vars":{pattern:RegExp("&(?:aux|optional)\\s+"+c),inside:u},keys:{pattern:RegExp("&key\\s+"+c+"(?:\\s+&allow-other-keys)?"),inside:u},argument:{pattern:RegExp(r),alias:"variable"},punctuation:/[()]/}};s.lambda.inside.arguments=d,s.defun.inside.arguments=e.util.clone(d),s.defun.inside.arguments.inside.sublist=d,e.languages.lisp=s,e.languages.elisp=s,e.languages.emacs=s,e.languages["emacs-lisp"]=s}(Prism)},4961:(e,t,n)=>{var r={"./prism-lisp":5520};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=4961},2703:(e,t,n)=>{"use strict";var r=n(414);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4448:(e,t,n)=>{"use strict";var r=n(7294),a=n(3840);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n