Show HN: I released a Language Server for mruby static type analyzer

3 weeks ago 2

Language Server Protocol (LSP) implementation for Ruby-TI static type analyzer.

Ruby-TI LSP provides IDE features for Ruby code using the Ruby-TI type analyzer:

  • Code Lens: Inline type signature display
  • Code Completion: Auto-complete method suggestions based on type inference
  • Go to Definition: Jump to method and class definitions
  • Diagnostics: Real-time type error detection

Example

This project is currently in beta stage. Please do not use it in production environments. There may be bugs, incomplete features, or breaking changes in future releases.

  • Go 1.24.5 or later
  • Ruby-TI installed and available in PATH as ti command
git clone https://github.com/engneer-hamachan/ruby-ti-lsp cd ruby-ti-lsp # This will build the `ti-lsp` binary and install it to `./bin/ti-lsp`. make install
# setting binary path # fish example set -x PATH "/path/to/ruby-ti-lsp/bin:$PATH"

Use your preferred LSP plugin. Example configuration for coc.nvim(coc-settings.json):

{ "codeLens.enable": true, "codeLens.position": "eol", "codeLens.separator": " #", "languageserver": { "ruby-ti": { "command": "ti-lsp", "filetypes": ["ruby"] } } }

Install the VSCode extension:

code --install-extension /path/to/ruby-ti-lsp/vscode/ruby-ti-lsp-0.1.0.vsix

Displays inferred type signatures inline at method definitions.

Type-aware method suggestions powered by Ruby-TI's static type inference.

Navigate to method and class definitions across your codebase, following inheritance hierarchies.

Real-time type error detection. The LSP server automatically runs Ruby-TI on document changes and displays type errors inline.

MIT License - see LICENSE file for details.

This project uses the following third-party libraries:

  • glsp - Licensed under Apache License 2.0
  • commonlog - Licensed under Apache License 2.0
  • kutil - Licensed under Apache License 2.0

See the respective repositories for full license texts.

Read Entire Article