aboutsummaryrefslogtreecommitdiffstats
path: root/modules/tools/nixvim
diff options
context:
space:
mode:
authorArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2025-12-11 21:03:34 +0530
committerArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2025-12-11 21:03:34 +0530
commit2eb0760f02a2a821a5d774f70521b6c16426639d (patch)
treea86ecfa0a4fcdebaa636eabaaa231d22841ad099 /modules/tools/nixvim
parent54142dba0991ecbe3031ef532d0a379ee3c58871 (diff)
downloadhome-manager-config-2eb0760f02a2a821a5d774f70521b6c16426639d.tar.gz
home-manager-config-2eb0760f02a2a821a5d774f70521b6c16426639d.zip
Splitted nixvim config into different modules
Diffstat (limited to 'modules/tools/nixvim')
-rw-r--r--modules/tools/nixvim/default.nix2
-rw-r--r--modules/tools/nixvim/plugins.nix122
-rw-r--r--modules/tools/nixvim/plugins/comment.nix7
-rw-r--r--modules/tools/nixvim/plugins/default.nix13
-rw-r--r--modules/tools/nixvim/plugins/lualine.nix39
-rw-r--r--modules/tools/nixvim/plugins/noice.nix18
-rw-r--r--modules/tools/nixvim/plugins/nvim-tree.nix45
-rw-r--r--modules/tools/nixvim/plugins/treesitter.nix12
-rw-r--r--modules/tools/nixvim/plugins/web-devicons.nix7
-rw-r--r--modules/tools/nixvim/plugins/which-key.nix15
10 files changed, 157 insertions, 123 deletions
diff --git a/modules/tools/nixvim/default.nix b/modules/tools/nixvim/default.nix
index 1188526..3040fdc 100644
--- a/modules/tools/nixvim/default.nix
+++ b/modules/tools/nixvim/default.nix
@@ -9,7 +9,7 @@ in {
nixvim.homeModules.nixvim
./colorscheme.nix
./keymaps.nix
- ./plugins.nix
+ ./plugins
];
options.tools.nixvim = {
diff --git a/modules/tools/nixvim/plugins.nix b/modules/tools/nixvim/plugins.nix
deleted file mode 100644
index 9af84fb..0000000
--- a/modules/tools/nixvim/plugins.nix
+++ /dev/null
@@ -1,122 +0,0 @@
-{ pkgs, config, lib, ... }:
-
-{
- config = lib.mkIf config.tools.nixvim.enable {
- programs.nixvim.plugins = {
- comment = {
- enable = true;
- };
- lualine = {
- enable = true;
- settings = {
- options = {
- theme = with config.scheme.withHashtag; {
- normal = {
- a = { fg = base00; bg = base0D; gui = "bold"; };
- b = { fg = base05; bg = base01; };
- c = { fg = base05; bg = base00; };
- };
- insert = {
- a = { fg = base00; bg = base0B; gui = "bold"; };
- b = { fg = base05; bg = base01; };
- c = { fg = base05; bg = base00; };
- };
- visual = {
- a = { fg = base00; bg = base0A; gui = "bold"; };
- b = { fg = base05; bg = base01; };
- c = { fg = base05; bg = base00; };
- };
- replace = {
- a = { fg = base00; bg = base08; gui = "bold"; };
- b = { fg = base05; bg = base01; };
- c = { fg = base05; bg = base00; };
- };
- inactive = {
- a = { fg = base04; bg = base00; gui = "bold"; };
- b = { fg = base04; bg = base00; };
- c = { fg = base04; bg = base00; };
- };
- };
- icons_enabled = true;
- };
- };
- };
- noice = {
- enable = true;
- cmdline = {
- enabled = true;
- view = "cmdline_popup";
- };
- popupmenu = {
- enabled = true;
- backend = "cmp";
- };
- presets = {
- command_palette = true;
- };
- };
- nvim-tree = {
- enable = true;
- settings = {
- filters = {
- dotfiles = false;
- git_clean = false;
- no_buffer = false;
- custom = {};
- };
- git = {
- enable = true;
- ignore = false;
- };
- view = {
- width = {
- padding = 0;
- };
- };
- renderer = {
- indent_markers = {
- enable = true;
- inline_arrows = false;
- icons = {
- corner = "└";
- edge = "│";
- item = "├";
- bottom = "─";
- none = " ";
- };
- };
- icons = {
- show = {
- folder = true;
- folder_arrow = false;
- file = true;
- git = true;
- };
- };
- };
- };
- };
- treesitter = {
- enable = true;
- settings = {
- highlight = { enable = true; };
- indent = { enable = true; };
- };
- };
- web-devicons = {
- enable = true;
- };
- which-key = {
- enable = true;
- settings = {
- plugins = {
- marks = true;
- registers = true;
- spelling = { enabled = true; suggestions = 20; };
- };
- win = { border = "single"; };
- };
- };
- };
- };
-}
diff --git a/modules/tools/nixvim/plugins/comment.nix b/modules/tools/nixvim/plugins/comment.nix
new file mode 100644
index 0000000..ae53f8d
--- /dev/null
+++ b/modules/tools/nixvim/plugins/comment.nix
@@ -0,0 +1,7 @@
+{ config, lib, ... }:
+
+{
+ config.programs.nixvim.plugins.comment = lib.mkIf config.tools.nixvim.enable {
+ enable = true;
+ };
+}
diff --git a/modules/tools/nixvim/plugins/default.nix b/modules/tools/nixvim/plugins/default.nix
new file mode 100644
index 0000000..dff8677
--- /dev/null
+++ b/modules/tools/nixvim/plugins/default.nix
@@ -0,0 +1,13 @@
+{ ... }:
+
+{
+ imports = [
+ ./comment.nix
+ ./lualine.nix
+ ./noice.nix
+ ./nvim-tree.nix
+ ./treesitter.nix
+ ./web-devicons.nix
+ ./which-key.nix
+ ];
+}
diff --git a/modules/tools/nixvim/plugins/lualine.nix b/modules/tools/nixvim/plugins/lualine.nix
new file mode 100644
index 0000000..8d13399
--- /dev/null
+++ b/modules/tools/nixvim/plugins/lualine.nix
@@ -0,0 +1,39 @@
+{ config, lib, ... }:
+
+{
+ config.programs.nixvim.plugins.lualine = lib.mkIf config.tools.nixvim.enable {
+ enable = true;
+ settings = {
+ options = {
+ theme = with config.scheme.withHashtag; {
+ normal = {
+ a = { fg = base00; bg = base0D; gui = "bold"; };
+ b = { fg = base05; bg = base01; };
+ c = { fg = base05; bg = base00; };
+ };
+ insert = {
+ a = { fg = base00; bg = base0B; gui = "bold"; };
+ b = { fg = base05; bg = base01; };
+ c = { fg = base05; bg = base00; };
+ };
+ visual = {
+ a = { fg = base00; bg = base0A; gui = "bold"; };
+ b = { fg = base05; bg = base01; };
+ c = { fg = base05; bg = base00; };
+ };
+ replace = {
+ a = { fg = base00; bg = base08; gui = "bold"; };
+ b = { fg = base05; bg = base01; };
+ c = { fg = base05; bg = base00; };
+ };
+ inactive = {
+ a = { fg = base04; bg = base00; gui = "bold"; };
+ b = { fg = base04; bg = base00; };
+ c = { fg = base04; bg = base00; };
+ };
+ };
+ icons_enabled = true;
+ };
+ };
+ };
+}
diff --git a/modules/tools/nixvim/plugins/noice.nix b/modules/tools/nixvim/plugins/noice.nix
new file mode 100644
index 0000000..a149ee8
--- /dev/null
+++ b/modules/tools/nixvim/plugins/noice.nix
@@ -0,0 +1,18 @@
+{ config, lib, ... }:
+
+{
+ config.programs.nixvim.plugins.noice = lib.mkIf config.tools.nixvim.enable {
+ enable = true;
+ cmdline = {
+ enabled = true;
+ view = "cmdline_popup";
+ };
+ popupmenu = {
+ enabled = true;
+ backend = "cmp";
+ };
+ presets = {
+ command_palette = true;
+ };
+ };
+}
diff --git a/modules/tools/nixvim/plugins/nvim-tree.nix b/modules/tools/nixvim/plugins/nvim-tree.nix
new file mode 100644
index 0000000..9e2e55e
--- /dev/null
+++ b/modules/tools/nixvim/plugins/nvim-tree.nix
@@ -0,0 +1,45 @@
+{ config, lib, ... }:
+
+{
+ config.programs.nixvim.plugins.nvim-tree = lib.mkIf config.tools.nixvim.enable {
+ enable = true;
+ settings = {
+ filters = {
+ dotfiles = false;
+ git_clean = false;
+ no_buffer = false;
+ custom = {};
+ };
+ git = {
+ enable = true;
+ ignore = false;
+ };
+ view = {
+ width = {
+ padding = 0;
+ };
+ };
+ renderer = {
+ indent_markers = {
+ enable = true;
+ inline_arrows = false;
+ icons = {
+ corner = "└";
+ edge = "│";
+ item = "├";
+ bottom = "─";
+ none = " ";
+ };
+ };
+ icons = {
+ show = {
+ folder = true;
+ folder_arrow = false;
+ file = true;
+ git = true;
+ };
+ };
+ };
+ };
+ };
+}
diff --git a/modules/tools/nixvim/plugins/treesitter.nix b/modules/tools/nixvim/plugins/treesitter.nix
new file mode 100644
index 0000000..9e2ec1d
--- /dev/null
+++ b/modules/tools/nixvim/plugins/treesitter.nix
@@ -0,0 +1,12 @@
+{ config, lib, ... }:
+
+{
+ config.programs.nixvim.plugins.treesitter = lib.mkIf config.tools.nixvim.enable {
+ enable = true;
+ folding = true;
+ settings = {
+ highlight = { enable = true; };
+ indent = { enable = true; };
+ };
+ };
+}
diff --git a/modules/tools/nixvim/plugins/web-devicons.nix b/modules/tools/nixvim/plugins/web-devicons.nix
new file mode 100644
index 0000000..6cbfcd0
--- /dev/null
+++ b/modules/tools/nixvim/plugins/web-devicons.nix
@@ -0,0 +1,7 @@
+{ config, lib, ... }:
+
+{
+ config.programs.nixvim.plugins.web-devicons = lib.mkIf config.tools.nixvim.enable {
+ enable = true;
+ };
+}
diff --git a/modules/tools/nixvim/plugins/which-key.nix b/modules/tools/nixvim/plugins/which-key.nix
new file mode 100644
index 0000000..99f4393
--- /dev/null
+++ b/modules/tools/nixvim/plugins/which-key.nix
@@ -0,0 +1,15 @@
+{ config, lib, ... }:
+
+{
+ config.programs.nixvim.plugins.which-key = lib.mkIf config.tools.nixvim.enable {
+ enable = true;
+ settings = {
+ plugins = {
+ marks = true;
+ registers = true;
+ spelling = { enabled = true; suggestions = 20; };
+ };
+ win = { border = "single"; };
+ };
+ };
+}