From 06355150acaf28e7bc3fbbd13bad238e042b934b Mon Sep 17 00:00:00 2001 From: Tovi Jaeschke-Rogers Date: Sun, 7 Jul 2024 19:05:09 +0930 Subject: [PATCH] feat: remove square from virtual diagnostics text --- .../nvim/lua/tovi/plugins/lsp/lspconfig.lua | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.config/nvim/lua/tovi/plugins/lsp/lspconfig.lua b/.config/nvim/lua/tovi/plugins/lsp/lspconfig.lua index ef8820a..c1bf079 100644 --- a/.config/nvim/lua/tovi/plugins/lsp/lspconfig.lua +++ b/.config/nvim/lua/tovi/plugins/lsp/lspconfig.lua @@ -64,21 +64,11 @@ return { vim.diagnostic.goto_prev({ severity = vim.diagnostic.severity.ERROR }) end, opts) - -- opts.desc = "Go to previous diagnostic (error only)" - -- keymap.set("n", "pe", function() - -- vim.diagnostic.goto_prev({ severity = vim.diagnostic.severity.ERROR }) - -- end, opts) - opts.desc = "Go to next diagnostic (error only)" keymap.set("n", "]e", function() vim.diagnostic.goto_next({ severity = vim.diagnostic.severity.ERROR }) end, opts) - -- opts.desc = "Go to next diagnostic (error only)" - -- keymap.set("n", "ne", function() - -- vim.diagnostic.goto_next({ severity = vim.diagnostic.severity.ERROR }) - -- end, opts) - opts.desc = "Show documentation for what is under cursor" keymap.set("n", "ld", vim.diagnostic.setqflist, opts) -- show documentation for what is under cursor @@ -102,7 +92,7 @@ return { 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 = "" }) + vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) end lspconfig.html.setup({ @@ -252,5 +242,11 @@ return { capabilities = capabilities, on_attach = on_attach, }) + + vim.diagnostic.config({ + virtual_text = { + prefix = '', + }, + }) end, }