I for one welcome Stripe’s new typechecker for Ruby. As many of us learnt from Typescript, the added help from the typechecker is a great benefit with little to no cost.

To add Sorbet’s hints and errors to your Neovim, install coc.nvim and add this to your :CocConfig:

"languageserver": {
  "sorbet": {
    "command": "srb",
    "args": ["tc", "--lsp", "--enable-all-experimental-lsp-features"],
    "filetypes": ["ruby"],
    "rootPatterns": ["sorbet/config"],
    "initializationOptions": {},
    "settings": {}
  }
}

Restart vim and load up a type checked Ruby file. What a time to be alive 🍦