fix(dashboard): better git check for advanced example. See #126

This commit is contained in:
Folke Lemaitre 2024-11-20 20:03:27 +01:00
parent 723d8eac84
commit b4a293aac7
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
3 changed files with 5 additions and 5 deletions

View file

@ -232,7 +232,7 @@ A more advanced example using multiple panes
icon = " ",
title = "Git Status",
section = "terminal",
enabled = vim.fn.isdirectory(".git") == 1,
enabled = Snacks.git.get_root() ~= nil,
cmd = "hub status --short --branch --renames",
height = 5,
padding = 1,
@ -379,8 +379,8 @@ Snacks.dashboard()`
>lua
{
zindex = 10,
height = 0.6,
width = 0.6,
height = 0,
width = 0,
bo = {
bufhidden = "wipe",
buftype = "nofile",

View file

@ -190,7 +190,7 @@ A more advanced example using multiple panes
icon = " ",
title = "Git Status",
section = "terminal",
enabled = vim.fn.isdirectory(".git") == 1,
enabled = Snacks.git.get_root() ~= nil,
cmd = "hub status --short --branch --renames",
height = 5,
padding = 1,

View file

@ -60,7 +60,7 @@ M.examples.advanced = {
icon = "",
title = "Git Status",
section = "terminal",
enabled = vim.fn.isdirectory(".git") == 1,
enabled = Snacks.git.get_root() ~= nil,
cmd = "hub status --short --branch --renames",
height = 5,
padding = 1,