1
0
Fork 0

neovim: Configure Sorbet LSP

This commit is contained in:
Jeremy Kaplan 2023-12-25 21:09:31 -08:00
commit 49184b690a
2 changed files with 14 additions and 1 deletions

View file

@ -329,6 +329,7 @@ return {
gopls = { gopls = {
gofumpt = true, gofumpt = true,
}, },
sorbet = {}, -- This one is _extra_ special for some reason.
} }
local on_attach = function(client, bufno) local on_attach = function(client, bufno)
@ -449,6 +450,18 @@ return {
}, },
}) })
end, 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, end,
}, },

View file

@ -2,7 +2,7 @@
Bundler/OrderedGems: Bundler/OrderedGems:
TreatCommentsAsGroupSeparators: true TreatCommentsAsGroupSeparators: true
Gemspec/DateAssignment: Gemspec/DeprecatedAttributeAssignment:
Enabled: true Enabled: true
Lint/AmbiguousAssignment: Lint/AmbiguousAssignment: