GithubHelp home page GithubHelp logo

00mjk / intellij-scala Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jetbrains/intellij-scala

0.0 0.0 0.0 167.23 MB

Scala plugin for IntelliJ IDEA

Home Page: http://blog.jetbrains.com/scala

License: Apache License 2.0

Scala 91.77% Java 7.55% HTML 0.42% Lex 0.26%

intellij-scala's Introduction

official JetBrains project Scala Plugin Build & Test Gitter

Scala Plugin for IntelliJ IDEA

Plugin that implements Scala, sbt, Play 2, SSP and Hocon support in IntelliJ IDEA.

General information

Setting up the project

Prerequisites

In order to take part in Scala plugin development, you need:

  1. IntelliJ IDEA 2020.1 or higher with a compatible version of Scala plugin
  2. JDK 8
  3. (optional but recommended) Enable "internal mode" in IDEA

Setup

  1. Clone this repository to your computer
$ git clone https://github.com/JetBrains/intellij-scala.git
  1. Open IntelliJ IDEA, select File -> New -> Project from existing sources, point to the directory where the Scala plugin repository is and then import it as sbt project.

  2. In the next step, select JDK 8 as project JDK (create it from an installed JDK if necessary).

  3. Select the scalaCommunity run configuration and select the Run or Debug button to build and start a development version of IDEA with the Scala plugin.

Browsing IntelliJ platform sources

When loading the plugin in sbt, the IntelliJ platform is downloaded to <home>/.ScalaPluginIC/sdk/<sdk version>/. IntelliJ platform sources should automatically attach after project has been imported and indices have been built.

However, if this didn't happen, and if you're seeing decompiled code when opening a platform API class you can click the option "attach sources" at the top of the editor, navigate to the sdk directory and select sources.zip, then choose "All".

Tests

To run tests properly, the plugin needs to be packaged. On the sbt shell:

  1. packageArtifact
  2. runFastTests

The "fast tests" can take over an hour. To get a quick feedback on project health, run only the type inference tests:

> runTypeInferenceTests

GitHub Actions build

The project is configured to build and run the typeInference tests and fast tests with Github Actions. The full test suite isn't run to avoid really long build times.

Running the plugin

Debugging mode

The easiest way to try your changes is typically to launch the scalaCommunity run configuration which is created when you set up the project as described above.

As a standalone plugin

To run and distribute a modified version of the plugin in a regular IntelliJ instance, you need to package it.

  1. on the sbt shell, run packageArtifactZip. This will output the generated plugin zip location (typically into <project directory>/target/scala-plugin.zip).
  2. In IntelliJ, open Preferences, section Plugins, choose "Install plugin from disk..." and navigate to the scala-plugin.zip
  3. Restart IntelliJ

intellij-scala's People

Contributors

adkozlov avatar advancedxy avatar alefas avatar darthorimar avatar donnerpeter avatar ghik avatar ilinum avatar ilyasergey avatar ivan-afonichkin avatar jamesbrain avatar janm399 avatar jastice avatar katejim avatar kseniasautina avatar lugzan avatar lukaszwawrzyk avatar maris123 avatar mutcianm avatar niktrop avatar oowekyala avatar pavelfatin avatar radoburansky avatar retronym avatar samvel1024 avatar semkagtn avatar srtobi avatar sugakandrey avatar tpasternak avatar unkarjedy avatar yalishevant avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.