This commit is contained in:
2026-08-03 15:10:03 +09:00
parent c3bb2f4d43
commit 3162bc0eba
43 changed files with 811 additions and 533 deletions
@@ -0,0 +1,5 @@
{ lib, ... }@args:
lib.mkMerge [
(import ./editor args)
(import ./ui args)
]
@@ -0,0 +1,3 @@
_: {
programs.nixvim.plugins.nvim-autopairs.enable = true;
}
@@ -0,0 +1,56 @@
_: {
programs.nixvim.plugins.blink-cmp = {
enable = true;
setupLspCapabilities = true;
settings = {
keymap = {
preset = "enter";
"<C-Space>" = [ "show" ];
"<C-d>" = [ "scroll_documentation_up" ];
"<C-e>" = [ "hide" ];
"<C-f>" = [ "scroll_documentation_down" ];
"<Tab>" = [
"accept"
{
__raw = ''
function()
local ok, copilot = pcall(require, "copilot.suggestion")
if ok and copilot.is_visible() then
copilot.accept()
return true
end
end
'';
}
"fallback"
];
"<S-Tab>" = [
"select_prev"
"fallback"
];
"<C-n>" = [
"select_next"
"fallback"
];
"<C-p>" = [
"select_prev"
"fallback"
];
};
completion.list.selection = {
preselect = true;
auto_insert = false;
};
sources.default = [
"lsp"
"path"
"buffer"
];
};
};
}
@@ -0,0 +1,3 @@
_: {
programs.nixvim.plugins.comment.enable = true;
}
@@ -0,0 +1,27 @@
_: {
programs.nixvim.plugins."conform-nvim" = {
enable = true;
settings = {
formatters_by_ft = {
javascript.__raw = ''{ "biome", "prettierd", "prettier", stop_after_first = true }'';
javascriptreact.__raw = ''{ "biome", "prettierd", "prettier", stop_after_first = true }'';
typescript.__raw = ''{ "biome", "prettierd", "prettier", stop_after_first = true }'';
typescriptreact.__raw = ''{ "biome", "prettierd", "prettier", stop_after_first = true }'';
json.__raw = ''{ "biome", "prettierd", "prettier", stop_after_first = true }'';
yaml.__raw = ''{ "prettierd", "prettier", stop_after_first = true }'';
markdown.__raw = ''{ "prettierd", "prettier", stop_after_first = true }'';
lua = [ "stylua" ];
nix.__raw = ''{ "nix_fmt", "alejandra", stop_after_first = true }'';
sh = [ "shfmt" ];
};
formatters.nix_fmt = {
command = "nixfmt";
};
format_on_save.__raw = ''
function(_)
return { timeout_ms = 1000, lsp_format = "fallback" }
end
'';
};
};
}
@@ -0,0 +1,11 @@
_: {
programs.nixvim.plugins.copilot-lua = {
enable = true;
settings = {
suggestion = {
auto_trigger = true;
keymap.enabled = false;
};
};
};
}
@@ -0,0 +1,21 @@
{ lib, ... }@args:
lib.mkMerge [
(import ./autopairs.nix args)
(import ./blink-cmp.nix args)
(import ./comment.nix args)
(import ./conform.nix args)
(import ./copilot.nix args)
(import ./flash.nix args)
(import ./git-conflict.nix args)
(import ./git.nix args)
(import ./gitsigns.nix args)
(import ./glance.nix args)
(import ./lsp-signature.nix args)
(import ./snacks.nix args)
(import ./spectre.nix args)
(import ./surround.nix args)
(import ./todo-comments.nix args)
(import ./treesitter.nix args)
(import ./trouble.nix args)
(import ./wakatime.nix args)
]
@@ -0,0 +1,9 @@
{ pkgs, ... }:
{
programs.nixvim = {
extraPlugins = [ pkgs.vimPlugins.flash-nvim ];
extraConfigLua = ''
require("flash").setup()
'';
};
}
@@ -0,0 +1,9 @@
{ pkgs, ... }:
{
programs.nixvim = {
extraPlugins = [ pkgs.vimPlugins.git-conflict-nvim ];
extraConfigLua = ''
require("git-conflict").setup()
'';
};
}
@@ -0,0 +1,11 @@
{ pkgs, ... }:
{
programs.nixvim = {
extraPackages = [ pkgs.lazygit ];
plugins = {
lazygit.enable = true;
diffview.enable = true;
};
};
}
@@ -0,0 +1,25 @@
_: {
# git change view
programs.nixvim.plugins.gitsigns = {
enable = true;
settings = {
signs = {
add = {
text = "+";
};
change = {
text = "~";
};
delete = {
text = "_";
};
topdelete = {
text = "‾";
};
changedelete = {
text = "~";
};
};
};
};
}
@@ -0,0 +1,9 @@
{ pkgs, ... }:
{
programs.nixvim = {
extraPlugins = [ pkgs.vimPlugins.glance-nvim ];
extraConfigLua = ''
require("glance").setup()
'';
};
}
@@ -0,0 +1,11 @@
_: {
programs.nixvim.plugins.lsp-signature = {
enable = true;
settings = {
hint_enable = true;
hint_prefix = " ";
floating_window = true;
bind = true;
};
};
}
@@ -0,0 +1,32 @@
{ pkgs, ... }:
{
programs.nixvim = {
extraPlugins = [ pkgs.vimPlugins.snacks-nvim ];
extraConfigLua = ''
require("snacks").setup({
picker = {
enabled = true,
actions = require("trouble.sources.snacks").actions,
win = {
input = {
keys = {
["<C-t>"] = {
"trouble_open",
mode = { "n", "i" },
},
},
},
},
},
notifier = { enabled = true },
words = { enabled = true },
scroll = { enabled = true },
dim = { enabled = true },
})
'';
};
}
@@ -0,0 +1,10 @@
{ pkgs, ... }:
{
programs.nixvim = {
extraPackages = [ pkgs.ripgrep ];
extraPlugins = [ pkgs.vimPlugins.nvim-spectre ];
extraConfigLua = ''
require("spectre").setup()
'';
};
}
@@ -0,0 +1,3 @@
_: {
programs.nixvim.plugins.nvim-surround.enable = true;
}
@@ -0,0 +1,9 @@
{ pkgs, ... }:
{
programs.nixvim = {
extraPlugins = [ pkgs.vimPlugins.todo-comments-nvim ];
extraConfigLua = ''
require("todo-comments").setup()
'';
};
}
@@ -0,0 +1,17 @@
{ pkgs, ... }:
{
programs.nixvim = {
plugins.treesitter = {
enable = true;
settings = {
highlight.enable = true;
indent.enable = true;
};
};
extraPlugins = [ pkgs.vimPlugins.nvim-ts-autotag ];
extraConfigLua = ''
require("nvim-ts-autotag").setup()
'';
};
}
@@ -0,0 +1,3 @@
_: {
programs.nixvim.plugins.trouble.enable = true;
}
@@ -0,0 +1,4 @@
{ pkgs, ... }:
{
programs.nixvim.extraPlugins = [ pkgs.vimPlugins.vim-wakatime ];
}
@@ -0,0 +1,26 @@
_: {
programs.nixvim.plugins.barbar = {
enable = true;
settings = {
animation = false;
auto_hide = 1;
tabpages = true;
clickable = true;
focus_on_close = "left";
icons = {
button = "󰅖";
separator = {
left = "▎";
right = "";
};
separator_at_end = false;
filetype.enabled = true;
};
sidebar_filetypes = {
neo-tree = true;
};
};
};
}
@@ -0,0 +1,20 @@
_: {
programs.nixvim.plugins.indent-blankline = {
enable = true;
settings = {
scope = {
enabled = true;
show_start = true;
show_end = true;
};
exclude = {
filetypes = [
"help"
"neo-tree"
"toggleterm"
"lazy"
];
};
};
};
}
@@ -0,0 +1,26 @@
_: {
programs.nixvim.plugins.colorizer = {
enable = true;
settings = {
filetypes = [
"*"
"!markdown"
];
user_commands = true;
options = {
parsers = {
css = true;
tailwind = {
enable = true;
lsp = true;
update_names = true;
};
};
display.mode = "background";
};
};
};
}
@@ -0,0 +1,18 @@
{ lib, ... }@args:
lib.mkMerge [
(import ./barbar.nix args)
(import ./blankline.nix args)
(import ./colorizer.nix args)
(import ./dropbar.nix args)
(import ./lightbulb.nix args)
(import ./lualine.nix args)
(import ./markview.nix args)
(import ./neo-tree.nix args)
(import ./scrollbar.nix args)
(import ./toggleterm.nix args)
(import ./treesitter.nix args)
(import ./ufo.nix args)
(import ./web-devicons.nix args)
(import ./which-key.nix args)
(import ./zen-mode.nix args)
]
@@ -0,0 +1,3 @@
_: {
programs.nixvim.plugins.dropbar.enable = true;
}
@@ -0,0 +1,6 @@
_: {
programs.nixvim.plugins.nvim-lightbulb = {
enable = true;
settings.autocmd.enabled = true;
};
}
@@ -0,0 +1,25 @@
_: {
programs.nixvim.plugins.lualine = {
enable = true;
settings.sections.lualine_x = [
{
__raw = ''
function()
local ok, conform = pcall(require, "conform")
if not ok then return "" end
local formatters = conform.list_formatters(0)
for _, f in ipairs(formatters) do
if f.available then
return "󰛖 " .. f.name
end
end
return ""
end
'';
}
"encoding"
"fileformat"
"filetype"
];
};
}
@@ -0,0 +1,9 @@
{ pkgs, ... }:
{
programs.nixvim = {
extraPlugins = [ pkgs.vimPlugins.markview-nvim ];
extraConfigLua = ''
require("markview").setup({ initial_state = false })
'';
};
}
@@ -0,0 +1,37 @@
_: {
programs.nixvim = {
plugins.neo-tree = {
enable = true;
settings = {
close_if_last_window = true;
filesystem = {
follow_current_file = {
enabled = true;
leave_dirs_open = true;
};
filtered_items = {
visible = true;
hide_dotfiles = false;
hide_gitignored = true;
hide_ignored = false;
hide_hidden = false;
hide_by_name = [ ];
hide_by_pattern = [ ];
always_show = [ ];
always_show_by_pattern = [ ];
never_show = [
".DS_Store"
"thumbs.db"
];
never_show_by_pattern = [ ];
};
};
};
};
};
}
@@ -0,0 +1,9 @@
{ pkgs, ... }:
{
programs.nixvim = {
extraPlugins = [ pkgs.vimPlugins.nvim-scrollbar ];
extraConfigLua = ''
require("scrollbar").setup()
'';
};
}
@@ -0,0 +1,3 @@
_: {
programs.nixvim.plugins.toggleterm.enable = true;
}
@@ -0,0 +1,3 @@
_: {
programs.nixvim.plugins."treesitter-context".enable = true;
}
@@ -0,0 +1,24 @@
{ pkgs, ... }:
{
programs.nixvim = {
opts = {
foldcolumn = "1";
foldlevel = 99;
foldlevelstart = 99;
foldenable = true;
};
extraPlugins = [
pkgs.vimPlugins.nvim-ufo
pkgs.vimPlugins.promise-async
];
extraConfigLua = ''
require("ufo").setup({
provider_selector = function()
return { "treesitter", "indent" }
end,
})
'';
};
}
@@ -0,0 +1,4 @@
_: {
# icon set preview
programs.nixvim.plugins.web-devicons.enable = true;
}
@@ -0,0 +1,4 @@
_: {
# key map help
programs.nixvim.plugins.which-key.enable = true;
}
@@ -0,0 +1,9 @@
{ pkgs, ... }:
{
programs.nixvim = {
extraPlugins = [ pkgs.vimPlugins.zen-mode-nvim ];
extraConfigLua = ''
require("zen-mode").setup()
'';
};
}