From 5e2324a9d68d37fb10188456b325b0f150c1683b Mon Sep 17 00:00:00 2001 From: ooks-io Date: Mon, 22 Jul 2024 11:51:59 +1200 Subject: [PATCH] feat(home:nvim): move to external neovim flake --- flake.lock | 212 +++++++++++++++--- flake.nix | 5 +- .../console/editor/nvim/colorscheme.nix | 37 --- home/modules/console/editor/nvim/default.nix | 28 +-- .../console/editor/nvim/keymapping.nix | 25 --- .../console/editor/nvim/plugins/default.nix | 12 - .../console/editor/nvim/plugins/indent.nix | 15 -- .../console/editor/nvim/plugins/lsp.nix | 38 ---- .../console/editor/nvim/plugins/lualine.nix | 24 -- .../console/editor/nvim/plugins/noice.nix | 19 -- .../editor/nvim/plugins/nvim-autopairs.nix | 15 -- .../console/editor/nvim/plugins/telescope.nix | 41 ---- .../editor/nvim/plugins/treesitter.nix | 15 -- .../console/editor/nvim/plugins/vim-nix.nix | 15 -- home/modules/console/editor/nvim/settings.nix | 100 --------- 15 files changed, 187 insertions(+), 414 deletions(-) delete mode 100644 home/modules/console/editor/nvim/colorscheme.nix delete mode 100644 home/modules/console/editor/nvim/keymapping.nix delete mode 100644 home/modules/console/editor/nvim/plugins/default.nix delete mode 100644 home/modules/console/editor/nvim/plugins/indent.nix delete mode 100644 home/modules/console/editor/nvim/plugins/lsp.nix delete mode 100644 home/modules/console/editor/nvim/plugins/lualine.nix delete mode 100644 home/modules/console/editor/nvim/plugins/noice.nix delete mode 100644 home/modules/console/editor/nvim/plugins/nvim-autopairs.nix delete mode 100644 home/modules/console/editor/nvim/plugins/telescope.nix delete mode 100644 home/modules/console/editor/nvim/plugins/treesitter.nix delete mode 100644 home/modules/console/editor/nvim/plugins/vim-nix.nix delete mode 100644 home/modules/console/editor/nvim/settings.nix diff --git a/flake.lock b/flake.lock index 5f4894a..ab7e681 100644 --- a/flake.lock +++ b/flake.lock @@ -127,6 +127,7 @@ "inputs": { "flake-utils": "flake-utils_5", "nixpkgs": [ + "ookvim", "nixvim", "nixpkgs" ] @@ -182,6 +183,22 @@ "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -246,18 +263,37 @@ } }, "flake-parts_4": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_2" + }, + "locked": { + "lastModified": 1719745305, + "narHash": "sha256-xwgjVUpqSviudEkpQnioeez1Uo2wzrsMaJKJClh+Bls=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c3c5ecc05edc7dafba779c6c1a61cd08ac6583e9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_5": { "inputs": { "nixpkgs-lib": [ + "ookvim", "nixvim", "nixpkgs" ] }, "locked": { - "lastModified": 1719994518, - "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", + "lastModified": 1717285511, + "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", + "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", "type": "github" }, "original": { @@ -388,26 +424,25 @@ }, "git-hooks": { "inputs": { - "flake-compat": [ - "nixvim", - "flake-compat" - ], + "flake-compat": "flake-compat_2", "gitignore": "gitignore", "nixpkgs": [ + "ookvim", "nixvim", "nixpkgs" ], "nixpkgs-stable": [ + "ookvim", "nixvim", "nixpkgs" ] }, "locked": { - "lastModified": 1720524665, - "narHash": "sha256-ni/87oHPZm6Gv0ECYxr1f6uxB0UKBWJ6HvS7lwLU6oY=", + "lastModified": 1719259945, + "narHash": "sha256-F1h+XIsGKT9TkGO3omxDLEb/9jOOsI6NnzsXFsZhry4=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "8d6a17d0cdf411c55f12602624df6368ad86fac1", + "rev": "0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07", "type": "github" }, "original": { @@ -419,6 +454,7 @@ "gitignore": { "inputs": { "nixpkgs": [ + "ookvim", "nixvim", "git-hooks", "nixpkgs" @@ -438,6 +474,22 @@ "type": "github" } }, + "gruvbox-material": { + "flake": false, + "locked": { + "lastModified": 1719323321, + "narHash": "sha256-gQO6PrZ0ss9TyD2Q9yxtsJFCWemIZcPy4p8EQz+/Ezg=", + "owner": "sainnhe", + "repo": "gruvbox-material", + "rev": "23371661bac2b7fdd9769c685e4224990c3b9ab8", + "type": "github" + }, + "original": { + "owner": "sainnhe", + "repo": "gruvbox-material", + "type": "github" + } + }, "helix": { "inputs": { "crane": "crane", @@ -505,16 +557,17 @@ "home-manager_3": { "inputs": { "nixpkgs": [ + "ookvim", "nixvim", "nixpkgs" ] }, "locked": { - "lastModified": 1720734513, - "narHash": "sha256-neWQ8eNtLTd+YMesb7WjKl1SVCbDyCm46LUgP/g/hdo=", + "lastModified": 1719588253, + "narHash": "sha256-A03i8xiVgP14DCmV5P7VUv37eodCjY4e1iai0b2EuuM=", "owner": "nix-community", "repo": "home-manager", - "rev": "90ae324e2c56af10f20549ab72014804a3064c7f", + "rev": "7e68e55d2e16d3a1e92a679430728c35a30fd24e", "type": "github" }, "original": { @@ -1092,16 +1145,17 @@ "nix-darwin": { "inputs": { "nixpkgs": [ + "ookvim", "nixvim", "nixpkgs" ] }, "locked": { - "lastModified": 1720845312, - "narHash": "sha256-yPhAsJTpyoIPQZJGC8Fw8W2lAXyhLoTn+HP20bmfkfk=", + "lastModified": 1719128254, + "narHash": "sha256-I7jMpq0CAOZA/i70+HDQO/ulLttyQu/K70cSESiMX7A=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "5ce8503cf402cf76b203eba4b7e402bea8e44abc", + "rev": "50581970f37f06a4719001735828519925ef8310", "type": "github" }, "original": { @@ -1267,6 +1321,18 @@ "type": "github" } }, + "nixpkgs-lib_2": { + "locked": { + "lastModified": 1717284937, + "narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" + } + }, "nixpkgs-small": { "locked": { "lastModified": 1721481798, @@ -1284,6 +1350,38 @@ } }, "nixpkgs_10": { + "locked": { + "lastModified": 1719506693, + "narHash": "sha256-C8e9S7RzshSdHB7L+v9I51af1gDM5unhJ2xO1ywxNH8=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "b2852eb9365c6de48ffb0dc2c9562591f652242a", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_11": { + "locked": { + "lastModified": 1719506693, + "narHash": "sha256-C8e9S7RzshSdHB7L+v9I51af1gDM5unhJ2xO1ywxNH8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b2852eb9365c6de48ffb0dc2c9562591f652242a", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_12": { "locked": { "lastModified": 1720031269, "narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=", @@ -1299,7 +1397,7 @@ "type": "github" } }, - "nixpkgs_11": { + "nixpkgs_13": { "locked": { "lastModified": 1720955038, "narHash": "sha256-GaliJqfFwyYxReFywxAa8orCO+EnDq2NK2F+5aSc8vo=", @@ -1447,21 +1545,19 @@ "inputs": { "devshell": "devshell_2", "flake-compat": "flake-compat", - "flake-parts": "flake-parts_4", + "flake-parts": "flake-parts_5", "git-hooks": "git-hooks", "home-manager": "home-manager_3", "nix-darwin": "nix-darwin", - "nixpkgs": [ - "nixpkgs" - ], + "nixpkgs": "nixpkgs_11", "treefmt-nix": "treefmt-nix_2" }, "locked": { - "lastModified": 1721421992, - "narHash": "sha256-4Mu+O2/S5XU1D8HLTU53pv20hEH6aiTkUqjLHowYdY8=", + "lastModified": 1719768179, + "narHash": "sha256-gS+EB9iYftAxcnaMM648Ht/JGMocfRctBJh3yGAslUM=", "owner": "nix-community", "repo": "nixvim", - "rev": "e80a8874accd45cac90616a7b5faa49c5a68e6b9", + "rev": "1391a64cf6f216315a6ce904db7144949585839a", "type": "github" }, "original": { @@ -1524,6 +1620,38 @@ "type": "gitlab" } }, + "nvim-hl-md": { + "flake": false, + "locked": { + "lastModified": 1682765089, + "narHash": "sha256-uGn2RcyYhla0nY9Jyn5FIcvaZjd6i9EPAQ+5UuPKumU=", + "owner": "yaocccc", + "repo": "nvim-hl-mdcodeblock.lua", + "rev": "a652470bfed791d5026f6a35bacdfe90a9d8ac2f", + "type": "github" + }, + "original": { + "owner": "yaocccc", + "repo": "nvim-hl-mdcodeblock.lua", + "type": "github" + } + }, + "nvim-md": { + "flake": false, + "locked": { + "lastModified": 1717236659, + "narHash": "sha256-tZQpioTsVwMO+rnqsid0d1F1Tbpc8IQXY8+HPWbNoak=", + "owner": "ixru", + "repo": "nvim-markdown", + "rev": "bf5c87788156f072cfb87b994844424b164b5b44", + "type": "github" + }, + "original": { + "owner": "ixru", + "repo": "nvim-markdown", + "type": "github" + } + }, "ooks-scripts": { "inputs": { "nixpkgs": "nixpkgs_9" @@ -1542,6 +1670,29 @@ "type": "github" } }, + "ookvim": { + "inputs": { + "flake-parts": "flake-parts_4", + "gruvbox-material": "gruvbox-material", + "nixpkgs": "nixpkgs_10", + "nixvim": "nixvim", + "nvim-hl-md": "nvim-hl-md", + "nvim-md": "nvim-md" + }, + "locked": { + "lastModified": 1721533991, + "narHash": "sha256-4Tbn5+5jD5qzGs61thDgy6GcAJmIMzTvFAJFurGHUgo=", + "ref": "refs/heads/master", + "rev": "3e6b2442f370b5063b49abe77dd8bce3a604b477", + "revCount": 26, + "type": "git", + "url": "ssh://git@github.com/ooks-io/ookvim" + }, + "original": { + "type": "git", + "url": "ssh://git@github.com/ooks-io/ookvim" + } + }, "root": { "inputs": { "agenix": "agenix", @@ -1562,8 +1713,8 @@ "nixarr": "nixarr", "nixpkgs": "nixpkgs_8", "nixpkgs-small": "nixpkgs-small", - "nixvim": "nixvim", "ooks-scripts": "ooks-scripts", + "ookvim": "ookvim", "systems": "systems_10", "xdg-portal-hyprland": "xdg-portal-hyprland", "zjstatus": "zjstatus" @@ -1875,16 +2026,17 @@ "treefmt-nix_2": { "inputs": { "nixpkgs": [ + "ookvim", "nixvim", "nixpkgs" ] }, "locked": { - "lastModified": 1720818892, - "narHash": "sha256-f52x9srIcqQm1Df3T+xYR5P6VfdnDFa2vkkcLhlTp6U=", + "lastModified": 1719243788, + "narHash": "sha256-9T9mSY35EZSM1KAwb7K9zwQ78qTlLjosZgtUGnw4rn4=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "5b002f8a53ed04c1a4177e7b00809d57bd2c696f", + "rev": "065a23edceff48f948816b795ea8cc6c0dee7cdf", "type": "github" }, "original": { @@ -1919,7 +2071,7 @@ "inputs": { "hyprland-protocols": "hyprland-protocols_2", "hyprlang": "hyprlang_5", - "nixpkgs": "nixpkgs_10", + "nixpkgs": "nixpkgs_12", "systems": "systems_12" }, "locked": { @@ -1970,7 +2122,7 @@ "inputs": { "crane": "crane_2", "flake-utils": "flake-utils_6", - "nixpkgs": "nixpkgs_11", + "nixpkgs": "nixpkgs_13", "rust-overlay": "rust-overlay_3" }, "locked": { diff --git a/flake.nix b/flake.nix index d1b546b..869a9db 100644 --- a/flake.nix +++ b/flake.nix @@ -93,10 +93,7 @@ }; # neovim configured with nix - nixvim = { - url = "github:nix-community/nixvim"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + ookvim.url = "git+ssh://git@github.com/ooks-io/ookvim"; # packaged firefox addons firefox-addons = { diff --git a/home/modules/console/editor/nvim/colorscheme.nix b/home/modules/console/editor/nvim/colorscheme.nix deleted file mode 100644 index 95a9167..0000000 --- a/home/modules/console/editor/nvim/colorscheme.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ config, lib, ... }: - -let - inherit (lib) mkIf; - inherit (config.colorscheme) slug; - 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 479b52b..6d4d501 100644 --- a/home/modules/console/editor/nvim/default.nix +++ b/home/modules/console/editor/nvim/default.nix @@ -1,36 +1,16 @@ -{ config, lib, inputs, ... }: +{ config, lib, inputs, pkgs, ... }: let inherit (lib) mkIf; cfg = config.ooknet.editor.nvim; console = config.ooknet.console; + + ookvim = inputs.ookvim.packages.${pkgs.system}.default; in { - imports = [ - inputs.nixvim.homeManagerModules.nixvim - ./settings.nix - ./keymapping.nix - ./plugins - ./colorscheme.nix - ]; config = mkIf (cfg.enable || console.editor == "nvim") { - programs.neovim = { - viAlias = true; - vimAlias = true; - }; - - programs.nixvim = { - enable = true; - plugins = { - which-key = { - enable = true; - keyLabels = { - " " = ""; - }; - }; - }; - }; + home.packages = [ ookvim ]; }; } diff --git a/home/modules/console/editor/nvim/keymapping.nix b/home/modules/console/editor/nvim/keymapping.nix deleted file mode 100644 index 75247b7..0000000 --- a/home/modules/console/editor/nvim/keymapping.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ config, lib, ... }: - -let - inherit (lib) mkIf; - cfg = config.ooknet.editor.nvim; - console = config.ooknet.console; -in - -{ - config = mkIf (cfg.enable || console.editor == "nvim") { - programs.nixvim = { - globals = { - mapleader = " "; - maplocalleader = " "; - }; - keymaps = [ - { - mode = "n"; - key = "f"; - action = "+find/file"; - } - ]; - }; - }; -} diff --git a/home/modules/console/editor/nvim/plugins/default.nix b/home/modules/console/editor/nvim/plugins/default.nix deleted file mode 100644 index 7cc53d8..0000000 --- a/home/modules/console/editor/nvim/plugins/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - imports = [ - ./indent.nix - ./telescope.nix - ./lualine.nix - ./lsp.nix - ./noice.nix - ./nvim-autopairs.nix - ./vim-nix.nix - ./treesitter.nix - ]; -} diff --git a/home/modules/console/editor/nvim/plugins/indent.nix b/home/modules/console/editor/nvim/plugins/indent.nix deleted file mode 100644 index dbb7ee9..0000000 --- a/home/modules/console/editor/nvim/plugins/indent.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ config, lib, ... }: - -let - inherit (lib) mkIf; - cfg = config.ooknet.editor.nvim; - console = config.ooknet.console; -in - -{ - config = mkIf (cfg.enable || console.editor == "nvim") { - programs.nixvim.plugins.indent-blankline = { - enable = true; - }; - }; -} diff --git a/home/modules/console/editor/nvim/plugins/lsp.nix b/home/modules/console/editor/nvim/plugins/lsp.nix deleted file mode 100644 index 77fa8e3..0000000 --- a/home/modules/console/editor/nvim/plugins/lsp.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ config, lib, ... }: - -let - inherit (lib) mkIf; - cfg = config.ooknet.editor.nvim; - console = config.ooknet.console; -in - -{ - config = mkIf (cfg.enable || console.editor == "nvim") { - programs.nixvim.plugins = { - lsp-lines.enable = true; - lsp = { - enable = true; - capabilities = "offsetEncoding = 'utf-16'"; - servers = { - - # nix - nil-ls = { - enable = true; - }; - # markdown - marksman = { - enable = true; - }; - # css - cssls = { - enable = true; - }; - # c/c++ - clangd = { - enable = true; - }; - }; - }; - }; - }; -} diff --git a/home/modules/console/editor/nvim/plugins/lualine.nix b/home/modules/console/editor/nvim/plugins/lualine.nix deleted file mode 100644 index 937dc4e..0000000 --- a/home/modules/console/editor/nvim/plugins/lualine.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ config, lib, ... }: - -let - inherit (lib) mkIf; - cfg = config.ooknet.editor.nvim; - console = config.ooknet.console; -in - -{ - config = mkIf (cfg.enable || console.editor == "nvim") { - programs.nixvim.plugins.lualine = { - enable = true; - globalstatus = true; - sections = { - lualine_a = ["mode"]; - lualine_b = ["branch"]; - lualine_c = ["filename" "diff"]; - lualine_x = ["diagnostics"]; - lualine_y = ["fileformat"]; - lualine_z = ["filetype"]; - }; - }; - }; -} diff --git a/home/modules/console/editor/nvim/plugins/noice.nix b/home/modules/console/editor/nvim/plugins/noice.nix deleted file mode 100644 index ccb0e8f..0000000 --- a/home/modules/console/editor/nvim/plugins/noice.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ config, lib, ... }: - -let - inherit (lib) mkIf; - cfg = config.ooknet.editor.nvim; - console = config.ooknet.console; -in - -{ - config = mkIf (cfg.enable || console.editor == "nvim") { - programs.nixvim.plugins.noice = { - enable = true; - presets = { - bottom_search = true; - command_palette = true; - }; - }; - }; -} diff --git a/home/modules/console/editor/nvim/plugins/nvim-autopairs.nix b/home/modules/console/editor/nvim/plugins/nvim-autopairs.nix deleted file mode 100644 index e3b211e..0000000 --- a/home/modules/console/editor/nvim/plugins/nvim-autopairs.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ config, lib, ... }: - -let - inherit (lib) mkIf; - cfg = config.ooknet.editor.nvim; - console = config.ooknet.console; -in - -{ - config = mkIf (cfg.enable || console.editor == "nvim") { - programs.nixvim.plugins.nvim-autopairs = { - enable = true; - }; - }; -} diff --git a/home/modules/console/editor/nvim/plugins/telescope.nix b/home/modules/console/editor/nvim/plugins/telescope.nix deleted file mode 100644 index fb9d039..0000000 --- a/home/modules/console/editor/nvim/plugins/telescope.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ config, lib, ... }: - -let - inherit (lib) mkIf; - cfg = config.ooknet.editor.nvim; - console = config.ooknet.console; -in - -{ - config = mkIf (cfg.enable || console.editor == "nvim") { - programs.nixvim = { - plugins.telescope = { - enable = true; - extensions = { - fzf-native.enable = true; - frecency.enable = true; - }; - - keymaps = { - "ff" = "find_files"; - "fg" = "live_grep"; - "b" = "buffers"; - "fh" = "help_tags"; - "fd" = "diagnostics"; - - "" = "git_files"; - "p" = "oldfiles"; - "" = "live_grep"; - }; - - defaults = { - file_ignore_patterns = [ - "^.git/" - "^data/" - ]; - set_env.COLORTERM = "truecolor"; - }; - }; - }; - }; -} diff --git a/home/modules/console/editor/nvim/plugins/treesitter.nix b/home/modules/console/editor/nvim/plugins/treesitter.nix deleted file mode 100644 index 4c764bf..0000000 --- a/home/modules/console/editor/nvim/plugins/treesitter.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ config, lib, ... }: - -let - inherit (lib) mkIf; - cfg = config.ooknet.editor.nvim; - console = config.ooknet.console; -in - -{ - config = mkIf (cfg.enable || console.editor == "nvim") { - programs.nixvim.plugins.treesitter = { - enable = true; - }; - }; -} diff --git a/home/modules/console/editor/nvim/plugins/vim-nix.nix b/home/modules/console/editor/nvim/plugins/vim-nix.nix deleted file mode 100644 index 8e2555a..0000000 --- a/home/modules/console/editor/nvim/plugins/vim-nix.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ config, lib, ... }: - -let - inherit (lib) mkIf; - cfg = config.ooknet.editor.nvim; - console = config.ooknet.console; -in - -{ - config = mkIf (cfg.enable || console.editor == "nvim") { - programs.nixvim.plugins.nix = { - enable = true; - }; - }; -} diff --git a/home/modules/console/editor/nvim/settings.nix b/home/modules/console/editor/nvim/settings.nix deleted file mode 100644 index 1fedb1a..0000000 --- a/home/modules/console/editor/nvim/settings.nix +++ /dev/null @@ -1,100 +0,0 @@ -{ config, lib, ... }: - -let - inherit (lib) mkIf; - cfg = config.ooknet.editor.nvim; - console = config.ooknet.console; -in - -{ - config = mkIf (cfg.enable || console.editor == "nvim") { - programs.nixvim = { - opts = { - - # line numbers - relativenumber = true; - number = true; - - # command line height - cmdheight = 2; - - # popup menu height (0 == use all available space) - pumheight = 0; - - hidden = true; - - # mouse mode - mouse = "a"; - mousemodel = "extend"; - - # undo history - undofile = true; - swapfile = false; - backup = false; - - # tab size - tabstop = 2; - expandtab = true; - showtabline = 2; - softtabstop = 2; - - # auto indenting - smartindent = true; - shiftwidth = 2; - - # text wrapping - wrap = true; - - # fold settings - foldcolumn = "0"; - foldlevel = 99; - foldlevelstart = 99; - foldenable = true; - - # which-key timeout - timeoutlen = 10; - - # faster updatetime - updatetime = 50; - - # cursor position unless at start/end - scrolloff = 8; - - # 24 bit colors - termguicolors = true; - - # highlight cursor line - cursorline = true; - - # encoding - encoding = "utf-8"; - fileencoding = "utf-8"; - - # chars list - # list = true; - # listchars = "eol:↲,tab:|->,lead:·,space: ,trail:•,extends:→,precedes:←,nbsp:␣"; - - # splitting - splitbelow = true; - splitright = true; - - # better searching - ignorecase = true; - grepprg = "rg --vimgrep"; - grepformat = "%f:%l:%c:%m"; - smartcase = true; - - # prevent screen jumping - signcolumn = "yes"; - - incsearch = true; - autoindent = true; - }; - - clipboard = { - register = "unnamedplus"; - providers.wl-copy.enable = true; - }; - }; - }; -}