diff options
| author | triethyl <triethylammonium@pm.me> | 2025-08-11 22:12:38 -0400 |
|---|---|---|
| committer | triethyl <triethylammonium@pm.me> | 2025-08-11 22:12:38 -0400 |
| commit | 0f588b826771f4843e28531cb503403a0785ae57 (patch) | |
| tree | 17fac73316d5b970e37bdb7f4485816d0905461a /pkgs/custom-neovim/config/lua/plugins/incline.lua | |
| parent | 86723a395d8ff81760529a4e804aca1ae6a63cfe (diff) | |
neovim: fixed incline and improved buffer management
Diffstat (limited to 'pkgs/custom-neovim/config/lua/plugins/incline.lua')
| -rw-r--r-- | pkgs/custom-neovim/config/lua/plugins/incline.lua | 23 |
1 files changed, 20 insertions, 3 deletions
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, } |
