2024-02-08 11:40:29 +01:00
|
|
|
{ inputs, pkgs, config, lib, theme, ... }: {
|
2024-02-08 03:17:11 +01:00
|
|
|
imports = [
|
|
|
|
inputs.nixvim.homeManagerModules.nixvim
|
2024-02-08 11:45:50 +01:00
|
|
|
] ++ lib.optional (builtins.isString theme) ../../../../stylix/${theme}/home-manager/nixvim.nix;
|
2024-02-08 03:17:11 +01:00
|
|
|
|
|
|
|
programs.nixvim = {
|
|
|
|
enable = true;
|
2024-02-08 05:49:29 +01:00
|
|
|
viAlias = true;
|
|
|
|
vimAlias = true;
|
2024-02-08 06:23:38 +01:00
|
|
|
|
|
|
|
globals.mapleader = " ";
|
|
|
|
globals.maplocalleader = " ";
|
2024-02-08 06:23:59 +01:00
|
|
|
|
2024-02-08 03:17:11 +01:00
|
|
|
options = {
|
|
|
|
number = true;
|
|
|
|
shiftwidth = 2;
|
2024-02-08 06:26:53 +01:00
|
|
|
# Indent wrapped text.
|
|
|
|
breakindent = true;
|
|
|
|
colorcolumn = "100";
|
|
|
|
# This is the default value. `:help cot` to see the available options.
|
2024-02-08 12:21:24 +01:00
|
|
|
completeopt = "menu,preview";
|
2024-02-08 06:26:53 +01:00
|
|
|
cursorline = true;
|
2024-02-08 03:17:11 +01:00
|
|
|
};
|
2024-02-08 03:42:16 +01:00
|
|
|
plugins = {
|
2024-02-08 06:06:13 +01:00
|
|
|
|
|
|
|
telescope = {
|
|
|
|
enable = true;
|
2024-02-08 06:32:46 +01:00
|
|
|
extensions.frecency.enable = true;
|
|
|
|
extensions.fzf-native.enable = true;
|
|
|
|
keymaps = {
|
|
|
|
"<leader><leader>" = {
|
|
|
|
action = "find_files";
|
|
|
|
desc = "Search files by name";
|
|
|
|
};
|
2024-02-08 11:40:29 +01:00
|
|
|
"<leader>s" = {
|
2024-02-08 06:32:46 +01:00
|
|
|
action = "live_grep";
|
2024-02-08 12:08:01 +01:00
|
|
|
desc = "Search by live grep";
|
2024-02-08 06:32:46 +01:00
|
|
|
};
|
2024-02-08 11:40:29 +01:00
|
|
|
"<leader>b" = {
|
2024-02-08 06:32:46 +01:00
|
|
|
action = "buffers";
|
2024-02-08 12:08:01 +01:00
|
|
|
desc = "Search open [B]uffers by file name";
|
2024-02-08 06:32:46 +01:00
|
|
|
};
|
2024-02-08 11:40:29 +01:00
|
|
|
"<leader>h" = {
|
2024-02-08 06:32:46 +01:00
|
|
|
action = "help_tags";
|
2024-02-08 12:08:01 +01:00
|
|
|
desc = "Search [H]elp";
|
2024-02-08 06:32:46 +01:00
|
|
|
};
|
2024-02-08 11:40:29 +01:00
|
|
|
"<leader>w" = {
|
2024-02-08 06:32:46 +01:00
|
|
|
action = "grep_string";
|
2024-02-08 12:08:01 +01:00
|
|
|
desc = "Search for [W]ord under cursor";
|
2024-02-08 06:32:46 +01:00
|
|
|
};
|
2024-02-08 11:40:29 +01:00
|
|
|
"<leader>g" = {
|
2024-02-08 06:32:46 +01:00
|
|
|
action = "buffers";
|
2024-02-08 12:08:01 +01:00
|
|
|
desc = "Search [G]it files";
|
2024-02-08 06:32:46 +01:00
|
|
|
};
|
2024-02-08 11:40:29 +01:00
|
|
|
"<leader>r" = {
|
2024-02-08 06:32:46 +01:00
|
|
|
action = "oldfiles";
|
2024-02-08 12:08:01 +01:00
|
|
|
desc = "Search [R]ecently opened files by name";
|
2024-02-08 06:32:46 +01:00
|
|
|
};
|
2024-02-08 06:06:13 +01:00
|
|
|
};
|
|
|
|
};
|
2024-02-08 03:42:16 +01:00
|
|
|
|
|
|
|
lsp = {
|
|
|
|
enable = true;
|
|
|
|
servers = {
|
2024-02-08 03:44:30 +01:00
|
|
|
rust-analyzer = {
|
|
|
|
enable = true;
|
|
|
|
installCargo = true;
|
|
|
|
installRustc = true;
|
|
|
|
};
|
2024-02-08 04:04:30 +01:00
|
|
|
nixd.enable = true;
|
|
|
|
pylsp.enable = true;
|
|
|
|
html.enable = true;
|
|
|
|
cssls.enable = true;
|
|
|
|
bashls.enable = true;
|
2024-02-08 03:42:16 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
nvim-cmp = {
|
|
|
|
enable = true;
|
|
|
|
autoEnableSources = true;
|
|
|
|
sources = [
|
|
|
|
{ name = "nvim_lsp"; }
|
|
|
|
{ name = "path"; }
|
|
|
|
{ name = "buffer"; }
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2024-02-08 04:20:38 +01:00
|
|
|
|
2024-02-08 03:17:11 +01:00
|
|
|
colorschemes = {
|
2024-02-08 06:06:13 +01:00
|
|
|
tokyonight.enable = true;
|
|
|
|
gruvbox.enable = true;
|
|
|
|
oxocarbon.enable = true;
|
|
|
|
nord.enable = true;
|
|
|
|
catppuccin.enable = true;
|
|
|
|
kanagawa.enable = true;
|
|
|
|
dracula.enable = true;
|
2024-02-08 04:18:12 +01:00
|
|
|
|
2024-02-08 03:17:11 +01:00
|
|
|
};
|
2024-02-08 03:24:24 +01:00
|
|
|
extraPlugins = with pkgs.vimPlugins; [
|
2024-02-08 03:17:11 +01:00
|
|
|
everforest
|
|
|
|
];
|
|
|
|
};
|
2024-02-08 11:08:43 +01:00
|
|
|
}
|