nixvim aditions

This commit is contained in:
ooks-io 2024-02-03 23:20:11 +13:00
parent 885d9f952b
commit a31c5a79b6
7 changed files with 95 additions and 20 deletions

View file

@ -1,7 +1,7 @@
{ config, lib, ... }:
let
cfg = config.desktop.console.editor.nvim;
cfg = config.homeModules.console.editor.nvim;
in
{

View file

@ -0,0 +1,28 @@
{ lib, ... }:
{
imports = [
./indent.nix
./telescope.nix
./lualine.nix
];
options.homeModules.console.editor.nvim.plugins = {
indentBlankline = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable indent-blankline nvim plugin module";
};
lualine = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable lualine nvim plugin module";
};
telescope = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable telescope nvim plugin module";
};
};
}

View file

@ -0,0 +1,13 @@
{ config, lib, ... }:
let
cfg = config.homeModules.console.editor.nvim.plugins;
in
{
config = lib.mkIf cfg.indentBlankline {
programs.nixvim.plugins.indent-blankline = {
enable = true;
};
};
}

View file

@ -5,7 +5,7 @@ let
in
{
config = lib.mkif cfg.lualine {
config = lib.mkIf cfg.lualine {
programs.nixvim.plugins.lualine = {
enable = true;
theme = "base16";

View file

@ -0,0 +1,41 @@
{ config, lib, ... }:
let
cfg = config.homeModules.console.editor.nvim.plugins;
in
{
config = lib.mkIf cfg.telescope {
programs.nixvim = {
plugins.telescope = {
enable = true;
extensions = {
fzf-native.enable = true;
frecency.enable = true;
};
keymaps = {
"<leader>ff" = "find_files";
"<leader>fg" = "live_grep";
"<leader>b" = "buffers";
"<leader>fh" = "help_tags";
"<leader>fd" = "diagnostics";
"<C-p>" = "git_files";
"<leader>p" = "oldfiles";
"<C-f>" = "live_grep";
};
keymapsSilent = true;
defaults = {
file_ignore_patterns = [
"^.git/"
"^data/"
];
set_env.COLORTERM = "truecolor";
};
};
};
};
}