From 102b1a1c7095c7c255ad44786702a22b47387f6b Mon Sep 17 00:00:00 2001 From: name Date: Fri, 18 Oct 2024 13:26:35 +0900 Subject: [PATCH 1/2] feat: Change diagnostic symbols if vim.g.have_nerd_font is true --- init.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/init.lua b/init.lua index ea86b792abe..38d9f95e3ea 100644 --- a/init.lua +++ b/init.lua @@ -588,6 +588,15 @@ require('lazy').setup({ end, }) + -- Change diagnostic symbols in the sign column (gutter) + if vim.g.have_nerd_font then + 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 + end + -- LSP servers and clients are able to communicate to each other what features they support. -- By default, Neovim doesn't support everything that is in the LSP specification. -- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities. From 69b889175423dc130f9ed033f3256842eb40f7b2 Mon Sep 17 00:00:00 2001 From: name Date: Sun, 20 Oct 2024 00:58:53 +0900 Subject: [PATCH 2/2] feat: Comment out changes regarding diagnostic symbols so that only those who want to change them can do so --- init.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/init.lua b/init.lua index 38d9f95e3ea..66ec7cfdd82 100644 --- a/init.lua +++ b/init.lua @@ -589,13 +589,13 @@ require('lazy').setup({ }) -- Change diagnostic symbols in the sign column (gutter) - if vim.g.have_nerd_font then - 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 - end + -- if vim.g.have_nerd_font then + -- 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 + -- end -- LSP servers and clients are able to communicate to each other what features they support. -- By default, Neovim doesn't support everything that is in the LSP specification.