diff --git a/home/editors/nvim/plugins/utils/snacks/dashboard.nix b/home/editors/nvim/plugins/utils/snacks/dashboard.nix new file mode 100644 index 0000000..3615d83 --- /dev/null +++ b/home/editors/nvim/plugins/utils/snacks/dashboard.nix @@ -0,0 +1,53 @@ +let + themes = import ./themes.nix; + theme = themes.dg_baby; +in { + enabled = true; + preset = { + inherit (theme) header; + keys = [ + { + icon = " "; + key = "f"; + desc = "Find File"; + action = ":lua Snacks.dashboard.pick('files')"; + } + { + icon = " "; + key = "n"; + desc = "New File"; + action = ":ene | startinsert"; + } + { + icon = " "; + key = "l"; + desc = "Live Grep"; + action = ":lua Snacks.dashboard.pick('live_grep')"; + } + { + icon = " "; + key = "o"; + desc = "Old Files"; + action = ":lua Snacks.dashboard.pick('oldfiles')"; + } + { + icon = " "; + key = "q"; + desc = "Quit"; + action = ":qa"; + } + ]; + }; + sections = [ + {section = "header";} + { + section = "keys"; + gap = 1; + padding = 1; + } + { + title = theme.quote; + align = "center"; + } + ]; +} diff --git a/home/editors/nvim/plugins/utils/snacks/default.nix b/home/editors/nvim/plugins/utils/snacks/default.nix index c78dc75..9ada84f 100644 --- a/home/editors/nvim/plugins/utils/snacks/default.nix +++ b/home/editors/nvim/plugins/utils/snacks/default.nix @@ -11,59 +11,7 @@ image.enabled = true; quickfile.enabled = true; rename.enabled = true; - dashboard = let - themes = import ./themes.nix; - theme = themes.dg_baby; - in { - enabled = true; - preset = { - inherit (theme) header; - keys = [ - { - icon = " "; - key = "f"; - desc = "Find File"; - action = ":lua Snacks.dashboard.pick('files')"; - } - { - icon = " "; - key = "n"; - desc = "New File"; - action = ":ene | startinsert"; - } - { - icon = " "; - key = "l"; - desc = "Live Grep"; - action = ":lua Snacks.dashboard.pick('live_grep')"; - } - { - icon = " "; - key = "o"; - desc = "Old Files"; - action = ":lua Snacks.dashboard.pick('oldfiles')"; - } - { - icon = " "; - key = "q"; - desc = "Quit"; - action = ":qa"; - } - ]; - }; - sections = [ - {section = "header";} - { - section = "keys"; - gap = 1; - padding = 1; - } - { - title = theme.quote; - align = "center"; - } - ]; - }; + dashboard = import ./dashboard.nix; }; };