Gem Version Test

TypeProf add-on

The TypeProf add-on is a Ruby LSP add-on to provide type inference features.

Installation

Add ruby-lsp-typeprof to your Gemfile:

group :development do
  gem "ruby-lsp-typeprof", require: false
end

After running bundle install, restart Ruby LSP.

Configuration

The add-on reads its settings from Ruby LSP's addonSettings mechanism. Configure them in VS Code's settings.json:

{
  "rubyLsp.addonSettings": {
    "TypeProf": {
      "enableCodeLens": false
    }
  }
}

You can place this configuration in either:

  • Workspace settings (.vscode/settings.json at the repository root) — applies only to this project.
  • User settings — applies to every workspace. See User and Workspace Settings for the file location on each OS.
Key Type Default Description
enableCodeLens boolean true Show inferred type signatures as code lens above method definitions.

After changing the setting, restart Ruby LSP via the "Ruby LSP: Restart" command for it to take effect.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/sinsoku/ruby-lsp-typeprof. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Ruby::Lsp::Typeprof project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.