From 0f588b826771f4843e28531cb503403a0785ae57 Mon Sep 17 00:00:00 2001 From: triethyl Date: Mon, 11 Aug 2025 22:12:38 -0400 Subject: neovim: fixed incline and improved buffer management --- pkgs/custom-neovim/config/lua/plugins/incline.lua | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'pkgs/custom-neovim/config/lua/plugins/incline.lua') diff --git a/pkgs/custom-neovim/config/lua/plugins/incline.lua b/pkgs/custom-neovim/config/lua/plugins/incline.lua index cfdf281..b17a9c9 100644 --- a/pkgs/custom-neovim/config/lua/plugins/incline.lua +++ b/pkgs/custom-neovim/config/lua/plugins/incline.lua @@ -1,5 +1,22 @@ -require("incline").setup { - hide = { - -- only_win = true, +local icons = require 'mini.icons' +require('incline').setup { + window = { + padding = 0, + margin = { horizontal = 0 }, }, + render = function(props) + local filename = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(props.buf), ':t') + if filename == '' then + filename = '[No Name]' + end + local ft_icon, ft_hl = icons.get("file", filename) + local modified = vim.bo[props.buf].modified + return { + ft_icon and { ' ', ft_icon, ' ', gui = ft_hl } or '', + ' ', + { filename, gui = 'bold' }, + ' ', + modified and '[+] ' or '', + } + end, } -- cgit v1.2.3