44 lines
886 B
Lua
44 lines
886 B
Lua
local M = {}
|
|
|
|
M.setup = function()
|
|
local config = {
|
|
virtual_text = true,
|
|
signs = {
|
|
text = {
|
|
[vim.diagnostic.severity.ERROR] = '',
|
|
[vim.diagnostic.severity.WARN] = '',
|
|
[vim.diagnostic.severity.HINT] = '',
|
|
[vim.diagnostic.severity.INFO] = '',
|
|
}
|
|
},
|
|
update_in_insert = true,
|
|
underline = true,
|
|
severity_sort = true,
|
|
float = {
|
|
focusable = true,
|
|
style = "minimal",
|
|
border = "rounded",
|
|
source = "always",
|
|
header = "",
|
|
prefix = "",
|
|
},
|
|
}
|
|
|
|
vim.diagnostic.config(config)
|
|
end
|
|
|
|
-- local function lsp_highlight_document(client)
|
|
-- -- Set autocommands conditional on server_capabilities
|
|
-- local status_ok, illuminate = pcall(require, "illuminate")
|
|
-- if not status_ok then
|
|
-- return
|
|
-- end
|
|
-- illuminate.on_attach(client)
|
|
-- end
|
|
|
|
-- M.on_attach = function(client, bufnr)
|
|
-- lsp_highlight_document(client)
|
|
-- end
|
|
|
|
return M
|