on master help sign in
Add IDE Readme (#1678)

* Add .vscode settings that are useful for making it easier to build * Ignore the extension output * Add a README that describes how to start the IDE

commite823c5d431ec37063439181540085b01b80016e1 authorNeil Mitchell <35463327+neil-da@users.noreply.github.com> dateFri 14 Jun 2019, 18:10 (7 years ago) parent18df605
5 files changed+100−1
README.md+27−1 extension/.vscode/extensions.json+7 extension/.vscode/launch.json+35 extension/.vscode/settings.json+11 extension/.vscode/tasks.json+20
README.md+27−1
@@ -1 +1,27 @@
1−A lightweight, extensible base for LSP IDE tooling based on Shake and GHC Lib
1+# Haskell IDE Core
2+
3+Our vision is that you should build an IDE by combining:
4+
5+* [hie-bios](https://github.com/mpickering/haskell-ide-engine/tree/hie-bios/hie-bios) for determining where your files are, what the dependencies, what extensions are enabled etc.
6+* `haskell-ide-core` - this library - for defining how to type check, when to type check, and producing messages.
7+* `haskell-lsp` for sending those messages to an LSP server.
8+* A VS Code extension, e.g. `extension` in this directory.
9+
10+There are more details [in this blog post](https://4ta.uk/p/shaking-up-the-ide).
11+
12+## How to use it
13+
14+Let's assume you want to load the `haskell-ide-core` source code in a VS Code IDE.
15+
16+1. `git clone https://github.com/digital-asset/daml.git`
17+2. `cd compiler/haskell-ide-core`
18+3. `stack build`
19+4. `cd extension`
20+5. `npm install`
21+6. `code .`
22+7. Press F5 to start the extension.
23+8. In the spawned extension, open the folder `haskell-ide-core`.
24+9. In the preferences, set the Haskell IDE Core executable preference to `stack` and the arguments to `exec -- ide-demo --ide .ghci`
25+10. Run the Reload Window command in VS Code.
26+
27+Now you should have a working IDE dealing with itself.
extension/.vscode/extensions.jsonnew file+7
@@ -0,0 +1,7 @@
1+{
2+ // See http://go.microsoft.com/fwlink/?LinkId=827846
3+ // for the documentation about the extensions.json format
4+ "recommendations": [
5+ "ms-vscode.vscode-typescript-tslint-plugin"
6+ ]
7+}
extension/.vscode/launch.jsonnew file+35
@@ -0,0 +1,35 @@
1+// A launch configuration that compiles the extension and then opens it inside a new window
2+// Use IntelliSense to learn about possible attributes.
3+// Hover to view descriptions of existing attributes.
4+// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+{
6+ "version": "0.2.0",
7+ "configurations": [{
8+ "name": "Run Extension",
9+ "type": "extensionHost",
10+ "request": "launch",
11+ "runtimeExecutable": "${execPath}",
12+ "args": [
13+ "--extensionDevelopmentPath=${workspaceFolder}"
14+ ],
15+ "outFiles": [
16+ "${workspaceFolder}/out/**/*.js"
17+ ],
18+ "preLaunchTask": "npm: watch"
19+ },
20+ {
21+ "name": "Extension Tests",
22+ "type": "extensionHost",
23+ "request": "launch",
24+ "runtimeExecutable": "${execPath}",
25+ "args": [
26+ "--extensionDevelopmentPath=${workspaceFolder}",
27+ "--extensionTestsPath=${workspaceFolder}/out/test"
28+ ],
29+ "outFiles": [
30+ "${workspaceFolder}/out/test/**/*.js"
31+ ],
32+ "preLaunchTask": "npm: watch"
33+ }
34+ ]
35+}
extension/.vscode/settings.jsonnew file+11
@@ -0,0 +1,11 @@
1+// Place your settings in this file to overwrite default and user settings.
2+{
3+ "files.exclude": {
4+ "out": false // set this to true to hide the "out" folder with the compiled JS files
5+ },
6+ "search.exclude": {
7+ "out": true // set this to false to include "out" folder in search results
8+ },
9+ // Turn off tsc task auto detection since we have the necessary tasks as npm scripts
10+ "typescript.tsc.autoDetect": "off"
11+}
extension/.vscode/tasks.jsonnew file+20
@@ -0,0 +1,20 @@
1+// See https://go.microsoft.com/fwlink/?LinkId=733558
2+// for the documentation about the tasks.json format
3+{
4+ "version": "2.0.0",
5+ "tasks": [
6+ {
7+ "type": "npm",
8+ "script": "watch",
9+ "problemMatcher": "$tsc-watch",
10+ "isBackground": true,
11+ "presentation": {
12+ "reveal": "never"
13+ },
14+ "group": {
15+ "kind": "build",
16+ "isDefault": true
17+ }
18+ }
19+ ]
20+}