Skip to content

Commit 4ea3af0

Browse files
Kamilcukmehalter
andauthored
feat(recipes): add heirline-tabline-buffer-number (#1423)
* feat(recipes): add heirline-tabline-buffer-number * Update lua/astrocommunity/recipes/heirline-tabline-buffer-number/init.lua * update example image --------- Co-authored-by: Micah Halter <[email protected]> Co-authored-by: Micah Halter <[email protected]>
1 parent 1b284bd commit 4ea3af0

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# heirline.nvim add buffer number before the name to tabline
2+
3+
Add buffer number underscored before the filename in hierline tabline in the top.
4+
5+
This makes navigation with `:b<num>` much easier.
6+
7+
![Example screenshot](./heirline-tabline-buffer-number.png)
4.65 KB
Loading
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
return {
2+
"heirline.nvim",
3+
specs = {
4+
{
5+
"AstroNvim/astroui",
6+
---@type AstroUIOpts
7+
opts = {
8+
status = {
9+
attributes = {
10+
bufnr = { bold = true, underline = true },
11+
},
12+
},
13+
},
14+
},
15+
},
16+
opts = function(_, opts)
17+
-- overwrite https://github.com/AstroNvim/AstroNvim/blob/main/lua/astronvim/plugins/heirline.lua#L114
18+
local status = require "astroui.status"
19+
20+
opts.tabline[2] = status.heirline.make_buflist(
21+
status.component.tabline_file_info { bufnr = { hl = status.hl.get_attributes "bufnr" } }
22+
)
23+
end,
24+
}

0 commit comments

Comments
 (0)