dotfiles/home-manager/nvim.nix

74 lines
1.6 KiB
Nix
Raw Permalink Normal View History

2024-01-19 23:20:41 +00:00
{ pkgs, lib, nixvim, ... }:
2024-01-16 21:08:19 +00:00
{
2024-01-19 23:20:41 +00:00
programs.nixvim = {
2024-01-16 21:08:19 +00:00
enable = true;
2024-01-19 23:20:41 +00:00
editorconfig.enable = true;
clipboard.register = "unnamedplus";
globals.mapleader = " ";
colorschemes.catppuccin = {
enable = true;
flavour = "mocha";
};
plugins.alpha = {
enable = true;
theme = "theta";
};
plugins.which-key = {
enable = true;
triggers = "auto";
};
plugins.nix.enable = true;
plugins.lightline.enable = true;
plugins.lsp.enable = true;
plugins.nvim-cmp.enable = true;
plugins.nvim-tree.enable = true;
plugins.telescope.enable = true;
keymaps = [
# file operations
{
options.desc = "Toggle NvimTree";
action = "<cmd>NvimTreeToggle<CR>";
key = "<leader>ft";
}
{
options.desc = "Find file with Telescope";
action = "<cmd>Telescope find_files<CR>";
key = "<leader>ff";
}
{
options.desc = "Find word with Telescope";
action = "<cmd>Telescope live_grep<CR>";
key = "<leader>fw";
}
# windows
{
options.desc = "Switch to window on left";
action = "<cmd>wincmd h<CR>";
key = "<leader><left>";
}
{
options.desc = "Switch to window on right";
action = "<cmd>wincmd j<CR>";
key = "<leader><right>";
}
{
options.desc = "Split window vertically";
action = "<cmd>split<CR>";
key = "<leader>v";
}
{
options.desc = "Split window horizontally";
action = "<cmd>vsplit<CR>";
key = "<leader>h";
}
];
2024-01-16 21:08:19 +00:00
};
2024-01-19 23:20:41 +00:00
}