From f053d78928feef7f2dee75f3840786f89391b450 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Mon, 20 Dec 2021 12:06:10 +0100 Subject: [PATCH] nvim: fix updated diagnostic sign names --- .config/nvim/lua/dln/lsp-config.lua | 34 +++++------------------------ 1 file changed, 5 insertions(+), 29 deletions(-) diff --git a/.config/nvim/lua/dln/lsp-config.lua b/.config/nvim/lua/dln/lsp-config.lua index e2af56a..e17d107 100644 --- a/.config/nvim/lua/dln/lsp-config.lua +++ b/.config/nvim/lua/dln/lsp-config.lua @@ -10,35 +10,11 @@ vim.lsp.diagnostic.on_publish_diagnostics, virtual_text = {prefix = "โ€นโฎโฐ " } } ) -vim.fn.sign_define( -"LspDiagnosticsSignError", -{ - text = "๐Ÿ”ฅ", - texthl = "LspDiagnosticsSignError" -} -) - -vim.fn.sign_define( -"LspDiagnosticsSignWarning", -{ - text = "โš ", - texthl = "LspDiagnosticsSignWarning" -} -) -vim.fn.sign_define( -"LspDiagnosticsSignInformation", -{ - text = "๐Ÿ’ก", - texthl = "LspDiagnosticsSignInformation", -} -) -vim.fn.sign_define( -"LspDiagnosticsSignHint", -{ - text = "๐Ÿ’ก", - texthl = "LspDiagnosticsSignHint", -} -) +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 local on_attach = function() require("folding").on_attach()