From 384822b13bdb42f21293bf39045d9a7d99cc4cd8 Mon Sep 17 00:00:00 2001 From: Nathan Smith Date: Mon, 14 Sep 2020 17:28:35 -0700 Subject: Add Sorbet language server --- lua/lspconfig/sorbet.lua | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 lua/lspconfig/sorbet.lua (limited to 'lua') diff --git a/lua/lspconfig/sorbet.lua b/lua/lspconfig/sorbet.lua new file mode 100644 index 00000000..1f96288e --- /dev/null +++ b/lua/lspconfig/sorbet.lua @@ -0,0 +1,30 @@ +local configs = require 'lspconfig/configs' +local util = require 'lspconfig/util' + +local server_name = "sorbet" +local bin_name = "srb" + +configs[server_name] = { + default_config = { + cmd = {bin_name, "tc", "--lsp"}; + filetypes = {"ruby"}; + root_dir = util.root_pattern("Gemfile", ".git"); + }; + docs = { + description = [[ +https://sorbet.org + +Sorbet is a fast, powerful type checker designed for Ruby. + +You can install Sorbet via gem install. You might also be interested in how to set +Sorbet up for new projects: https://sorbet.org/docs/adopting. + +```sh +gem install sorbet +``` + ]]; + default_config = { + root_dir = [[root_pattern("Gemfile", ".git")]]; + }; + }; +}; -- cgit v1.2.3-70-g09d2