mirror of
https://github.com/ilyakooo0/intellij-haskell.git
synced 2024-09-11 14:56:19 +03:00
2.2 KiB
2.2 KiB
How to build project
- Clone this project;
- Go to root of project;
- Run task
sbt updateIntellij
from the shell; - Install/enable the following plugins in IntelliJ: Plugin Devkit, Grammar-Kit and PsiViewer;
- Import this project as an sbt project in IntelliJ;
- Be sure
JVM SDK
insideLanguages & Frameworks
>Scala Compiler Server
is set to1.8
, since the Scala compiler version (2.13.0) which this plugin is currently using is not compatible with Java 7 or lower, Java 9 is not yet supported; - Select
Build
>Build Project
;
How to prepare plugin for deployment
- 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 error); - Right click on top of
intellij-haskell
plugin module and selectPrepare Plugin Module 'intellij-haskell' for deployment
;
How to run/debug plugin inside IntelliJ
- Create Project SDK in
Project structure
>Project settings
>Project
by using theNew
button and selectingIntellij Platform Plugin SDK
and setting the path to the IntelliJ folder; - Set Plugin SDK settings right inside
Project structure
>Platform settings
>SDKs
. For example to, 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, first run configuration has to be created. Navigate to
Run
>Edit configurations
and createplugin
configuration forintellij-haskell
;
Development remarks
- 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
insideidea
>[idea build #
] toProject structure
>Project settings
>Modules
>Dependencies
>unmanaged-jars
to see IntelliJ sources;