From b1865215ea3b696fa859036f883e65f32a15ac30 Mon Sep 17 00:00:00 2001 From: Hyuga Tsukui Date: Mon, 19 Aug 2024 08:40:00 +0900 Subject: [PATCH] change: diagnositic format --- dot_config/nvim/init.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dot_config/nvim/init.lua b/dot_config/nvim/init.lua index ca8aa3c..8279c40 100644 --- a/dot_config/nvim/init.lua +++ b/dot_config/nvim/init.lua @@ -30,6 +30,14 @@ if not vim.g.vscode then vim.opt.undodir = undodir vim.opt.undofile = true + vim.diagnostic.config({ + virtual_text = { + format = function(diagnostic) + return string.format("%s (%s: %s)", diagnostic.message, diagnostic.source, diagnostic.code) + end, + }, + }) + -- manage plugins. vim.cmd.packadd("packer.nvim") require("packer").startup(function()