|
4 | 4 |
|
5 | 5 | Ruby LSP RSpec is a [Ruby LSP](https://github.com/Shopify/ruby-lsp) addon for displaying CodeLens for RSpec tests.
|
6 | 6 |
|
7 |
| - |
8 |
| - |
9 | 7 | ## Installation
|
10 | 8 |
|
11 | 9 | To install, add the following line to your application's Gemfile:
|
|
19 | 17 |
|
20 | 18 | After running `bundle install`, restart Ruby LSP and you should start seeing CodeLens in your RSpec test files.
|
21 | 19 |
|
22 |
| -## Usages (with VS Code) |
| 20 | +## Features |
| 21 | + |
| 22 | +### CodeLens |
| 23 | + |
| 24 | +1. When clicking `Run`, the test(s) will be executed via the Test Explorer |
| 25 | + - However, deeply nested tests may not be displayed correctly at the moment |
| 26 | +2. When clicking `Run In Terminal`, a test command will be generated in the terminal |
| 27 | +3. When clicking `Debug`, the test(s) will be executed with VS Code debugger enabled (requires the [`debug`](https://github.com/ruby/debug) gem) |
| 28 | + - [Learn how to set breakpoints in VS Code](https://code.visualstudio.com/docs/editor/debugging#_breakpoints) |
| 29 | + |
| 30 | +<img src="misc/code-lens.gif" alt="CodeLens" width="75%"> |
| 31 | + |
| 32 | +### Document Symbols |
| 33 | + |
| 34 | +Document Symbols can be triggered by: |
| 35 | + |
| 36 | +- Typing `@` in VS Code's command palette |
| 37 | +- Pressing `Cmd+Shift+O` |
| 38 | + |
| 39 | +<img src="misc/document-symbol.gif" alt="Document Symbols" width="75%"> |
| 40 | + |
| 41 | +### Go to definition |
| 42 | + |
| 43 | +In VS Code this feature can be triggered by one of the following methods: |
23 | 44 |
|
24 |
| -1. When clicking `Run`, the test(s) will be executed via the Test Explorer. |
25 |
| - - However, deeply nested tests may not be displayed correctly at the moment. |
26 |
| -2. When clicking `Run In Terminal`, a test command will be generated in the terminal. |
27 |
| -3. When clicking `Debug`, the test(s) will be executed with VS Code debugger enabled (requires the [`debug`](https://github.com/ruby/debug) gem). |
28 |
| - - [Learn how to set breakpoints in VS Code](https://code.visualstudio.com/docs/editor/debugging#_breakpoints). |
| 45 | +- `Right click` on the target, and then select `Go to Definition` |
| 46 | +- Placing the cursor on the target, and then hit `F12` |
| 47 | +- `Command + click` the target |
29 | 48 |
|
| 49 | +<img src="misc/go-to-definition.gif" alt="Go to definition" width="75%"> |
30 | 50 |
|
31 | 51 | ## Development
|
32 | 52 |
|
|
0 commit comments