Skip to content

Commit b528633

Browse files
committed
w.i.p. add structure for walkthroughs
1 parent 2adfa68 commit b528633

File tree

9 files changed

+108
-1
lines changed

9 files changed

+108
-1
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ Verify your Juvix installation with:
5656
juvix --version
5757
```
5858

59+
60+
5961
## Usage
6062

6163
This extension provides semantic syntax highlighting for Juvix files and multiple commands accessible through the Command Palette. Note that you need to edit Juvix files within a workspace folder for the extension to function correctly.
@@ -93,6 +95,18 @@ Some common settings you can tweak include:
9395

9496
Make sure to reload the window if prompted for some changes to take effect.
9597

98+
99+
## Walkthrough
100+
101+
This extension includes a walkthrough to help you get started with Juvix development in VSCode. To access the walkthrough:
102+
103+
1. Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on Mac).
104+
2. Type "Get Started: Open Walkthrough" and select it.
105+
3. Choose "Get Started with Juvix" from the list of walkthroughs.
106+
107+
Follow the steps in the walkthrough to learn how to use the main features of the Juvix extension.
108+
109+
96110
## Features
97111

98112
- **Type-checking, Compilation, and Execution** of Juvix code.

assets/compile.png

481 KB
Loading

assets/install-juvix.png

481 KB
Loading

assets/open-juvix-file.png

481 KB
Loading
481 KB
Loading

assets/repl.png

481 KB
Loading

assets/typecheck.png

481 KB
Loading

package.json

Lines changed: 88 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,87 @@
6262
"editor.semanticHighlighting.enabled": true,
6363
"editor.autoDetect": true,
6464
"contributes": {
65+
"walkthroughs": [
66+
{
67+
"id": "juvixWalkthrough",
68+
"title": "Get Started with Juvix",
69+
"description": "Learn how to use the Juvix extension for VSCode",
70+
"steps": [
71+
{
72+
"id": "installJuvix",
73+
"title": "Install Juvix",
74+
"description": "Make sure you have Juvix installed on your system.",
75+
"media": {
76+
"image": "assets/install-juvix.png",
77+
"altText": "Juvix installation"
78+
},
79+
"completionEvents": [
80+
"onCommand:juvix-mode.installJuvixBinary"
81+
]
82+
},
83+
{
84+
"id": "openJuvixFile",
85+
"title": "Open a Juvix File",
86+
"description": "Open or create a new Juvix file to start coding.",
87+
"media": {
88+
"image": "assets/open-juvix-file.png",
89+
"altText": "Open Juvix file"
90+
},
91+
"completionEvents": [
92+
"onLanguage:Juvix"
93+
]
94+
},
95+
{
96+
"id": "openJuvixMarkdownFile",
97+
"title": "Open a Juvix Markdown File",
98+
"description": "Open or create a new Juvix Markdown file to start coding.",
99+
"media": {
100+
"image": "assets/open-juvix-markdown-file.png",
101+
"altText": "Open Juvix Markdown file"
102+
},
103+
"completionEvents": [
104+
"onLanguage:JuvixMarkdown"
105+
]
106+
},
107+
{
108+
"id": "typecheck",
109+
"title": "Typecheck Your Code",
110+
"description": "Use the typecheck command to verify your Juvix code.",
111+
"media": {
112+
"image": "assets/typecheck.png",
113+
"altText": "Typecheck Juvix code"
114+
},
115+
"completionEvents": [
116+
"onCommand:juvix-mode.typecheck"
117+
]
118+
},
119+
{
120+
"id": "compile",
121+
"title": "Compile Your Code",
122+
"description": "Compile your Juvix code using the compile command.",
123+
"media": {
124+
"image": "assets/compile.png",
125+
"altText": "Compile Juvix code"
126+
},
127+
"completionEvents": [
128+
"onCommand:juvix-mode.compile"
129+
]
130+
},
131+
{
132+
"id": "useRepl",
133+
"title": "Use the Juvix REPL",
134+
"description": "Open the Juvix REPL to interactively work with your code.",
135+
"media": {
136+
"image": "assets/repl.png",
137+
"altText": "Juvix REPL"
138+
},
139+
"completionEvents": [
140+
"onCommand:juvix-mode.openRepl"
141+
]
142+
}
143+
]
144+
}
145+
],
65146
"configurationDefaults": {
66147
"[Juvix]": {
67148
"editor.insertSpaces": true,
@@ -460,7 +541,13 @@
460541
]
461542
}
462543
],
544+
463545
"commands": [
546+
{
547+
"command": "juvix-mode.openWalkthrough",
548+
"title": "Open Juvix Walkthrough",
549+
"category": "Juvix"
550+
},
464551
{
465552
"command": "juvix-mode.installJuvixBinary",
466553
"title": "Install Juvix Binary",
@@ -888,4 +975,4 @@
888975
"webpack": "^5.92.1",
889976
"webpack-cli": "^5.1.4"
890977
}
891-
}
978+
}

src/extension.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ export async function activate(context: vscode.ExtensionContext) {
5757
check.activate(context, juvixDiagnosticCollection);
5858
context.subscriptions.push(juvixDiagnosticCollection);
5959

60+
context.subscriptions.push(
61+
vscode.commands.registerCommand('juvix-mode.openWalkthrough', () => {
62+
vscode.commands.executeCommand('workbench.action.openWalkthrough', 'Heliax.juvix-mode#juvixWalkthrough');
63+
})
64+
);
65+
6066
vscode.commands.executeCommand('setContext', 'juvix-mode:ready', true);
6167
}
6268
}

0 commit comments

Comments
 (0)