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
Copy file name to clipboardExpand all lines: README.md
+31-38Lines changed: 31 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,8 +27,7 @@ Linting
27
27
# Before you start
28
28
29
29
This extension relies on [Cider nREPL](https://github.com/clojure-emacs/cider-nrepl).
30
-
This means you will need to add it to your ``profiles.clj``. Put the following content to your
31
-
`~/.lein/profiles.clj`:
30
+
This means you will need to add it to your ``profiles.clj``. Put the following content to your `~/.lein/profiles.clj`:
32
31
33
32
```clojure
34
33
{:user {:plugins [[cider/cider-nrepl "0.13.0"]]
@@ -38,68 +37,62 @@ This means you will need to add it to your ``profiles.clj``. Put the following c
38
37
# Getting Started Walkthrough
39
38
40
39
1. Create a Clojure project you wish to connect to. For this guide we will use Leinigen
41
-
```bash
42
-
lein new hello-vscode
43
-
```
44
-
45
-
2. Start a REPL in your terminal, and note the port the REPL is lisening on
46
-
47
-
```bash
48
-
$ cd hello-vscode
49
-
$ lein repl
50
-
nREPL server started on port 45247 on host 127.0.0.1 - nrepl://127.0.0.1:45247
51
-
REPL-y 0.3.7, nREPL 0.2.12
52
-
Clojure 1.8.0
53
-
```
54
40
55
-
Note the port that your nREPL is lisening on, in this case **45247** because you may need it later.
41
+
```bash
42
+
$ lein new hello-vscode
43
+
```
56
44
45
+
2. Start a REPL in your terminal, and note the port the REPL is listening on
57
46
58
-
3. Now Let's Connect to the REPL.
47
+
```bash
48
+
$ cd hello-vscode
49
+
$ lein repl
50
+
nREPL server started on port 45247 on host 127.0.0.1 - nrepl://127.0.0.1:45247
51
+
REPL-y 0.3.7, nREPL 0.2.12
52
+
Clojure 1.8.0
53
+
```
59
54
60
-
* Open the project folder in VS Code.
55
+
Note the port that your nREPL is listening on, inthis case**45247** because you may need it later.
61
56
62
-
* Open a clojure source file such as `src/hello_clojure/core.clj`
57
+
3. Now Let's Connect to the REPL.
63
58
64
-
If you have a repl running, the connection should be made automatically and you should see a repl indicator the status bar that looks like `nrepl://localhost:45247`.
59
+
* Open the project folder in VS Code.
65
60
66
-
If you see the indicator, good news you're connected. Please move onto next step.
61
+
* Open a clojure source file such as `src/hello_clojure/core.clj`
67
62
68
-
*If you DO NOT see the connection indicator, or if you'd like to connect to a remote repl, we will need to create the connection manually.
63
+
If you have a repl running, the connection should be made automatically and you should see a repl indicator the status bar that looks like `nrepl://localhost:45247`.
69
64
70
-
Open the command pallet and select the command `Clojure: Connect to nREPL`
65
+
If you see the indicator, good news you're connected. Please move onto next step.
71
66
72
-
You should then be prompted for an nREPL port, enter the port noted in step #2, `45247`.
67
+
* If you DO NOT see the connection indicator, or if you'd like to connect to a remote repl, we will need to create the connection manually.
73
68
74
-
You should then be prompted for the host of the REPL. In this example we will enter `localhost`.
69
+
Open the command pallet and select the command `Clojure: Connect to nREPL`
75
70
76
-
You should then get a message showing successful connection to the nREPL!
71
+
You should then be prompted for an nREPL port, enter the port noted in step #2, `45247`.
77
72
73
+
You should then be prompted for the host of the REPL. In this example we will enter `localhost`.
78
74
75
+
You should then get a message showing successful connection to the nREPL!
79
76
80
77
4. Eval a file. The repl needs to have it's namespace initialized and set so it can know about and show things like your docstrings.
81
78
82
-
* Open a Clojure source file
83
-
84
-
* Open the command pallet, and select the command `Clojure: Eval`.
79
+
* Open a Clojure source file
85
80
86
-
This should evaluate the entire file, and a file successfully compiled notification should be shown.
81
+
* Open the command pallet, and selectthecommand`Clojure: Eval`.
87
82
83
+
This should evaluate the entire file, and a file successfully compiled notification should be shown.
88
84
89
85
5. Eval a selected expression
90
86
91
-
* Show the output window by using the View / Output from menu bar if it's not already visible.
92
-
93
-
* Select a block of code you wish to evaluate.
94
-
95
-
* Open the command pallet, and select the command `Clojure: Eval and show the result`.
96
-
97
-
* Results from the REPL should be printed to the output window named `Evaluation Results`
87
+
* Show the output window by using the View / Output from menu bar if it's not already visible.
98
88
89
+
* Select a block of code you wish to evaluate.
99
90
91
+
* Open the command pallet, and select the command `Clojure: Eval and show the result`.
100
92
101
-
7. All done, you're ready to code some Clojure :)
93
+
* Results from the REPL should be printed to the output window named `Evaluation Results`
0 commit comments