{"id":20727923,"url":"https://github.com/scalameta/metals-sublime","last_synced_at":"2026-04-10T22:03:45.148Z","repository":{"id":33976289,"uuid":"161761630","full_name":"scalameta/metals-sublime","owner":"scalameta","description":"Sublime Text package for Metals, a language server for Scala","archived":false,"fork":false,"pushed_at":"2024-12-09T14:49:12.000Z","size":122,"stargazers_count":17,"open_issues_count":12,"forks_count":13,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-23T19:49:16.441Z","etag":null,"topics":["language-server-client","lsp","metals","scala","sublime-text","tooling"],"latest_commit_sha":null,"homepage":"https://packagecontrol.io/packages/LSP-metals","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scalameta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-12-14T09:25:11.000Z","updated_at":"2025-03-27T01:40:28.000Z","dependencies_parsed_at":"2024-04-19T18:50:41.007Z","dependency_job_id":"88f4bdd5-088b-4967-ae43-d148096516b5","html_url":"https://github.com/scalameta/metals-sublime","commit_stats":null,"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"purl":"pkg:github/scalameta/metals-sublime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalameta%2Fmetals-sublime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalameta%2Fmetals-sublime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalameta%2Fmetals-sublime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalameta%2Fmetals-sublime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scalameta","download_url":"https://codeload.github.com/scalameta/metals-sublime/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalameta%2Fmetals-sublime/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265023840,"owners_count":23699584,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["language-server-client","lsp","metals","scala","sublime-text","tooling"],"created_at":"2024-11-17T04:34:49.338Z","updated_at":"2026-04-10T22:03:40.097Z","avatar_url":"https://github.com/scalameta.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LSP-Metals\n\n![lsp-metals](https://i.imgur.com/vJKP0T3.gif)\n\n`LSP-metals` is the recommended [Sublime LSP](https://packagecontrol.io/packages/LSP) extension for [Metals](https://scalameta.org/metals/), the Scala language server. `LSP-metals` offers automated Metals installation, easy configuration, Metals-specific commands and many other small features.\n\n\u003cp\u003e\n    \u003ca href=\"https://discord.gg/qSWW6khxjD\"\u003e\n        \u003cimg alt=\"Discord\" src=\"https://img.shields.io/discord/632642981228314653\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n## Table of Contents\n  - [Requirements](#requirements)\n  - [Installing LSP-metals](#installing-lsp-metals)\n  - [Importing a build](#importing-a-build)\n    - [Speeding up import](#speeding-up-import)\n    - [Importing changes](#importing-changes)\n  - [Configuration](#configuration)\n    - [Java version](#java-version)\n    - [Server version](#server-version)\n  - [Workplace Diagnostic](#workplace-diagnostic)\n  - [Run doctor](#run-doctor)\n  - [All Available Commands](#all-available-commands)\n  - [Show document symbols](#show-document-symbols)\n  - [Formatting on save](#formatting-on-save)\n  - [Organize imports on save](#organize-imports-on-save)\n  - [Decoration protocol](#decoration-protocol)\n  - [Status Bar](#status-bar)\n  - [Troubleshooting](#troubleshooting)\n\n\n\n### Requirements\n\n- Sublime Text (build 4000 or later)\n- [LSP](https://github.com/tomv564/LSP) package: `Command Palette (Cmd + Shift + P) \u003e Install package \u003e LSP`\n- Java 8 or 11 provided by OpenJDK or Oracle. Eclipse OpenJ9 is not supported,\n    please make sure the JAVA_HOME environment variable points to a valid Java 8 or\n    11 installation.\n\n### Installing LSP-metals\n\nOnce you have `LSP` installed, you can then install Metals via\n\n- Automatically via package control: `Command Palette (Cmd + Shift + P) \u003e Install package \u003e LSP-metals`\n\n- manually: run `git clone https://github.com/scalameta/metals-sublime.git LSP-metals` in your sublime packages directory \n\n### Importing a build\n\nThe first time you open Metals in a new workspace it prompts you to import the\nbuild. Click \"Import build\" to start the installation step.\n\n![Build Import](https://i.imgur.com/eUk30Zy.png)\n\n- \"Not now\" disables this prompt for 2 minutes.\n- \"Don't show again\" disables this prompt forever, use rm -rf .metals/ to\n    re-enable the prompt.\n- Run `lsp toggle server panel` in the command palette to watch the build import progress. You can optionally add a key binding for this command.\n- Behind the scenes, Metals uses Bloop to import sbt builds, but you don't need\n    Bloop installed on your machine to run this step.\n\nOnce the import step completes, compilation starts for your open *.scala files.\n\nOnce the sources have compiled successfully, you can navigate the codebase with\ngoto definition.\n\n#### Speeding up import\n\nThe \"Import build\" step can take a long time, especially the first time you run\nit in a new build.  The exact time depends on the complexity of the build and if\nlibrary dependencies need to be downloaded. For example, this step can take\neverything from 10 seconds in small cached builds up to 10-15 minutes in large\nuncached builds.\n\nConsult the Bloop [documentation](https://scalacenter.github.io/bloop/docs/what-is-bloop) to learn how to speed up build import.\n\n#### Importing changes\n\nWhen you change build.sbt or sources under project/, you will be prompted to\nre-import the build.\n\n### Configuration\n\nYou can edit the package settings by running `LSP-metals Settings` in the sublime palette or accessing `Preferences \u003e Package Settings \u003e LSP \u003e Servers \u003e LSP-metals`.\n\n![config](https://i.imgur.com/WFSJKV0.png)\n\n#### Java version\nThe `LSP-metals` extension by default uses the `JAVA_HOME` environment variable\n(via [`environ`](https://docs.python.org/3/library/os.html#os.environ)). Otherwise, it uses [which](https://docs.python.org/3/library/shutil.html#shutil.which) to locate the `java` executable.\n\nIf no `JAVA_HOME` is detected you can then open Settings by following the\ninstructions in the displayed error message.\n\n![No Java Home](https://i.imgur.com/yLrqzGP.png)\n\n\n#### Server version\n\nIn order to install the latest snapshot of metals you can explicitly set the snapshot version for `server_version`. Alternatively, you can also just default to the latest snapshot by setting `server_version` to `latest-snapshot`.\nThe same can be done for the latest stable release by setting the value to `latest-stable`, If no version is set, it defaults to the latest stable release as well.\n\nThe new release check in done each time sublime text is started.\n\n### Workplace Diagnostic\n\nTo see all compilation errors and warnings in the workspace, run the following command `Toggle Diagnostics Panel` Or use the default mapping `super+shift+M` / `ctr+alt+M`\n\nTo cycle through the diagnostic use the default mapping Next `F4` / Previous `shift+F4` \n\n![diagnostic](https://i.imgur.com/uRSLJJ0.gif)\n\n### Run doctor\n\nTo troubleshoot problems with your build workspace, run `Doctor run` in the command pallet. This command opens a browser window.\n\n![Run Doctor Command](https://i.imgur.com/yelm0jd.png)\n\n\n### All Available Commands\n\nThe following commands can be invoked simply via the sublime command palette.\n\n  - [Build Import](https://scalameta.org/metals/docs/editors/new-editor.html#import-build)\n  - [Build Connect](https://scalameta.org/metals/docs/editors/new-editor.html#connect-to-build-server)\n  - [compile Cascade](https://scalameta.org/metals/docs/editors/new-editor.html#cascade-compile)\n  - [Compile Cancel](https://scalameta.org/metals/docs/editors/new-editor.html#cancel-compilation)\n  - [Doctor Run](https://scalameta.org/metals/docs/editors/new-editor.html#run-doctor)\n  - [New Scala File](https://scalameta.org/metals/docs/editors/new-editor.html#create-new-scala-file): Also available in the side bar context menu. ![Peek 2020-07-19 16-48](https://user-images.githubusercontent.com/1632384/87877673-e5e37300-c9df-11ea-9516-6fccb221e3f6.gif) \n\n\n### Show document symbols\n\nRun the `Document Symbols` command to show a symbol outline for the current file. You can also set a key binding for the `lsp_document_symbols` command\n\n![Document Symbols](https://i.imgur.com/z5mqk8D.gif)\n\n### Formatting on save\n\nIf you'd like to have `LSP-metals` format your file on document save then make sure to add this setting to your Sublime settings, Syntax-specific settings and/or in Project files. \n\n```\n\"lsp_format_on_save\": true,\n...\n```\n\n### Organize imports on save\n\nIf you'd like to have `LSP-metals` organize your imports on document save then make sure to add this to your `LSP` settings.\n\n```\n\"lsp_code_actions_on_save\":{\n  \"source.organizeImports\": true\n},\n...\n```\n\n### Decoration protocol\n\nThis plugin implements the [Decoration protocol](https://scalameta.org/metals/docs/editors/decoration-protocol.html) (only for ST4) which allows showing worksheet evaluations (instead of comments), as well as inferred types and other info as Sublime Phantom.\n\nTo enable this feature enable the following `LSP-metals` settings:\n\n```\n\"settings\": {\n  \"metals\": {\n    ...\n    \"showInferredType\": true,\n    \"showImplicitArguments\": true,\n    \"showImplicitConversionsAndClasses\": true\n  }\n}\n\n```\n### Status Bar\n\nInformation about your workspace build like compilation errors count, build status, etc. are displayed by Metals in the sublime status bar.\n\n![Status bar info](https://i.imgur.com/0mIi6XB.gif)\n\n### Troubleshooting\n\nIf you have any questions or issues with LSP-metals, please submit an\n[issue](https://github.com/scalameta/metals-sublime/issues) in this repository if it is related to the extension. \n\nIf the issue is general to Metals, please submit it\nin the [Metals issue repo](https://github.com/scalameta/metals/issues). \n\nIf you have any feature requests, we also have a feature request [issue\nrepo](https://github.com/scalameta/metals-feature-requests). \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscalameta%2Fmetals-sublime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscalameta%2Fmetals-sublime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscalameta%2Fmetals-sublime/lists"}