We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 544dd15 commit 4a97086Copy full SHA for 4a97086
lua/lualine/extensions/fugitive.lua
@@ -7,8 +7,17 @@ local function fugitive_branch()
7
return icon .. ' ' .. vim.fn.FugitiveHead()
8
end
9
10
+local function get_git_toplevel_basename()
11
+ local handle = io.popen("basename `git rev-parse --show-toplevel`")
12
+ local result = handle:read("*a")
13
+ handle:close()
14
+ -- return result
15
+ return result:match("^%s*(.-)%s*$") -- trim any whitespace
16
+end
17
+
18
M.sections = {
- lualine_a = { fugitive_branch },
19
+ lualine_a = { get_git_toplevel_basename },
20
+ lualine_b = { fugitive_branch },
21
lualine_z = { 'location' },
22
}
23
0 commit comments