on master help sign in
Add working .vscode settings for flakes
commit4485427f8477f7222ee3fb382a119b03c3a2daa7 authorSridhar Ratnakumar <srid@srid.ca> dateSun 12 Mar 2023, 20:52 (4 years ago) parent60b9d98
4 files changed+67−4
.vscode/extensions.json+11 .vscode/settings.json+5−4 .vscode/tasks.json+50 shell.nix+1
.vscode/extensions.jsonnew file+11
@@ -0,0 +1,11 @@
1+{
2+ // See https://go.microsoft.com/fwlink/?LinkId=827846
3+ // for the documentation about the extensions.json format
4+ "recommendations": [
5+ "haskell.haskell",
6+ "arrterian.nix-env-selector",
7+ "bbenoist.nix",
8+ "jnoortheen.nix-ide",
9+ "tamasfe.even-better-toml"
10+ ]
11+}
.vscode/settings.json+5−4
@@ -1,5 +1,6 @@
11{
2− "nixEnvSelector.nixShellConfig": "${workspaceRoot}/default.nix",
3− "editor.formatOnType": true,
4− "editor.formatOnSave": true
5−}
2+ "editor.formatOnType": true,
3+ "editor.formatOnSave": true,
4+ "nixEnvSelector.nixFile": "${workspaceRoot}/shell.nix",
5+ "haskell.manageHLS": "PATH"
6+}
.vscode/tasks.jsonnew file+50
@@ -0,0 +1,50 @@
1+
2+{
3+ // Automatically created by phoityne-vscode extension.
4+
5+ "version": "2.0.0",
6+ "presentation": {
7+ "reveal": "always",
8+ "panel": "new"
9+ },
10+ "tasks": [
11+ {
12+ // F7
13+ "group": {
14+ "kind": "build",
15+ "isDefault": true
16+ },
17+ "label": "haskell build",
18+ "type": "shell",
19+ //"command": "cabal configure && cabal build"
20+ "command": "stack build"
21+ },
22+ {
23+ // F6
24+ "group": "build",
25+ "type": "shell",
26+ "label": "haskell clean & build",
27+ //"command": "cabal clean && cabal configure && cabal build"
28+ "command": "stack clean && stack build"
29+ //"command": "stack clean ; stack build" // for powershell
30+ },
31+ {
32+ // F8
33+ "group": {
34+ "kind": "test",
35+ "isDefault": true
36+ },
37+ "type": "shell",
38+ "label": "haskell test",
39+ //"command": "cabal test"
40+ "command": "stack test"
41+ },
42+ {
43+ // F6
44+ "isBackground": true,
45+ "type": "shell",
46+ "label": "haskell watch",
47+ "command": "stack build --test --no-run-tests --file-watch"
48+ }
49+ ]
50+}
shell.nixnew file+1
@@ -0,0 +1 @@
1+(builtins.getFlake ("git+file://" + toString ./.)).devShells.${builtins.currentSystem}.default