nixvim: migrate dashboard-nvim to extraPlugins

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
2026-03-11 16:42:30 +09:00
co-authored by Claude Sonnet 4.6
parent 873f082fe6
commit 35dc4be1b8
+102 -114
View File
@@ -1,119 +1,107 @@
{...}: { {pkgs, ...}: {
programs.nixvim = { programs.nixvim = {
plugins.dashboard-nvim = { extraPlugins = [pkgs.vimPlugins.dashboard-nvim];
enable = true;
settings = { extraConfigLua = ''
theme = "doom"; require("dashboard").setup({
theme = "doom",
config = { config = {
header = [ header = {
"" "",
" ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗" " ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗",
" ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║" " ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║",
" ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║" " ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║",
" ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║" " ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║",
" ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║" " ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║",
" ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝" " ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝",
"" "",
" ✦ · ☽ · ✦" " ✦ · ☽ · ✦",
"" "",
]; },
center = {
{
icon = " ",
icon_hl = "DashboardIconFind",
desc = "Find File",
desc_hl = "DashboardDesc",
key = "f",
key_hl = "DashboardKey",
action = function() require("telescope.builtin").find_files() end,
},
{
icon = " ",
icon_hl = "DashboardIconRecent",
desc = "Recent Files",
desc_hl = "DashboardDesc",
key = "r",
key_hl = "DashboardKey",
action = function() require("telescope.builtin").oldfiles() end,
},
{
icon = " ",
icon_hl = "DashboardIconProject",
desc = "Recent Projects",
desc_hl = "DashboardDesc",
key = "p",
key_hl = "DashboardKey",
action = function() require("telescope").extensions["projects"].projects() end,
},
{
icon = " ",
icon_hl = "DashboardIconGrep",
desc = "Find Word",
desc_hl = "DashboardDesc",
key = "g",
key_hl = "DashboardKey",
action = function() require("telescope.builtin").live_grep() end,
},
{
icon = " ",
icon_hl = "DashboardIconNew",
desc = "New File",
desc_hl = "DashboardDesc",
key = "n",
key_hl = "DashboardKey",
action = "enew",
},
{
icon = " ",
icon_hl = "DashboardIconDots",
desc = "Dotfiles",
desc_hl = "DashboardDesc",
key = "d",
key_hl = "DashboardKey",
action = function() require("telescope.builtin").find_files({ cwd = vim.fn.expand("~/dotfiles") }) end,
},
{
icon = " ",
icon_hl = "DashboardIconQuit",
desc = "Quit",
desc_hl = "DashboardDesc",
key = "q",
key_hl = "DashboardKey",
action = "qa",
},
},
footer = {
"",
" NixOS · nixvim · Catppuccin Mocha",
},
},
})
center = [ -- Catppuccin Mocha カラーに合わせたハイライト
{ vim.api.nvim_set_hl(0, "DashboardHeader", { fg = "#cba6f7", bold = true })
icon = " "; vim.api.nvim_set_hl(0, "DashboardIconFind", { fg = "#89b4fa" })
icon_hl = "DashboardIconFind"; vim.api.nvim_set_hl(0, "DashboardIconRecent", { fg = "#fab387" })
desc = "Find File"; vim.api.nvim_set_hl(0, "DashboardIconProject", { fg = "#94e2d5" })
desc_hl = "DashboardDesc"; vim.api.nvim_set_hl(0, "DashboardIconGrep", { fg = "#a6e3a1" })
key = "f"; vim.api.nvim_set_hl(0, "DashboardIconNew", { fg = "#89dceb" })
key_hl = "DashboardKey"; vim.api.nvim_set_hl(0, "DashboardIconDots", { fg = "#f5c2e7" })
action.__raw = "function() require('telescope.builtin').find_files() end"; vim.api.nvim_set_hl(0, "DashboardIconQuit", { fg = "#f38ba8" })
} vim.api.nvim_set_hl(0, "DashboardDesc", { fg = "#cdd6f4" })
{ vim.api.nvim_set_hl(0, "DashboardKey", { fg = "#b4befe", bold = true })
icon = " "; vim.api.nvim_set_hl(0, "DashboardFooter", { fg = "#7f849c", italic = true })
icon_hl = "DashboardIconRecent"; '';
desc = "Recent Files";
desc_hl = "DashboardDesc";
key = "r";
key_hl = "DashboardKey";
action.__raw = "function() require('telescope.builtin').oldfiles() end";
}
{
icon = " ";
icon_hl = "DashboardIconProject";
desc = "Recent Projects";
desc_hl = "DashboardDesc";
key = "p";
key_hl = "DashboardKey";
action.__raw = "function() require('telescope').extensions['projects'].projects() end";
}
{
icon = " ";
icon_hl = "DashboardIconGrep";
desc = "Find Word";
desc_hl = "DashboardDesc";
key = "g";
key_hl = "DashboardKey";
action.__raw = "function() require('telescope.builtin').live_grep() end";
}
{
icon = " ";
icon_hl = "DashboardIconNew";
desc = "New File";
desc_hl = "DashboardDesc";
key = "n";
key_hl = "DashboardKey";
action = "enew";
}
{
icon = " ";
icon_hl = "DashboardIconDots";
desc = "Dotfiles";
desc_hl = "DashboardDesc";
key = "d";
key_hl = "DashboardKey";
action.__raw = "function() require('telescope.builtin').find_files({ cwd = vim.fn.expand('~/dotfiles') }) end";
}
{
icon = " ";
icon_hl = "DashboardIconQuit";
desc = "Quit";
desc_hl = "DashboardDesc";
key = "q";
key_hl = "DashboardKey";
action = "qa";
}
];
footer = [
""
" NixOS · nixvim · Catppuccin Mocha"
];
};
};
};
# Catppuccin Mocha カラーに合わせたハイライト
highlight = {
DashboardHeader = {
fg = "#cba6f7";
bold = true;
};
DashboardIconFind = {fg = "#89b4fa";};
DashboardIconRecent = {fg = "#fab387";};
DashboardIconProject = {fg = "#94e2d5";};
DashboardIconGrep = {fg = "#a6e3a1";};
DashboardIconNew = {fg = "#89dceb";};
DashboardIconDots = {fg = "#f5c2e7";};
DashboardIconQuit = {fg = "#f38ba8";};
DashboardDesc = {fg = "#cdd6f4";};
DashboardKey = {
fg = "#b4befe";
bold = true;
};
DashboardFooter = {
fg = "#7f849c";
italic = true;
};
};
}; };
} }