|
4 | 4 |
|
5 | 5 | I'm trying, believe me! |
6 | 6 |
|
7 | | - |
8 | | - |
9 | 7 | # Supported Features |
10 | 8 |
|
11 | 9 | * Code completion |
| 10 | + |
| 11 | + |
| 12 | + |
12 | 13 | * Code navigation |
| 14 | + |
| 15 | + |
| 16 | + |
13 | 17 | * Interaction with REPL |
14 | 18 | * Showing documentation on hover |
15 | 19 | * Function signatures |
16 | 20 |
|
| 21 | + |
| 22 | + |
17 | 23 | # Features That Are Not Supported (But Nice to Have) |
18 | 24 |
|
19 | 25 | * Linting |
20 | 26 | * [Debug](https://github.com/indiejames/vscode-clojure-debug) |
21 | 27 |
|
22 | | -# Before you start |
23 | | - |
24 | | -This extension relies on [Cider nREPL](https://github.com/clojure-emacs/cider-nrepl). |
25 | | -This means you will need to add it to your ``profiles.clj``. Put the following content to your `~/.lein/profiles.clj`: |
26 | | - |
27 | | -```clojure |
28 | | -{:user {:plugins [[cider/cider-nrepl "0.13.0"]] |
29 | | - :dependencies [[org.clojure/tools.nrepl "0.2.12"]]}} |
30 | | -``` |
31 | | - |
32 | | -# Getting Started Walkthrough |
33 | | - |
34 | | -1. Create a Clojure project you wish to connect to. For this guide we will use Leinigen |
35 | | - |
36 | | - ```bash |
37 | | - $ lein new hello-vscode |
38 | | - ``` |
39 | | - |
40 | | -2. Start a REPL in your terminal, and note the port the REPL is listening on |
41 | | - |
42 | | - ```bash |
43 | | - $ cd hello-vscode |
44 | | - $ lein repl |
45 | | - nREPL server started on port 45247 on host 127.0.0.1 - nrepl://127.0.0.1:45247 |
46 | | - REPL-y 0.3.7, nREPL 0.2.12 |
47 | | - Clojure 1.8.0 |
48 | | - ``` |
49 | | - |
50 | | - Note the port that your nREPL is listening on, in this case **45247** because you may need it later. |
51 | | - |
52 | | -3. Now Let's Connect to the REPL. |
53 | | -
|
54 | | - 3.1 Open the project folder in VS Code. |
55 | | -
|
56 | | - * Open a clojure source file such as `src/hello_clojure/core.clj` |
57 | | -
|
58 | | - 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 | | -
|
60 | | - If you see the indicator, good news you're connected. Please move onto next step. |
61 | | - |
62 | | - * 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 | | -
|
64 | | - Open the command pallet and select the command `Clojure: Connect to nREPL` |
65 | | -
|
66 | | - You should then be prompted for an nREPL port, enter the port noted in step #2, `45247`. |
67 | | -
|
68 | | - You should then be prompted for the host of the REPL. In this example we will enter `localhost`. |
69 | | -
|
70 | | - You should then get a message showing successful connection to the nREPL! |
| 28 | +# Quickstart |
71 | 29 |
|
72 | | -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. |
73 | | - |
74 | | - * Open a Clojure source file |
75 | | - |
76 | | - * Open the command pallet, and select the command `Clojure: Eval`. |
77 | | - |
78 | | - This should evaluate the entire file, and a file successfully compiled notification should be shown. |
79 | | - |
80 | | -5. Eval a selected expression |
81 | | - |
82 | | - * Show the output window by using the View / Output from menu bar if it's not already visible. |
83 | | -
|
84 | | - * Select a block of code you wish to evaluate. |
85 | | -
|
86 | | - * Open the command pallet, and select the command `Clojure: Eval and show the result`. |
87 | | -
|
88 | | - * Results from the REPL should be printed to the output window named `Evaluation Results` |
89 | | -
|
90 | | -6. All done, you're ready to code some Clojure :) |
91 | | - |
92 | | -# Troubleshooting |
93 | | - |
94 | | -## Code completion doesn't work, what I'm doing wrong? |
95 | | - |
96 | | -Most likely you forgot to add `cider-nrepl` to the list of dependencies. Please, |
97 | | -consult `How to Use?` section. |
98 | | - |
99 | | -## I don't see completions from the current namespace! |
100 | | - |
101 | | -You should eval the file first using the `Eval` command. |
102 | | - |
103 | | -## How to understand if I'm connected to nREPL? |
104 | | - |
105 | | -If you see a `nrepl://nreplhost:nreplport` status bar item, most likely you |
106 | | -are connected :) |
| 30 | +Make sure [Leiningen](https://leiningen.org/) is installed on your machine, open |
| 31 | +a Clojure file or project, wait until the extension, wait until the extension |
| 32 | +will start and connect to nREPL and enjoy :-) |
107 | 33 |
|
108 | 34 | # How To Contribute |
109 | 35 |
|
110 | | -Open an [issue](https://github.com/avli/clojureVSCode/issues) if you want to propose new features and ideas or to report bugs. |
111 | | - |
112 | | -## Help Develop |
113 | | - |
114 | | -This is how you run this extension from source: |
115 | | - |
116 | | -1. Download the source code and install npm dependencies; |
117 | | - |
118 | | - ```bash |
119 | | - git clone https://github.com/avli/clojureVSCode.git |
120 | | - cd clojureVSCode |
121 | | - npm install |
122 | | - code . |
123 | | - ``` |
124 | | - |
125 | | -2. Make the changes you want; |
126 | | - |
127 | | -3. Open `debug`, select `Launch Extension` and click on `Start Debugging` to open a new vscode window with your modified extension. |
128 | | -
|
129 | | -Visual Studio Code has great [docs](https://code.visualstudio.com/docs/extensions/overview) about developping extensions. Check it out. |
130 | | -
|
131 | | -*Fork us! Pull requests are welcome! :D* |
| 36 | +Open an [issue](https://github.com/avli/clojureVSCode/issues) if you want to |
| 37 | +propose new features and ideas or to report bugs. If you want to help with some |
| 38 | +code and looking for a place to start, please check out the |
| 39 | +[How to Contribute](https://github.com/avli/clojureVSCode/wiki/Contribution) |
| 40 | +wiki page. |
132 | 41 |
|
133 | 42 | # Thanks |
134 | 43 |
|
|
0 commit comments