From e2d9536c1865358a49bc6faf28351d47bc7b0731 Mon Sep 17 00:00:00 2001 From: Oliver Ladner Date: Tue, 30 Jul 2024 13:47:43 +0200 Subject: [PATCH] feat: use symbols for LSP events instead of letters --- lua/weeheavy/plugins/lsp/lsp-zero.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lua/weeheavy/plugins/lsp/lsp-zero.lua b/lua/weeheavy/plugins/lsp/lsp-zero.lua index fd81d19..d88dbb6 100644 --- a/lua/weeheavy/plugins/lsp/lsp-zero.lua +++ b/lua/weeheavy/plugins/lsp/lsp-zero.lua @@ -72,6 +72,22 @@ return { { "williamboman/mason-lspconfig.nvim", tag = "stable" }, }, config = function() + 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 + vim.diagnostic.config({ + update_in_insert = true, + signs = true, + virtual_text = { + prefix = "", -- Could be '●', '▎', 'x' + source = "if_many", + }, + float = { + source = "if_many", + }, + }) -- This is where all the LSP shenanigans will live local lsp_zero = require("lsp-zero") lsp_zero.extend_lspconfig()