@@ -7,37 +7,26 @@ Ruby LSP Rails is a [Ruby LSP](https://github.com/Shopify/ruby-lsp) addon for ex
7
7
8
8
## Installation
9
9
10
- To install, add the following line to your application's Gemfile:
10
+ If you haven't already done so, you'll need to first [ set up Ruby LSP ] ( https://github.com/Shopify/ruby-lsp#usage ) .
11
11
12
- ``` ruby
13
- # Gemfile
14
- group :development do
15
- gem " ruby-lsp-rails"
16
- end
17
- ```
12
+ As of v0.3.0, Ruby LSP will automatically include the Ruby LSP Rails addon in its custom bundle when a Rails app is detected.
13
+ There is no need to add the gem to your bundle.
18
14
19
- ## Usage
15
+ ## Features
20
16
21
- ### Hover to reveal ActiveRecord schema
17
+ * Hover over an ActiveRecord model to reveal its schema.
18
+ * Run or debug a test by clicking on the code lens which appears above the test class, or an individual test.
19
+ * Navigate between ActiveSupport test cases with your editor's "Go to Symbol" feature.
22
20
23
- 1 . Start your Rails server
24
- 1 . Hover over an ActiveRecord model to see its details
25
-
26
- ### Documentation
21
+ ## Documentation
27
22
28
23
See the [ documentation] ( https://shopify.github.io/ruby-lsp-rails ) for more in-depth details about the
29
24
[ supported features] ( https://shopify.github.io/ruby-lsp-rails/RubyLsp/Rails.html ) .
30
25
31
- ### Running Tests
32
-
33
- 1 . Open a test which inherits from ` ActiveSupport::TestCase ` or one of its descendants, such as ` ActionDispatch::IntegrationTest ` .
34
- 2 . Click on the "Run", "Run in Terminal" or "Debug" code lens which appears above the test class, or an individual test.
35
-
36
- > [ !NOTE]
37
- > When using the Test Explorer view, if your code contains a statement to pause execution (e.g. ` debugger ` ) it will
38
- > cause the test runner to hang.
26
+ ## How Runtime Introspection Works
39
27
40
- ## How It Works
28
+ LSP tooling is typically based on static analysis, but ` ruby-lsp-rails ` actually communicates with your Rails app for
29
+ some features.
41
30
42
31
When Ruby LSP Rails starts, it spawns a ` rails runner ` instance which runs
43
32
[ ` server.rb ` ] ( https://github.com/Shopify/ruby-lsp-rails/blob/main/lib/ruby_lsp/ruby_lsp_rails/server.rb ) .
@@ -46,7 +35,7 @@ The addon communicates with this process over a pipe (i.e. `stdin` and `stdout`)
46
35
When extension is stopped (e.g. by quitting the editor), the server instance is shut down.
47
36
48
37
> [ !NOTE]
49
- > Prior to v0.3, ` ruby-lsp-rails ` used a different approach which involved mounting a Rack application within the Rails app.
38
+ > Prior to v0.3.0 , ` ruby-lsp-rails ` used a different approach which involved mounting a Rack application within the Rails app.
50
39
> That approach was brittle and susceptible to the application's configuration, such as routing and middleware.
51
40
52
41
## Contributing
0 commit comments