From 2eb0760f02a2a821a5d774f70521b6c16426639d Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Thu, 11 Dec 2025 21:03:34 +0530 Subject: Splitted nixvim config into different modules --- modules/tools/nixvim/plugins/comment.nix | 7 +++++ modules/tools/nixvim/plugins/default.nix | 13 ++++++++ modules/tools/nixvim/plugins/lualine.nix | 39 +++++++++++++++++++++++ modules/tools/nixvim/plugins/noice.nix | 18 +++++++++++ modules/tools/nixvim/plugins/nvim-tree.nix | 45 +++++++++++++++++++++++++++ modules/tools/nixvim/plugins/treesitter.nix | 12 +++++++ modules/tools/nixvim/plugins/web-devicons.nix | 7 +++++ modules/tools/nixvim/plugins/which-key.nix | 15 +++++++++ 8 files changed, 156 insertions(+) create mode 100644 modules/tools/nixvim/plugins/comment.nix create mode 100644 modules/tools/nixvim/plugins/default.nix create mode 100644 modules/tools/nixvim/plugins/lualine.nix create mode 100644 modules/tools/nixvim/plugins/noice.nix create mode 100644 modules/tools/nixvim/plugins/nvim-tree.nix create mode 100644 modules/tools/nixvim/plugins/treesitter.nix create mode 100644 modules/tools/nixvim/plugins/web-devicons.nix create mode 100644 modules/tools/nixvim/plugins/which-key.nix (limited to 'modules/tools/nixvim/plugins') 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"; }; + }; + }; +} -- cgit v1.2.3