{"id":15017658,"url":"https://github.com/jetbrains/intellij-scala","last_synced_at":"2025-05-14T08:05:54.665Z","repository":{"id":1831917,"uuid":"2756223","full_name":"JetBrains/intellij-scala","owner":"JetBrains","description":"Scala plugin for IntelliJ IDEA","archived":false,"fork":false,"pushed_at":"2025-05-12T09:15:45.000Z","size":235622,"stargazers_count":1215,"open_issues_count":10,"forks_count":407,"subscribers_count":109,"default_branch":"idea251.x","last_synced_at":"2025-05-12T10:01:23.258Z","etag":null,"topics":["intellij-idea","intellij-plugin","scala"],"latest_commit_sha":null,"homepage":"http://blog.jetbrains.com/scala","language":"Scala","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"sparkfun/Fritzing_Parts","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JetBrains.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","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":"2011-11-11T14:34:07.000Z","updated_at":"2025-05-09T15:26:59.000Z","dependencies_parsed_at":"2023-09-27T21:28:10.943Z","dependency_job_id":"c94278ff-3188-4f75-8bea-cb8215051901","html_url":"https://github.com/JetBrains/intellij-scala","commit_stats":{"total_commits":34591,"total_committers":228,"mean_commits":"151.71491228070175","dds":0.8374721748431673,"last_synced_commit":"3d7310d97f4a699d7c8c5e56c405c20ce0018b0c"},"previous_names":[],"tags_count":601,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetBrains%2Fintellij-scala","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetBrains%2Fintellij-scala/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetBrains%2Fintellij-scala/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetBrains%2Fintellij-scala/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JetBrains","download_url":"https://codeload.github.com/JetBrains/intellij-scala/tar.gz/refs/heads/idea251.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254101615,"owners_count":22014909,"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":["intellij-idea","intellij-plugin","scala"],"created_at":"2024-09-24T19:50:48.701Z","updated_at":"2025-05-14T08:05:49.656Z","avatar_url":"https://github.com/JetBrains.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![official JetBrains project](http://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)\n[![Scala Plugin Build \u0026 Test](https://github.com/JetBrains/intellij-scala/actions/workflows/build.yml/badge.svg)](https://github.com/JetBrains/intellij-scala/actions/workflows/build.yml)\n[![Discord](https://badgen.net/badge/icon/discord?icon=discord\u0026label)](https://discord.gg/aUKpZzeHCK)\n\n# Scala Plugin for IntelliJ IDEA\n\nThe plugin adds support for the Scala language to [IntelliJ IDEA](https://www.jetbrains.com/idea/). \\\nIt enables multiple features such as:\n - Coding assistance (highlighting, completion, formatting, refactorings, code inspection etc.)\n - Navigation, search, information about types and implicits\n - Integration with build tools: SBT, Maven, Gradle, BSP\n - Testing frameworks support (ScalaTest, MUnit, Specs2, uTest)\n - Scala debugger, worksheets and Ammonite scripts \n - And many more!\n\n(note that HOCON support was moved to a [separate plugin](https://plugins.jetbrains.com/plugin/10481-hocon))\n\n## General information\n\n- To get information about how to install and use this plugin in IDEA, please\n  use [IntelliJ IDEA online help](https://www.jetbrains.com/idea/help/scala.html)\n\n- If you have any question about the Scala plugin, we'd be glad to answer it in our \n[discord channel](https://discord.gg/aUKpZzeHCK)\n\n### Reporting issues\nIf you found a bug, please report it on our [issue tracker](https://youtrack.jetbrains.com/issues/SCL#newissue)\n\n### Contributing\nPlease see [CONTRIBUTING.md](CONTRIBUTING.md)\n\n## Setting up the project\n\n### Prerequisites\nIn order to take part in Scala plugin development, you need:\n\n1. IntelliJ IDEA 2022.3 or higher with a compatible version of Scala plugin\n2. JDK 17 (you can [download it via IntelliJ IDEA](https://www.jetbrains.com/help/idea/sdk.html#define-sdk))\n3. (optional but **recommended**) \\\n   Enable [internal mode](https://plugins.jetbrains.com/docs/intellij/enabling-internal.html) in IDEA to get access to helpful internal actions and debug information\n\n### Setup\n\n1. Clone this repository to your computer\n\n  ```\n  $ git clone https://github.com/JetBrains/intellij-scala.git\n  ```\n\n2. Open IntelliJ IDEA. From the Welcome screen or `File` menu, click `Open`, and point to\nthe directory where you cloned the Scala plugin sources. It will be automatically imported as a sbt project.\n\n3. In the next step, select JDK 17 as project JDK (create it from an installed JDK if necessary).\n\n4. Select the `scalaCommunity` run configuration and select the `Run` or `Debug` button to build and start a\ndevelopment version of IDEA with the Scala plugin.\n\n## Running the Plugin\n\n### Debugging mode\n\nThe easiest way to try your changes is typically to launch the `scalaCommunity` run configuration which is created\nwhen you set up the project as described above.\nUnder the hood it will launch IntelliJ IDEA with pre-installed Scala Plugin, built from sources.\n\n### As a standalone plugin\n\nTo run and distribute a modified version of the plugin in a regular IntelliJ instance, you need to package it.\n\n1. on the sbt shell, run `packageArtifactZip`. This will output the generated plugin zip location\n   (typically into `\u003cproject directory\u003e/target/scala-plugin.zip`).\n2. In IntelliJ, open Preferences, section Plugins, choose \"Install plugin from disk...\" and navigate to the scala-plugin.zip\n3. Restart IntelliJ\n\n## Running the Tests\n\nTo run tests properly, the plugin needs to be packaged.\nOn the sbt shell:\n\n1. `packageArtifact`\n2. `runFastTests`\n\nThe \"fast tests\" can take over an hour. To get a quick feedback on project health, run only the type inference tests:\n\n    \u003e runTypeInferenceTests\n\n### Running a single test / test class with testOnly\nScala Plugin project configuration is different from the standard sbt project.\nOne of the differences is that you don't need to add the sbt project name before the test name. \nJust run `testOnly \u003ctest name\u003e` without the project prefix. \\\nFor example:\n\n    \u003e testOnly org.jetbrains.plugins.scala.annotator.Scala3HighlightingTestsMix\n\n### GitHub Actions build\n\nThe project is configured to build and run the typeInference tests and fast tests with Github Actions. \\\nThe full test suite isn't run to avoid really long build times.\n\n## Common problems\n1. **Error `object BuildInfo is already defined ...` during compilation of the project** \\\n   BuildInfo is an sbt plugin that exposes some of the sbt build metadata to the main project. We use it to forward some dependencies versions from the build sources to main project sources. Sometimes during import this generated source root is added to the `bsp` and `sbt-impl` modules multiple times. Make sure it's only included once by removing duplicates. This can be done in `File \u003e Project Structure...`.\n\n2. **Can't browse IntelliJ Platform sources** \\\n   When loading Scala Plugin project in sbt, the IntelliJ platform is downloaded to `\u003chome\u003e/.ScalaPluginIC/sdk/\u003csdk version\u003e/`.\n   IntelliJ platform sources should be automatically attached after project has been imported and indices have been built. \\\n   However, sometimes this doesn't happen and the sources are not attached. As a result you see decompiled code when opening a Platform API class. \\\n   **Solution:** \\\n   Invoke \"Attach Intellij Sources\" action (you need to enable [internal mode](https://plugins.jetbrains.com/docs/intellij/enabling-internal.html) to access this action\n3. After building the project you see git local changes in `ImportsPanel.java` (or similar files). All `IdeBorderFactory.PlainSmallWithIndent` are replaced with `BorderFactory` \\\n**Solution**: enable [internal mode](https://plugins.jetbrains.com/docs/intellij/enabling-internal.html). \\\nUI Designer uses different border class in internal mode, see `com.intellij.uiDesigner.make.FormSourceCodeGenerator#borderFactoryClassName`\n4. **Unexpected local git changes in `uiDesigner.xml` or other files in .idea directory** \\\n      It may happen due to disable [internal mode](https://plugins.jetbrains.com/docs/intellij/enabling-internal.html) or by enabling it after/during setup. \\\n      The solution to this problem might be to revert these changes, enable [internal mode](https://plugins.jetbrains.com/docs/intellij/enabling-internal.html) (if it has not already been done) and restart IntelliJ.\n5. **The Scala plugin is not loaded when running the `scalaCommunity` / `scalaUltimate` Run Configuration.**\\\n  Unfortunately, there can be multiple reasons for this, like an improperly packaged plugin which cannot be loaded by IDEA at runtime. Check the list of project modules in `File \u003e Project Structure...` and make sure that they don't have a name that starts with `scala.\u003cmodule name\u003e` (e.g. `scala.structure-view`). This is a bug in the sbt import process. If there are modules like this, then remove all modules from the project (in the same Project Structure window) and reimport the project `\u003csbt tab\u003e \u003e Reload All sbt Projects`.\n  **TLDR**:\n   1. Open `File | Project Structure`\n   2. Select \"Modules\"\n   3. Remove all modules except `-build` modules (they have special icon with sbt) and except root modules like (scalaCommunity or scalaUltimate)\n   4. Click \"Ok\"\n   5. Remove `target` directory in the project root (the one that contains `plugin/Scala` directory)\n   6. Reload the project structure\n   7. It should be fixed now! Run the main run configuration (`scalaCommunity` or `scalaUltimate`)\n\n## Other\n### Investigation performance issues\n- YourKit\n- There is a \"Scala plugin profiler\" tool window to track invocations of methods with `@Cached*` or `@Measure` annotations (from `org.jetbrains.plugins.scala.macroAnnotations` package) in real time. The tool window is available in [internal mode](https://plugins.jetbrains.com/docs/intellij/enabling-internal.html) or if `-Dinternal.profiler.tracing=true` is passed to IDEA using [custom VM options](https://www.jetbrains.com/help/idea/tuning-the-ide.html#procedure-jvm-options)\n\n\n### Generating test coverage reports\n\nYou might want to generate a test coverage report for a given package. It can be done by running for example the following:\n```\nsbt \"project scala-impl;set coverageEnabled := true;project scalaCommunity;testOnly org.jetbrains.plugins.scala.codeInspection.declarationRedundancy.*;scala-impl/coverageReport\"\n```\nClose to the very tail of the output of this command you will find a line that gives you the location of the generated report, for example:\n```\n[info] Written HTML coverage report [/Users/alice/intellij-scala/scala/scala-impl/target/scala-2.13/scoverage-report/index.html]\n```\nNote that in order to continue working from IntelliJ IDEA again you need to perform Build \u003e Rebuild Project.\n\n### Lexers and parsers\n\nSee [our dedicated lexer/parser README](./scala/scala-impl/src/org/jetbrains/plugins/scala/lang/README.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjetbrains%2Fintellij-scala","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjetbrains%2Fintellij-scala","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjetbrains%2Fintellij-scala/lists"}