Skip to content

Shopify/vscode-ruby-lsp

main
Switch branches/tags
Code

Latest commit

* Bump vscode-languageclient from 7.0.0 to 8.0.1

Bumps [vscode-languageclient](https://github.com/Microsoft/vscode-languageserver-node/tree/HEAD/client) from 7.0.0 to 8.0.1.
- [Release notes](https://github.com/Microsoft/vscode-languageserver-node/releases)
- [Commits](https://github.com/Microsoft/vscode-languageserver-node/commits/release/client/8.0.1/client)

---
updated-dependencies:
- dependency-name: vscode-languageclient
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Apply breaking changes to client start and stop

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Vinicius Stock <vinicius.stock@shopify.com>
491579f

Git stats

Files

Permalink
Failed to load latest commit information.

Build Status

vscode-ruby-lsp

VS Code extension for the Ruby LSP gem.

Usage

Search for ruby-lsp in the extensions tab and click install.

Telemetry

On its own, the Ruby LSP does not collect any telemetry by default, but it does support hooking up to a private metrics service if desired.

In order to receive metrics requests, a private plugin must export the ruby-lsp.getPrivateTelemetryApi command, which should return an object that implements the TelemetryApi interface defined here.

Fields included by default are defined in TelemetryEvent here. The exported API object can add any other data of interest and publish it to a private service.

For example,

// Create the API class in a private plugin
class MyApi implements TemeletryApi {
  sendEvent(event: TelemetryEvent): Promise<void> {
    // Add timestamp to collected metrics
    const payload = {
      timestamp: Date.now(),
      ...event,
    };

    // Send metrics to a private service
    myFavouriteHttpClient.post("private-metrics-url", payload);
  }
}

// Register the command to return an object of the API
vscode.commands.registerCommand(
  "ruby-lsp.getPrivateTelemetryApi",
  () => new MyApi()
);

Debugging

Interactive debugging works for both running the extension or tests. In the debug panel, select whether to run the extension in development mode or run tests, set up some breakpoints and start with F5.

Contributing

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

License

This extension is available as open source under the terms of the MIT License.