Files
dotfiles/nix/modules/nixvim/home.nix
2025-10-04 05:50:18 +01:00

100 lines
2.0 KiB
Nix

{ inputs, pkgs, ... }:
{
imports = [
inputs.nixvim.homeModules.nixvim
./plugins
];
home.packages = with pkgs; [
nixfmt
];
programs.nixvim = {
enable = true;
defaultEditor = true;
colorschemes.tokyonight.enable = true;
plugins = {
notify.enable = true;
mini-cursorword.enable = true;
mini-statusline.enable = true;
web-devicons.enable = true;
vim-dadbod-completion.enable = true;
telescope.enable = true;
lazygit.enable = true;
persisted.enable = true;
wakatime.enable = true;
treesitter = {
enable = true;
grammarPackages = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
bash
json
lua
make
markdown
nix
regex
toml
vim
vimdoc
xml
yaml
];
settings = {
highlight.enable = true;
};
};
};
extraPlugins = with pkgs; [
vimPlugins.mini-completion
vimPlugins.mini-comment
vimPlugins.melange-nvim
vimPlugins.telescope-file-browser-nvim
];
opts = {
number = true;
bg = "dark";
tabstop = 2;
shiftwidth = 2;
termguicolors = true;
};
globals = {
mapleader = " ";
};
keymaps = [
{
action = "<cmd>Telescope persisted<cr>";
key = "<leader>fs";
options = {
silent = true;
};
}
{
action = "<cmd>Telescope find_files<cr>";
key = "<leader>ff";
options = {
silent = true;
};
}
{
action = "<cmd>Telescope file_browser<cr>";
key = "<leader>fv";
options = {
silent = true;
};
}
{
action = "<cmd>LazyGit<cr>";
key = "<leader>lg";
options = {
silent = true;
};
}
{
action = "<cmd>Telescope buffers<cr>";
key = "<leader>fb";
options = {
silent = true;
};
}
];
};
}