You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**If you plan to publish your extension**: At least a skim through Microsofts [Publishing extensions](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) guide and one skim through the corresponding [Publishing Extensions](https://github.com/EclipseFdn/open-vsx.org/wiki/Publishing-Extensions) guide for [open-vsx](https://open-vsx.org/).
29
30
30
31
Add your curiosity and you should be good to go. To just try the template/workflow out, you do not need to know any ClojureScript (or even programming). When you start to try make the extension do something interesting, you will need to know _some_ Clojure/ClojureScript. Learning Clojure will be a fun endeavor, I promise.
31
32
32
33
## How do I get started?
33
34
34
35
On Github **Use this template**, and name your repository, say you are full of imagination and name it **my-extension**. Clone your repo and open it in VS Code.
36
+
> **You may want to wait with renaming the extension itself** until you've confirmed that you can compile and start it, and connect the REPL for development. When that's confirmed, renaming the extension is mainly a matter of a global search and replace in the project. Something like so:
37
+
> 1. Make a global search (<kbd>cmd/ctrl</kbd>+<kbd>shift</kbd>+<kbd>f</kbd>) for `vsc-et`. Activate case sensitivity and whole-word matching for precision. Study the results, removing the ones you don't think apply (I think it's safe to replace all occurrences). Expand the replace input and study the results list some more before clicking the **Replace All** button.
38
+
> 1. Make a global search replace of “Extension Template”, similarly case sensitive and matching whole words.
39
+
> 1. The publisher of the extension template is `betterthantomorrow`, which you will need to change if you are to publish your extension to the marketplace. See above under prerequisites for the guides to go through to get your publisher id.
35
40
36
-
Then the paved path is:
41
+
### Starting the extension
42
+
43
+
... and connecting the ClojureScript REPL.
44
+
45
+
The paved path is:
37
46
38
47
1. <kbd>cmd/ctrl</kbd>+<kbd>shift</kbd>+<kbd>b</kbd>. This starts the default build task, which is configured (in [.vscode/tasks.json](.vscode/tasks.json) to start shadow-cljs watcher.
39
48
* Let it compile the extension and run the tests.
40
-
1. <kbd>F5</kbd>. Starts the VS Code Development Extension host (because configured to do so in [.vscode/launch.json](.vscode/launch.json))
49
+
1. <kbd>F5</kbd> starts the VS Code Development Extension host (because configured to do so in [.vscode/launch.json](.vscode/launch.json))
41
50
* This is a VS Code window where your extension under development is installed.
42
51
1. In the extension development host <kbd>cmd/ctrl</kbd>+<kbd>shift</kbd>+<kbd>p</kbd>, find and run the command **Extension template: Say hello!**
43
52

@@ -46,12 +55,16 @@ Then the paved path is:
46
55
1. Select the project root **my-extension**
47
56
1. Select the project type **shadow-cljs**
48
57
1. Select to connect to the build `:extension`
49
-
* Now you can hack on the extension code and the extension in the development host window will be updated while it is running (interactive programming).
58
+
* Now you can hack on the extension code and the extension in the development host window will be updated while it is running (a.k.a. interactive programming).
50
59
51
60
The important thing to note here is the steps where you activate your extension in the development host, starting the ClojureScript repl which Calva can connect to. Depending on the extension you build, it may be that it activates automatically, or by some specific file appearing or whatever. The point is that it needs to be started for Calva to connect to it, and it starting the development host is often not enough to start your extension. (You can actually start the Calva connect before you start the extension host. Calva will connect when the repl is started.)
52
61
53
62
To be continued...
54
63
64
+
### Publishing your extension
65
+
66
+
Possibly carrying out the steps at [create your own organization](https://learn.microsoft.com/azure/devops/organizations/accounts/create-organization)
67
+
55
68
## Who built this?
56
69
57
70
My name is Peter Strömberg, a.k.a. [PEZ](https://github.com/PEZ). I love Clojure and VS Code, and I love to build things. I created Calva, an extension for working with Clojure in VS Code. I also co-created Joyride, a scripting environment for VS Code that lets you extend the editor in user space (i.e. without creating an extension). I've also created Paste Replace, and a whole bunch of Joyride scripts, big and small (mostly small).
0 commit comments