Skip to content

Commit 424139b

Browse files
committed
Improve the project's readme
1 parent 8fb9359 commit 424139b

File tree

1 file changed

+27
-13
lines changed

1 file changed

+27
-13
lines changed

README.md

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,41 @@
11
# RailsRubyLsp
22

3-
The RailsRubyLsp is a [Ruby LSP](https://github.com/Shopify/ruby-lsp) extension for extra Rails editor features. As long
4-
as this gem is a part of the project's bundle, the Ruby LSP will automatically load it to provide extra features.
3+
The RailsRubyLsp is a [Ruby LSP](https://github.com/Shopify/ruby-lsp) extension for extra Rails editor features, such as:
54

6-
## Usage
7-
8-
This gem includes two elements that together allow for more Rails functionality in the editor. The first is a Rails
9-
engine that automatically exposes some APIs when running the Rails server in development mode. The second is a Ruby LSP
10-
extension that knows how to connect to the exposed APIs to fetch runtime information from the Rails server.
11-
12-
In order to get the extra functionality in the editor, the Rails server must be running.
5+
- Displaying an ActiveRecord model's database columns and types when hovering over it
6+
- (More to come!)
137

14-
Note: the Ruby LSP does not need to be restarted every time the Rails server is booted. If you need to shutdown the
15-
server, the extra features will simply disappear and come back once the server is running again.
168

179
## Installation
1810

19-
Add this line to your application's Gemfile:
11+
To install, add the following line to your application's Gemfile:
2012

2113
```ruby
22-
gem "rails_ruby_lsp"
14+
group :development do
15+
gem "rails_ruby_lsp"
16+
end
2317
```
2418

19+
## Usage
20+
21+
1. Start your Rails server
22+
1. Hover over an ActiveRecord model to see its details
23+
24+
## How It Works
25+
26+
This gem consists of two components that enable enhanced Rails functionality in the editor:
27+
28+
1. A Rails engine that automatically exposes APIs when Rails server is running
29+
1. A Ruby LSP extension that connects to the exposed APIs to fetch runtime information from the Rails server
30+
31+
This is why the Rails server needs to be running for features to work.
32+
33+
> **Note**
34+
>
35+
> There is no need to restart the Ruby LSP every time the Rails server is booted.
36+
> If the server is shut down, the extra features will temporarily disappear and reappear once the server is running again.
37+
38+
2539
## Contributing
2640

2741
Bug reports and pull requests are welcome on GitHub at https://github.com/Shopify/rails_ruby_lsp. This project is

0 commit comments

Comments
 (0)