From 8f733755e84361a4f93fcf69b84595b3aea10b5a Mon Sep 17 00:00:00 2001 From: siduck76 Date: Thu, 26 Aug 2021 15:01:48 +0530 Subject: [PATCH] add clickable btn for exiting nvim --- lua/plugins/configs/bufferline.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index 10ed945..b30eedf 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -5,12 +5,19 @@ if not present then return end +vim.cmd [[ + function MyFunc(a,b,c,d) + q! + endfunction +]] + bufferline.setup { options = { offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, buffer_close_icon = "", modified_icon = "", close_icon = "", + show_close_icon = false, left_trunc_marker = "", right_trunc_marker = "", max_name_length = 14, @@ -23,6 +30,14 @@ bufferline.setup { separator_style = "thin", always_show_bufferline = true, diagnostics = false, -- "or nvim-lsp" + + custom_areas = { + right = function() + local result = {} + table.insert(result, { text = "%@MyFunc@  %X", guifg = colors.red, guibg = colors.black }) + return result + end, + }, custom_filter = function(buf_number) -- Func to filter out our managed/persistent split terms local present_type, type = pcall(function() @@ -42,6 +57,7 @@ bufferline.setup { end end, }, + highlights = { background = { guifg = colors.grey_fg,