mirror of
https://github.com/LazyVim/starter.git
synced 2026-07-24 13:31:04 +00:00
Prevent LSP errors on startup
This commit is contained in:
parent
c57404aac3
commit
4a59c83ba1
1 changed files with 23 additions and 19 deletions
42
init.lua
42
init.lua
|
|
@ -4,28 +4,32 @@ require("config.lazy")
|
||||||
-- init.lua
|
-- init.lua
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
|
|
||||||
-- Setup Ruby Language Server
|
if lspconfig and lspconfig.ruby_ls and lspconfig.ruby_ls.setup then
|
||||||
lspconfig.ruby_ls.setup({
|
-- Setup Ruby Language Server
|
||||||
cmd = { "ruby-lsp" },
|
lspconfig.ruby_ls.setup({
|
||||||
filetypes = { "ruby" },
|
cmd = { "ruby-lsp" },
|
||||||
settings = {
|
filetypes = { "ruby" },
|
||||||
ruby = {
|
settings = {
|
||||||
diagnostics = true,
|
ruby = {
|
||||||
completion = true,
|
diagnostics = true,
|
||||||
|
completion = true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
})
|
||||||
})
|
end
|
||||||
|
|
||||||
-- Setup Solargraph
|
if lspconfig and lspconfig.solargraph and lspconfig.solargraph.setup then
|
||||||
lspconfig.solargraph.setup({
|
-- Setup Solargraph
|
||||||
cmd = { "solargraph", "stdio" },
|
lspconfig.solargraph.setup({
|
||||||
filetypes = { "ruby" },
|
cmd = { "solargraph", "stdio" },
|
||||||
settings = {
|
filetypes = { "ruby" },
|
||||||
solargraph = {
|
settings = {
|
||||||
diagnostics = true,
|
solargraph = {
|
||||||
|
diagnostics = true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
})
|
||||||
})
|
end
|
||||||
|
|
||||||
-- vim.defer_fn(function()
|
-- vim.defer_fn(function()
|
||||||
-- vim.cmd([[highlight Comment guifg=#222436 guibg=#5c5e77 gui=italic]])
|
-- vim.cmd([[highlight Comment guifg=#222436 guibg=#5c5e77 gui=italic]])
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue