From e743691d94c29c865d0219230433e0f9a86d9870 Mon Sep 17 00:00:00 2001 From: ooks-io Date: Mon, 1 Jul 2024 21:28:47 +1200 Subject: [PATCH] feat(home:git): add gh tool --- .../console/editor/nvim/colorscheme.nix | 37 ++++++++ home/modules/console/editor/nvim/default.nix | 1 + .../console/editor/nvim/keymapping.nix | 41 ++------- .../console/editor/nvim/plugins/default.nix | 5 ++ .../console/editor/nvim/plugins/lsp.nix | 38 +++++++++ .../console/editor/nvim/plugins/lualine.nix | 1 - .../console/editor/nvim/plugins/noice.nix | 19 +++++ .../editor/nvim/plugins/nvim-autopairs.nix | 15 ++++ .../editor/nvim/plugins/treesitter.nix | 15 ++++ .../console/editor/nvim/plugins/vim-nix.nix | 15 ++++ home/modules/console/editor/nvim/settings.nix | 84 ++++++++++++++++--- home/modules/console/tools/git.nix | 1 + 12 files changed, 225 insertions(+), 47 deletions(-) create mode 100644 home/modules/console/editor/nvim/colorscheme.nix create mode 100644 home/modules/console/editor/nvim/plugins/lsp.nix create mode 100644 home/modules/console/editor/nvim/plugins/noice.nix create mode 100644 home/modules/console/editor/nvim/plugins/nvim-autopairs.nix create mode 100644 home/modules/console/editor/nvim/plugins/treesitter.nix create mode 100644 home/modules/console/editor/nvim/plugins/vim-nix.nix diff --git a/home/modules/console/editor/nvim/colorscheme.nix b/home/modules/console/editor/nvim/colorscheme.nix new file mode 100644 index 0000000..a5655bd --- /dev/null +++ b/home/modules/console/editor/nvim/colorscheme.nix @@ -0,0 +1,37 @@ +{ config, lib, ... }: + +let + inherit (lib) mkIf; + inherit (config.colorscheme) slug palette; + cfg = config.ooknet.editor.nvim; + console = config.ooknet.console; +in + +{ + config = mkIf (cfg.enable || console.editor == "nvim") { + programs.nixvim = { + colorschemes.base16 = { + enable = true; + colorscheme = "${slug}"; + # colorscheme = { + # base00 = "#${palette.base00}"; + # base01 = "#${palette.base01}"; + # base02 = "#${palette.base02}"; + # base03 = "#${palette.base03}"; + # base04 = "#${palette.base04}"; + # base05 = "#${palette.base05}"; + # base06 = "#${palette.base06}"; + # base07 = "#${palette.base07}"; + # base08 = "#${palette.base08}"; + # base09 = "#${palette.base09}"; + # base0A = "#${palette.base0A}"; + # base0B = "#${palette.base0B}"; + # base0C = "#${palette.base0C}"; + # base0D = "#${palette.base0D}"; + # base0E = "#${palette.base0E}"; + # base0F = "#${palette.base0F}"; + # }; + }; + }; + }; +} diff --git a/home/modules/console/editor/nvim/default.nix b/home/modules/console/editor/nvim/default.nix index f790ab6..479b52b 100644 --- a/home/modules/console/editor/nvim/default.nix +++ b/home/modules/console/editor/nvim/default.nix @@ -12,6 +12,7 @@ in ./settings.nix ./keymapping.nix ./plugins + ./colorscheme.nix ]; config = mkIf (cfg.enable || console.editor == "nvim") { diff --git a/home/modules/console/editor/nvim/keymapping.nix b/home/modules/console/editor/nvim/keymapping.nix index 72fcba0..97b1693 100644 --- a/home/modules/console/editor/nvim/keymapping.nix +++ b/home/modules/console/editor/nvim/keymapping.nix @@ -13,40 +13,13 @@ in mapleader = " "; maplocalleader = " "; }; - - keymaps = let - normal = - mapAttrsToList - (key: action: { - mode = "n"; - inherit action key; - }) - { - "" = ""; - "esc" = ":noh"; - "Y" = "$y"; - }; - visual = - mapAttrsToList - (key: action: { - mode = "v"; - inherit action key; - }) - { - # better indenting - ">" = ">gv"; - "<" = "" = ">gv"; - "" = "