Skip to content

Commit 47298f2

Browse files
committed
w.i.p. add structure for walkthroughs
1 parent 4bfa41c commit 47298f2

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

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)