From 7b9d409c2f16f424ebb314e7120078b0606a1f59 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 2 Jan 2023 09:47:42 +0100 Subject: [PATCH] feat(bufferline): added siagnostic icons --- lua/lazyvim/plugins/ui.lua | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index bcc63f2a..4d5aeb02 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -35,7 +35,26 @@ return { { "akinsho/nvim-bufferline.lua", event = "BufAdd", - config = true, + config = { + options = { + diagnostics = "nvim_lsp", + always_show_bufferline = false, + diagnostics_indicator = function(_, _, diag) + local icons = require("lazyvim.config.icons").diagnostics + local ret = (diag.error and icons.Error .. diag.error .. " " or "") + .. (diag.warning and icons.Warn .. diag.warning or "") + return vim.trim(ret) + end, + offsets = { + { + filetype = "neo-tree", + text = "Neo-tree", + highlight = "Directory", + text_align = "left", + }, + }, + }, + }, }, -- statusline