Skip to content

Commit 421d4b0

Browse files
authored
Improve readme and feature demonstration (#41)
1 parent 8250a2f commit 421d4b0

File tree

4 files changed

+28
-8
lines changed

4 files changed

+28
-8
lines changed

README.md

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
Ruby LSP RSpec is a [Ruby LSP](https://github.com/Shopify/ruby-lsp) addon for displaying CodeLens for RSpec tests.
66

7-
![Screenshot of the code lenses](/misc/example.gif)
8-
97
## Installation
108

119
To install, add the following line to your application's Gemfile:
@@ -19,14 +17,36 @@ end
1917

2018
After running `bundle install`, restart Ruby LSP and you should start seeing CodeLens in your RSpec test files.
2119

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:
2344

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
2948

49+
<img src="misc/go-to-definition.gif" alt="Go to definition" width="75%">
3050

3151
## Development
3252

File renamed without changes.
File renamed without changes.

misc/go-to-definition.gif

4.87 MB
Loading

0 commit comments

Comments
 (0)