mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-23 09:18:51 +02:00
feat(diagnostics): added icons
This commit is contained in:
parent
43a97bc7ce
commit
8834510d40
2 changed files with 45 additions and 2 deletions
|
@ -13,11 +13,24 @@ return {
|
|||
dependencies = {
|
||||
{ "folke/neoconf.nvim", cmd = "Neoconf", config = true },
|
||||
{ "folke/neodev.nvim", config = true },
|
||||
{ "williamboman/mason.nvim", config = true },
|
||||
{ "williamboman/mason-lspconfig.nvim", config = { ensure_installed = vim.tbl_keys(servers) } },
|
||||
{ "williamboman/mason.nvim", config = true, cmd = "Mason" },
|
||||
{ "williamboman/mason-lspconfig.nvim", config = { automatic_installation = true } },
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
},
|
||||
config = function()
|
||||
-- diagnostics
|
||||
for name, icon in pairs(require("config.icons").diagnostics) do
|
||||
name = "DiagnosticSign" .. name
|
||||
vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" })
|
||||
end
|
||||
vim.diagnostic.config({
|
||||
underline = true,
|
||||
update_in_insert = false,
|
||||
virtual_text = { spacing = 4, prefix = "●" },
|
||||
severity_sort = true,
|
||||
})
|
||||
|
||||
-- lspconfig
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
for server, opts in pairs(servers) do
|
||||
opts.capabilities = capabilities
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue