nvim/lua/cosmic/lsp/diagnostics/init.lua
2022-12-30 09:15:21 -08:00

19 lines
477 B
Lua

local icons = require('cosmic.utils.icons')
local config = require('cosmic.lsp.diagnostics.config')
-- set up LSP signs
local signs = {
Error = icons.error .. ' ',
Warn = icons.warn .. ' ',
Hint = icons.hint .. ' ',
Info = icons.info .. ' ',
}
-- Set up diagnostic signs
for type, icon in pairs(signs) do
local hl = 'DiagnosticSign' .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = '' })
end
-- set up diagnostics
vim.diagnostic.config(config)