mirror of
https://github.com/LazyVim/starter.git
synced 2026-07-25 14:01:03 +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
4
init.lua
4
init.lua
|
|
@ -4,6 +4,7 @@ require("config.lazy")
|
||||||
-- init.lua
|
-- init.lua
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
|
|
||||||
|
if lspconfig and lspconfig.ruby_ls and lspconfig.ruby_ls.setup then
|
||||||
-- Setup Ruby Language Server
|
-- Setup Ruby Language Server
|
||||||
lspconfig.ruby_ls.setup({
|
lspconfig.ruby_ls.setup({
|
||||||
cmd = { "ruby-lsp" },
|
cmd = { "ruby-lsp" },
|
||||||
|
|
@ -15,7 +16,9 @@ lspconfig.ruby_ls.setup({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
if lspconfig and lspconfig.solargraph and lspconfig.solargraph.setup then
|
||||||
-- Setup Solargraph
|
-- Setup Solargraph
|
||||||
lspconfig.solargraph.setup({
|
lspconfig.solargraph.setup({
|
||||||
cmd = { "solargraph", "stdio" },
|
cmd = { "solargraph", "stdio" },
|
||||||
|
|
@ -26,6 +29,7 @@ lspconfig.solargraph.setup({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
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