From 49184b690a157470f3904ce78ab8daf06cd6ec92 Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Mon, 25 Dec 2023 21:09:31 -0800 Subject: [PATCH] neovim: Configure Sorbet LSP --- neovim/lua/plugins/ide.lua | 13 +++++++++++++ rubocop/config.yml | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/neovim/lua/plugins/ide.lua b/neovim/lua/plugins/ide.lua index bd8f6bd..edb05cf 100644 --- a/neovim/lua/plugins/ide.lua +++ b/neovim/lua/plugins/ide.lua @@ -329,6 +329,7 @@ return { gopls = { gofumpt = true, }, + sorbet = {}, -- This one is _extra_ special for some reason. } local on_attach = function(client, bufno) @@ -449,6 +450,18 @@ return { }, }) end, + + ["sorbet"] = function() + local capabilities = require("cmp_nvim_lsp").default_capabilities() + + require("lspconfig").sorbet.setup({ + on_attach = function(client, bufno) + on_attach(client, bufno) + end, + cmd = { "bundle", "exec", "srb", "typecheck", "--lsp", "--disable-watchman" }, + capabilities = capabilities, + }) + end, }) end, }, diff --git a/rubocop/config.yml b/rubocop/config.yml index 07aaa3e..bebb006 100644 --- a/rubocop/config.yml +++ b/rubocop/config.yml @@ -2,7 +2,7 @@ Bundler/OrderedGems: TreatCommentsAsGroupSeparators: true -Gemspec/DateAssignment: +Gemspec/DeprecatedAttributeAssignment: Enabled: true Lint/AmbiguousAssignment: