refactor: rename programs folder to modules

This commit is contained in:
lightly-toasted 2025-08-12 12:43:10 +09:00
parent e4f3540862
commit 0ccc095d6e
40 changed files with 17 additions and 17 deletions

View file

@ -0,0 +1,35 @@
{
programs.nixvim = {
enable = true;
defaultEditor = true;
colorschemes.moonfly = {
enable = true;
};
opts = {
number = true;
relativenumber = true;
expandtab = true;
shiftwidth = 2;
tabstop = 2;
softtabstop = 2;
};
};
imports = [
./keymaps.nix
./plugins/bufferline.nix
./plugins/lualine.nix
./plugins/cmp.nix
./plugins/comment.nix
./plugins/colorizer.nix
./plugins/nvim-autopairs.nix
./plugins/gitsigns.nix
./plugins/telescope.nix
./plugins/treesitter.nix
./plugins/nvim-tree.nix
./plugins/web-devicons.nix
./plugins/wakatime.nix
./plugins/which-key.nix
./plugins/lsp.nix
];
}

View file

@ -0,0 +1,87 @@
{
programs.nixvim = {
globals.mapleader = " ";
keymaps = [
{
mode = "n";
key = "<leader>w";
action = "<cmd>w<CR>";
}
{
mode = "n";
key = "<leader>q";
action = "<cmd>q<CR>";
}
{
mode = "n";
key = "<leader>e";
action = "<cmd>NvimTreeToggle<CR>";
}
{
mode = "n";
key = "<leader>d";
action = "<cmd>lua vim.diagnostic.open_float()<CR>";
}
{
mode = "n";
key = "<leader>?";
action = "<cmd>WhichKey<CR>";
options.desc = "Show WhichKey popup";
}
{
mode = "n";
key = "<Tab>";
action = "<cmd>bnext<CR>";
options.desc = "Next buffer";
}
{
mode = "n";
key = "<S-Tab>";
action = "<cmd>bprevious<CR>";
options.desc = "Prev buffer";
}
{
mode = "n";
key = "<leader>bd";
action = "<cmd>bdelete<CR>";
options.desc = "Delete buffer";
}
{
mode = "n";
key = "<leader>bb";
action = "<cmd>Telescope buffers<CR>";
options.desc = "Buffer list";
}
{
mode = "n";
key = "<leader>bp";
action = "<cmd>BufferLinePick<CR>";
options.desc = "Pick buffer";
}
{
mode = "n";
key = "<leader>bc";
action = "<cmd>BufferLinePickClose<CR>";
options.desc = "Pick buffer to close";
}
{
mode = "n";
key = "<leader>f";
action = "<cmd>Telescope find_files<CR>";
options.desc = "Telescope: Find Files";
}
{
mode = "n";
key = "<leader>g";
action = "<cmd>Telescope live_grep<CR>";
options.desc = "Telescope: Live Grep";
}
{
mode = "n";
key = "<leader>b";
action = "<cmd>Telescope buffers<CR>";
options.desc = "Telescope: List Buffers";
}
];
};
}

View file

@ -0,0 +1,3 @@
{
programs.nixvim.plugins.bufferline.enable = true;
}

View file

@ -0,0 +1,11 @@
{
programs.nixvim.plugins.cmp = {
enable = true;
autoEnableSources = true;
settings.sources = [
{ name = "nvim_lsp"; }
{ name = "path"; }
{ name = "buffer"; }
];
};
}

View file

@ -0,0 +1,15 @@
{
programs.nixvim.plugins.colorizer = {
enable = true;
settings = {
filetypes = [ "*" ];
user_default_options = {
css = true;
tailwind = "both";
tailwind_opts = {
update_names = true;
};
};
};
};
}

View file

@ -0,0 +1,3 @@
{
programs.nixvim.plugins.comment.enable = true;
}

View file

@ -0,0 +1,3 @@
{
programs.nixvim.plugins.gitsigns.enable = true;
}

View file

@ -0,0 +1,12 @@
{
programs.nixvim.plugins.lsp = {
enable = true;
servers = {
lua_ls.enable = true;
ts_ls.enable = true;
pyright.enable = true;
tailwindcss.enable = true;
nil_ls.enable = true;
};
};
}

View file

@ -0,0 +1,11 @@
{
programs.nixvim.plugins.lualine = {
enable = true;
settings = {
options = {
icons_enabled = true;
theme = "moonfly";
};
};
};
}

View file

@ -0,0 +1,3 @@
{
programs.nixvim.plugins.nvim-autopairs.enable = true;
}

View file

@ -0,0 +1,3 @@
{
programs.nixvim.plugins.nvim-tree.enable = true;
}

View file

@ -0,0 +1,3 @@
{
programs.nixvim.plugins.telescope.enable = true;
}

View file

@ -0,0 +1,9 @@
{
programs.nixvim.plugins.treesitter = {
enable = true;
settings = {
highlight.enable = true;
indent.enable = true;
};
};
}

View file

@ -0,0 +1,6 @@
{
programs.nixvim.plugins.wakatime = {
enable = true;
autoLoad = true;
};
}

View file

@ -0,0 +1,3 @@
{
programs.nixvim.plugins.web-devicons.enable = true;
}

View file

@ -0,0 +1,3 @@
{
programs.nixvim.plugins.which-key.enable = true;
}