mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-05 03:08:13 +00:00
fix(dashboard): better git check for advanced example. See #126
This commit is contained in:
parent
723d8eac84
commit
b4a293aac7
3 changed files with 5 additions and 5 deletions
|
@ -232,7 +232,7 @@ A more advanced example using multiple panes
|
||||||
icon = " ",
|
icon = " ",
|
||||||
title = "Git Status",
|
title = "Git Status",
|
||||||
section = "terminal",
|
section = "terminal",
|
||||||
enabled = vim.fn.isdirectory(".git") == 1,
|
enabled = Snacks.git.get_root() ~= nil,
|
||||||
cmd = "hub status --short --branch --renames",
|
cmd = "hub status --short --branch --renames",
|
||||||
height = 5,
|
height = 5,
|
||||||
padding = 1,
|
padding = 1,
|
||||||
|
@ -379,8 +379,8 @@ Snacks.dashboard()`
|
||||||
>lua
|
>lua
|
||||||
{
|
{
|
||||||
zindex = 10,
|
zindex = 10,
|
||||||
height = 0.6,
|
height = 0,
|
||||||
width = 0.6,
|
width = 0,
|
||||||
bo = {
|
bo = {
|
||||||
bufhidden = "wipe",
|
bufhidden = "wipe",
|
||||||
buftype = "nofile",
|
buftype = "nofile",
|
||||||
|
|
|
@ -190,7 +190,7 @@ A more advanced example using multiple panes
|
||||||
icon = " ",
|
icon = " ",
|
||||||
title = "Git Status",
|
title = "Git Status",
|
||||||
section = "terminal",
|
section = "terminal",
|
||||||
enabled = vim.fn.isdirectory(".git") == 1,
|
enabled = Snacks.git.get_root() ~= nil,
|
||||||
cmd = "hub status --short --branch --renames",
|
cmd = "hub status --short --branch --renames",
|
||||||
height = 5,
|
height = 5,
|
||||||
padding = 1,
|
padding = 1,
|
||||||
|
|
|
@ -60,7 +60,7 @@ M.examples.advanced = {
|
||||||
icon = " ",
|
icon = " ",
|
||||||
title = "Git Status",
|
title = "Git Status",
|
||||||
section = "terminal",
|
section = "terminal",
|
||||||
enabled = vim.fn.isdirectory(".git") == 1,
|
enabled = Snacks.git.get_root() ~= nil,
|
||||||
cmd = "hub status --short --branch --renames",
|
cmd = "hub status --short --branch --renames",
|
||||||
height = 5,
|
height = 5,
|
||||||
padding = 1,
|
padding = 1,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue