diff --git a/README.md b/README.md index 76732571..5c71b3e6 100644 --- a/README.md +++ b/README.md @@ -164,9 +164,23 @@ openai.chat.completions.create( ## LSP Support -### Sorbet +### Solargraph + +This library includes [Solargraph](https://solargraph.org) support for both auto completion and go to definition. + +```ruby +gem "solargraph", group: :development +``` + +After Solargraph is installed, **you must populate its index** either via the provided editor command, or by running the following in your terminal: + +```sh +bundle exec solargraph gems +``` -**This library emits an intentional warning under the [`tapioca` toolchain](https://github.com/Shopify/tapioca)**. This is normal, and does not impact functionality. +Otherwise Solargraph will not be able to provide type information or auto-completion for any non-indexed libraries. + +### Sorbet This library is written with [Sorbet type definitions](https://sorbet.org/docs/rbi). However, there is no runtime dependency on the `sorbet-runtime`. @@ -188,6 +202,12 @@ params = OpenAI::Models::Chat::CompletionCreateParams.new( openai.chat.completions.create(**params) ``` +Note: **This library emits an intentional warning under the [`tapioca` toolchain](https://github.com/Shopify/tapioca)**. This is normal, and does not impact functionality. + +### Ruby LSP + +The Ruby LSP has [best effort support](https://shopify.github.io/ruby-lsp/#guessed-types) for inferring type information from Ruby code, and as such it may not always be able to provide accurate type information. + ## Advanced ### Making custom/undocumented requests