2021-12-16 05:35:15 -06:00
|
|
|
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
|
|
|
|
for type, icon in pairs(signs) do
|
|
|
|
local hl = "DiagnosticSign" .. type
|
|
|
|
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
|
|
|
end
|
|
|
|
|
2021-12-16 02:15:56 -06:00
|
|
|
local lsp_installer = require("nvim-lsp-installer")
|
|
|
|
lsp_installer.on_server_ready(function(server)
|
2021-12-16 05:35:15 -06:00
|
|
|
local opts = {
|
|
|
|
capabilities = require("coq").lsp_ensure_capabilities(vim.lsp.protocol.make_client_capabilities()),
|
2021-12-16 02:15:56 -06:00
|
|
|
}
|
2021-12-16 05:35:15 -06:00
|
|
|
if server.name == "rust_analyzer" then
|
|
|
|
require("rust-tools").setup{
|
|
|
|
server = vim.tbl_deep_extend("force", server:get_default_options(), opts),
|
|
|
|
}
|
|
|
|
server:attach_buffers()
|
|
|
|
else
|
|
|
|
server:setup(opts)
|
|
|
|
end
|
2021-12-16 02:15:56 -06:00
|
|
|
end)
|
2021-12-16 05:35:15 -06:00
|
|
|
|