- Clone this project;
- Go to root of project;
- Start
sbt
from the shell which will download automatically the IntelliJ Community SDK with sources; - Install/enable the following plugins in IntelliJ: Plugin Devkit, Grammar-Kit and PsiViewer;
- Import this project as an sbt project in IntelliJ;
- Select
Build
>Build Project
;
- Right-click on top of
intellij-haskell.iml
insideintellij-haskell
folder; - Select
Import module
; - Be sure
unmanaged-jars
dependency is set toprovided
insideProject structure
>Project settings
>Modules
>Dependencies
(btw, settingprovided
inside sbt file gives an error); - Right-click on top of
intellij-haskell
plugin module and selectPrepare Plugin Module 'intellij-haskell' for deployment
;
- In
SDKs
create Jetbrains JDK by choosingAdd JDK...
and selecting the path to the JDK which is included in the IntelliJ application; - Create Project SDK in
Project structure
>Project settings
>Project
by using theAdd SDK
option and selectingIntellij Platform Plugin SDK
and setting the path to the IntelliJ folder. Select as JDK the just created JDK of the previous step; - Set Plugin SDK settings right inside
Project structure
>Platform settings
>SDKs
. For example, set SDK home path toidea/142.5239.7
inside project root folder; - Set
Module-SDK
right forintellij-haskell
plugin module insideProject structure
>Project structure
>Project settings
>Modules
; - To run plugin inside IntelliJ, the first-run configuration has to be created. Navigate to
Run
>Edit configurations
and createplugin
configuration forintellij-haskell
;
- After making changes to
_HaskellLexer.flex
, runRun Flex Generator
. This will generate_HaskellLexer.java
; - After making changes to
haskell.bnf
, runGenerate Parser Code
. This will generate parser Java files ingen
directory; - Never touch the generated code. They should be committed as-is.
- Add
sources.zip
"inside"idea
>[idea build #
] toProject structure
>Project settings
>Modules
>Dependencies
>unmanaged-jars
to see IntelliJ sources;