diff --git a/config/nvim/lua/nifoc/config/telescope.lua b/config/nvim/lua/nifoc/config/telescope.lua index 82e852f..7a9c983 100644 --- a/config/nvim/lua/nifoc/config/telescope.lua +++ b/config/nvim/lua/nifoc/config/telescope.lua @@ -33,7 +33,7 @@ telescope.setup { }, } -telescope.load_extension('fzf') +telescope.load_extension("zf-native") vim.cmd('augroup nifoc_telescope') vim.cmd('autocmd!') diff --git a/flake.lock b/flake.lock index 91380f3..26169af 100644 --- a/flake.lock +++ b/flake.lock @@ -51,6 +51,21 @@ "type": "github" } }, + "flake-utils_2": { + "locked": { + "lastModified": 1629481132, + "narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "997f7efcb746a9c140ce1f13c72263189225f482", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -58,11 +73,11 @@ ] }, "locked": { - "lastModified": 1644534280, - "narHash": "sha256-Gzf/Jq/F1vvTp6XkzPU+pBCj3OSAFLiR7f0ptwRseiI=", + "lastModified": 1644706973, + "narHash": "sha256-xOyxrhc5V79u0ZNmnPmJbY3ngtp43dNISEmrb8Ie6wQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "6d9d9294d09b5e88df65f8c6651efb8a4d7d2476", + "rev": "7c2ae0bdd20ddcaafe41ef669226a1df67f8aa06", "type": "github" }, "original": { @@ -81,11 +96,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1644629754, - "narHash": "sha256-OFcOebzxwtpHQF76Xdjq5cgXPxECrWlYZeGgrpvovQs=", + "lastModified": 1644723469, + "narHash": "sha256-MVpaV2cKd0C82FJb3M96UrELkwy82swPOPNgfel7zr8=", "owner": "neovim", "repo": "neovim", - "rev": "a7321e37a75fff5c0048b0779cf91d504455d6f3", + "rev": "6f5fae08a302bce6de453425a6b1c1d851112914", "type": "github" }, "original": { @@ -104,11 +119,11 @@ ] }, "locked": { - "lastModified": 1644653578, - "narHash": "sha256-x+syOYiqB0CpHstjNbvCo1N0AR0Y2Ud0OJ5GX+XhGI8=", + "lastModified": 1644739986, + "narHash": "sha256-Jwjfj2LuXWx/hLXsgtfYUvYRAwe++XzhbIrCd01QCc8=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "08b5db099c74e2f266464f9f2b6f821a0183590b", + "rev": "93c6019b477175990882db4d901ce5fdb325ae54", "type": "github" }, "original": { @@ -159,7 +174,29 @@ "home-manager": "home-manager", "neovim-nightly-overlay": "neovim-nightly-overlay", "nifoc-overlay": "nifoc-overlay", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "zig": "zig" + } + }, + "zig": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1644712256, + "narHash": "sha256-dAeX46ZtlQWejTOWTAUNXdTHDJaRHqWynvXAl6FMlC8=", + "owner": "arqv", + "repo": "zig-overlay", + "rev": "fd01c97935f6858f102feadaf9dae5ea8640d29f", + "type": "github" + }, + "original": { + "owner": "arqv", + "repo": "zig-overlay", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index 1ef367a..fc60d42 100644 --- a/flake.nix +++ b/flake.nix @@ -17,6 +17,11 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + zig = { + url = "github:arqv/zig-overlay"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nifoc-overlay = { url = "github:nifoc/nix-overlay"; inputs.nixpkgs.follows = "nixpkgs"; @@ -26,11 +31,13 @@ outputs = inputs@{ self, nixpkgs, darwin, home-manager, ... }: let overlay-neovim = inputs.neovim-nightly-overlay.overlay; + overlay-zig = final: prev: { zigpkgs = inputs.zig.packages.${prev.system}; }; overlay-nifoc = inputs.nifoc-overlay.overlay; nixpkgsConfig = { overlays = [ overlay-neovim + overlay-zig overlay-nifoc ]; diff --git a/programs/nvim/default.nix b/programs/nvim/default.nix index 945ebc6..a1e9b46 100644 --- a/programs/nvim/default.nix +++ b/programs/nvim/default.nix @@ -86,7 +86,7 @@ in # Telescope telescope-nvim - telescope-fzf-native-nvim + telescope-zf-native-nvim project-nvim todo-comments-nvim diff --git a/programs/nvim/plugins.json b/programs/nvim/plugins.json new file mode 100644 index 0000000..934b999 --- /dev/null +++ b/programs/nvim/plugins.json @@ -0,0 +1,169 @@ +[ + { + "src": "lewis6991/impatient.nvim" + }, + { + "src": "antoinemadec/FixCursorHold.nvim" + }, + { + "src": "delphinus/vim-auto-cursorline" + }, + { + "src": "folke/which-key.nvim" + }, + { + "src": "svermeulen/vim-yoink" + }, + { + "src": "svermeulen/vim-cutlass" + }, + { + "src": "svermeulen/vim-subversive" + }, + { + "src": "Mofiqul/dracula.nvim" + }, + { + "src": "nvim-treesitter/nvim-treesitter" + }, + { + "src": "nvim-treesitter/playground" + }, + { + "src": "martinda/Jenkinsfile-vim-syntax" + }, + { + "src": "nvim-lua/popup.nvim" + }, + { + "src": "nvim-lua/plenary.nvim" + }, + { + "src": "nvim-telescope/telescope.nvim" + }, + { + "src": "natecraddock/telescope-zf-native.nvim", + "nativeBuildInputs": [ + "just", + "zigpkgs.\"0.9.0\"" + ], + "buildPhase": "just clean\nXDG_CACHE_HOME=./xdg_cache just build\nmv lib/libzf.so lib/libzf-osx-arm64.so\nrm -rf ./xdg_cache" + }, + { + "src": "ahmedkhalf/project.nvim" + }, + { + "src": "neovim/nvim-lspconfig" + }, + { + "src": "jose-elias-alvarez/null-ls.nvim" + }, + { + "src": "kyazdani42/nvim-web-devicons" + }, + { + "src": "folke/trouble.nvim" + }, + { + "src": "onsails/lspkind-nvim" + }, + { + "src": "nvim-lua/lsp-status.nvim" + }, + { + "src": "hrsh7th/nvim-cmp" + }, + { + "src": "hrsh7th/cmp-nvim-lsp" + }, + { + "src": "hrsh7th/cmp-nvim-lsp-signature-help" + }, + { + "src": "L3MON4D3/LuaSnip" + }, + { + "src": "saadparwaiz1/cmp_luasnip" + }, + { + "src": "hrsh7th/cmp-nvim-lua" + }, + { + "src": "hrsh7th/cmp-path" + }, + { + "src": "hrsh7th/cmp-buffer" + }, + { + "src": "ray-x/cmp-treesitter" + }, + { + "src": "hrsh7th/cmp-cmdline" + }, + { + "src": "hrsh7th/cmp-nvim-lsp-document-symbol" + }, + { + "src": "windwp/nvim-autopairs" + }, + { + "src": "windwp/nvim-ts-autotag" + }, + { + "src": "numToStr/Comment.nvim" + }, + { + "src": "nvim-treesitter/nvim-treesitter-textobjects" + }, + { + "src": "blackCauldron7/surround.nvim" + }, + { + "src": "andymass/vim-matchup" + }, + { + "src": "mbbill/undotree" + }, + { + "src": "nvim-lualine/lualine.nvim" + }, + { + "src": "akinsho/bufferline.nvim" + }, + { + "src": "kyazdani42/nvim-tree.lua" + }, + { + "src": "lukas-reineke/indent-blankline.nvim" + }, + { + "src": "lukas-reineke/virt-column.nvim" + }, + { + "src": "norcalli/nvim-colorizer.lua" + }, + { + "src": "lewis6991/gitsigns.nvim" + }, + { + "src": "lewis6991/spellsitter.nvim" + }, + { + "src": "rcarriga/nvim-notify" + }, + { + "src": "LumaKernel/nvim-visual-eof.lua" + }, + { + "src": "RRethy/vim-illuminate" + }, + { + "src": "numToStr/FTerm.nvim" + }, + { + "src": "folke/todo-comments.nvim" + }, + { + "src": "editorconfig/editorconfig-vim" + } +] diff --git a/programs/nvim/plugins.nix b/programs/nvim/plugins.nix index 7c3a928..21c70a9 100644 --- a/programs/nvim/plugins.nix +++ b/programs/nvim/plugins.nix @@ -9,6 +9,7 @@ repo = "impatient.nvim"; rev = "c602af04b487643b4b3f7f9aa9b4aea38a596b94"; sha256 = "AXwTzxeHdglU7Kc3nRdYfDLJIwFEEm0FcXhb1uhj0tM="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/lewis6991/impatient.nvim"; }; @@ -20,6 +21,7 @@ repo = "FixCursorHold.nvim"; rev = "0e4e22d21975da60b0fd2d302285b3b603f9f71e"; sha256 = "v56qtPGa8MkEPpQpzA+XHH/TsV1q4p65wSuvF140LuM="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/antoinemadec/FixCursorHold.nvim"; }; @@ -31,6 +33,7 @@ repo = "vim-auto-cursorline"; rev = "ee22b1589809f1b1aaaaef15997a0a84585d667f"; sha256 = "+ajtZm9pJrl49fI7zFqBJ49SL1XqfOoTp0ICelEknYc="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/delphinus/vim-auto-cursorline"; }; @@ -42,6 +45,7 @@ repo = "which-key.nvim"; rev = "28d2bd129575b5e9ebddd88506601290bb2bb221"; sha256 = "bz41c/zenRVVIkwtHHIi8wF/LZn2JEkFc6tkPv/BYY4="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/folke/which-key.nvim"; }; @@ -53,6 +57,7 @@ repo = "vim-yoink"; rev = "89ed6934679fdbc3c20f552b50b1f869f624cd22"; sha256 = "ekGKOYzmdaMqAun/3fRGlhA7bLKuhzsXsEcFNukgFWU="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/svermeulen/vim-yoink"; }; @@ -64,6 +69,7 @@ repo = "vim-cutlass"; rev = "7afd649415541634c8ce317fafbc31cd19d57589"; sha256 = "j5W9q905ApDf3fvCIS4UwyHYnEZu5Ictn+6JkV/xjig="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/svermeulen/vim-cutlass"; }; @@ -75,6 +81,7 @@ repo = "vim-subversive"; rev = "6286cda3f9222bfd490fe34a00a2d8cd4925adec"; sha256 = "V+WHNtR1L2SXtlPaojqcgW4giRY1QrMzvmB+3FvuTtM="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/svermeulen/vim-subversive"; }; @@ -86,17 +93,19 @@ repo = "dracula.nvim"; rev = "a219971291c56bcca3827cb7bd40aaaef23feeca"; sha256 = "r1VhURChdutQFO9fiF+YV+MJycuj6xohTmR9DYpUFdk="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/Mofiqul/dracula.nvim"; }; nvim-treesitter = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "nvim-treesitter"; - version = "1644657676"; + version = "1644769494"; src = pkgs.fetchFromGitHub { owner = "nvim-treesitter"; repo = "nvim-treesitter"; - rev = "a13b40248a1f467dd7794b2860492fe23fdad098"; - sha256 = "dd0O3CzmZRsU0rwSPJMTvN/PzMnZGebJKxjt9749o5o="; + rev = "f7e9caa65d6a9a2b6fd413267f78f484590aec40"; + sha256 = "jJKZmvg5OE2wdEbCaqNL5G8Qgm59qEBDMSc7qRBfY6c="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/nvim-treesitter/nvim-treesitter"; }; @@ -108,6 +117,7 @@ repo = "playground"; rev = "787a7a8d4444e58467d6b3d4b88a497e7d494643"; sha256 = "YMINv064VzuzZLuQNY6HN3oCZvYjNQi6IMliQPTijfg="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/nvim-treesitter/playground"; }; @@ -119,6 +129,7 @@ repo = "Jenkinsfile-vim-syntax"; rev = "0d05729168ea44d60862f17cffa80024ab30bcc9"; sha256 = "/qUlzGfo2OhHEBGaoTH8K4VVT0Zg9ocJBb84orMD4xc="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/martinda/Jenkinsfile-vim-syntax"; }; @@ -130,6 +141,7 @@ repo = "popup.nvim"; rev = "b7404d35d5d3548a82149238289fa71f7f6de4ac"; sha256 = "dNWz/xovUg55fDZUpVs/2kLphk3lqQyvPtc9ATwbeSQ="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/nvim-lua/popup.nvim"; }; @@ -141,31 +153,40 @@ repo = "plenary.nvim"; rev = "66472128c3191b786966798fc956a689705ab1be"; sha256 = "Iyp2tka563YJjygBiE5g6RDiZWC0Y58w990QAvZVo3A="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/nvim-lua/plenary.nvim"; }; telescope-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "telescope.nvim"; - version = "1644699621"; + version = "1644710452"; src = pkgs.fetchFromGitHub { owner = "nvim-telescope"; repo = "telescope.nvim"; - rev = "f58b0d4dd1fe42c817a864c9fd196b3e5115215f"; - sha256 = "VNVGledcs9rcaSI6R8CYe7xN7iZCVrhNTiUFqPu+SAo="; + rev = "88229d5afd23c2325544e8625b111093fed6554b"; + sha256 = "1vmvvKVpNOqVW0Moy9UsLrwwouIrRrmvp+uq13qbZ8I="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/nvim-telescope/telescope.nvim"; }; - telescope-fzf-native-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { - pname = "telescope-fzf-native.nvim"; - version = "1637772424"; + telescope-zf-native-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { + pname = "telescope-zf-native.nvim"; + version = "1644705939"; src = pkgs.fetchFromGitHub { - owner = "nvim-telescope"; - repo = "telescope-fzf-native.nvim"; - rev = "b8662b076175e75e6497c59f3e2799b879d7b954"; - sha256 = "gd/nNgMhvHdJWOlHMdYxY8Hi8Qo4F66TjKSewNKNR3I="; + owner = "natecraddock"; + repo = "telescope-zf-native.nvim"; + rev = "87e154ad42b61051c856954c7d01801d6ea02220"; + sha256 = "frmKDmV0nihWT9XWuAJvnc2FPUIAb+bPOgHWWTUTLI4="; + fetchSubmodules = true; }; - buildPhase = "make"; - meta.homepage = "https://github.com/nvim-telescope/telescope-fzf-native.nvim"; + nativeBuildInputs = with pkgs; [ just zigpkgs."0.9.0" ]; + buildPhase = '' + just clean + XDG_CACHE_HOME=./xdg_cache just build + mv lib/libzf.so lib/libzf-osx-arm64.so + rm -rf ./xdg_cache + ''; + meta.homepage = "https://github.com/natecraddock/telescope-zf-native.nvim"; }; project-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "project.nvim"; @@ -175,17 +196,19 @@ repo = "project.nvim"; rev = "cef52b8da07648b750d7f1e8fb93f12cb9482988"; sha256 = "BrseGCUZV689EbeLAme2PBeWOerwDV3lGaRTihS4l+M="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/ahmedkhalf/project.nvim"; }; nvim-lspconfig = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "nvim-lspconfig"; - version = "1644680994"; + version = "1644780846"; src = pkgs.fetchFromGitHub { owner = "neovim"; repo = "nvim-lspconfig"; - rev = "fad98f89c7111c1fb738c71353e3cfefdcde949b"; - sha256 = "egfglFM+26Wbr0FIMDvzplEpHI+FGlC46ktQOdZpcao="; + rev = "0da0023374a2acbab25e538383006f1404bf3c0d"; + sha256 = "2gtGMZuMThQs5Uv+QuC03qW7AT88YL6XaVxxxuZzRos="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/neovim/nvim-lspconfig"; }; @@ -197,6 +220,7 @@ repo = "null-ls.nvim"; rev = "51f336638100ba1462e9c1fb0831464e44d02aef"; sha256 = "vEXeEIlK/kpoNTM54IFKpmMUXBQpcyeKgIa7X2Nv59g="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/jose-elias-alvarez/null-ls.nvim"; }; @@ -208,6 +232,7 @@ repo = "nvim-web-devicons"; rev = "e3294f687626b40754bb40ac2d636d166098b2fb"; sha256 = "pBZ2HrgtNeQ5dF/dZ/DKRRiboplRr5fvSo74ebubUtE="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/kyazdani42/nvim-web-devicons"; }; @@ -219,6 +244,7 @@ repo = "trouble.nvim"; rev = "20469be985143d024c460d95326ebeff9971d714"; sha256 = "t6zNugUO75TxOs4T83H8Slr04m3Dv113p/M/4XPg4QE="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/folke/trouble.nvim"; }; @@ -230,6 +256,7 @@ repo = "lspkind-nvim"; rev = "93e98a0c900327ce7e9be1cbf24aebbe7170e375"; sha256 = "0103K5lnzWCyuT/qwiBUo5PJ7lUX7fo+zNeEnQClI7A="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/onsails/lspkind-nvim"; }; @@ -241,17 +268,19 @@ repo = "lsp-status.nvim"; rev = "4073f766f1303fb602802075e558fe43e382cc92"; sha256 = "5K7AtqAAiuma1bHba2ijbfHKWr9r7Dxd8BfGU2zxLKo="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/nvim-lua/lsp-status.nvim"; }; nvim-cmp = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "nvim-cmp"; - version = "1644667517"; + version = "1644759142"; src = pkgs.fetchFromGitHub { owner = "hrsh7th"; repo = "nvim-cmp"; - rev = "7e473b99d3f977703f56591ccd4a7f8d197e1d61"; - sha256 = "y7vhfKPeSrRFfl15Fzgck0xbXYKqFji+juk4tdae+kE="; + rev = "2d8f40b297973fc06bd8e5e2ef89d6cd97e2e0a4"; + sha256 = "WTSAo0alVmRRcscbYfJ652W8k3qMhJpL61Ch/zSdJcA="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/hrsh7th/nvim-cmp"; }; @@ -263,6 +292,7 @@ repo = "cmp-nvim-lsp"; rev = "ebdfc204afb87f15ce3d3d3f5df0b8181443b5ba"; sha256 = "itlKrCBo8wMNBCknW+7INOyVmwbcwmkGLzpc2lvvqk4="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/hrsh7th/cmp-nvim-lsp"; }; @@ -274,17 +304,19 @@ repo = "cmp-nvim-lsp-signature-help"; rev = "3f486a300c7f7296719c0705117afe24e3985766"; sha256 = "uv9/ny9lwn1lxqkyrP8DHCkMJg4lDd0jmj5VL5YPwUM="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/hrsh7th/cmp-nvim-lsp-signature-help"; }; LuaSnip = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "LuaSnip"; - version = "1644566044"; + version = "1644759090"; src = pkgs.fetchFromGitHub { owner = "L3MON4D3"; repo = "LuaSnip"; - rev = "eb84bb89933141fa0cd0683cb960fef975106dfd"; - sha256 = "E70Ovav6JJxj61OrGFC0tLlwjDFVYJ0mSmt/HCxxnCY="; + rev = "c1d07078dce0c9631e89a299e4b4a93334650a7b"; + sha256 = "jxYeMQw3H3tbF7Wa+GxVzAMHDnZgZiausNuYdCMiDXo="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/L3MON4D3/LuaSnip"; }; @@ -296,6 +328,7 @@ repo = "cmp_luasnip"; rev = "d6f837f4e8fe48eeae288e638691b91b97d1737f"; sha256 = "vkDOW0882wG22z1s4npjGPUJyHd5boW8KWDIoy+WrjI="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/saadparwaiz1/cmp_luasnip"; }; @@ -307,6 +340,7 @@ repo = "cmp-nvim-lua"; rev = "d276254e7198ab7d00f117e88e223b4bd8c02d21"; sha256 = "/xUfw5adjXu8ySZBBFrLVJ1FCNJzfh79wf+wJsW6sIY="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/hrsh7th/cmp-nvim-lua"; }; @@ -318,6 +352,7 @@ repo = "cmp-path"; rev = "466b6b8270f7ba89abd59f402c73f63c7331ff6e"; sha256 = "xYzTpqVKpBBnajqqRRzAXlHAC13VGK1D9mFr3bntepY="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/hrsh7th/cmp-path"; }; @@ -329,6 +364,7 @@ repo = "cmp-buffer"; rev = "f83773e2f433a923997c5faad7ea689ec24d1785"; sha256 = "LXNckOkSqRMFWJhBaPUm8el0SgTS2XPvg3N8CEwHLHw="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/hrsh7th/cmp-buffer"; }; @@ -340,17 +376,19 @@ repo = "cmp-treesitter"; rev = "a6b4c95ee922cace635b5a46c7fcc691d2559fbb"; sha256 = "Skdb113mgJqPJGUCk08ymo2IrnCyMO2KY36rOIxFHRk="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/ray-x/cmp-treesitter"; }; cmp-cmdline = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "cmp-cmdline"; - version = "1638355837"; + version = "1644756337"; src = pkgs.fetchFromGitHub { owner = "hrsh7th"; repo = "cmp-cmdline"; - rev = "29ca81a6f0f288e6311b3377d9d9684d22eac2ec"; - sha256 = "BkMvtwkLnT0tnLn9F+vt3vtmAQOBVFwFC3YF7ZsE8Hs="; + rev = "f4beb74e8e036f9532bedbcac0b93c7a55a0f8b0"; + sha256 = "8KlmtXYfapji+n6tntAGlTcHYT3CJtdZaFR8luEu7Go="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/hrsh7th/cmp-cmdline"; }; @@ -362,6 +400,7 @@ repo = "cmp-nvim-lsp-document-symbol"; rev = "29d12e55cf49ee07b829114ad39b161cad2544ab"; sha256 = "i3lc1u+ml1Zh6bx+uaiIYZZbQhAhJyMbeWzIYwgZlXA="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/hrsh7th/cmp-nvim-lsp-document-symbol"; }; @@ -373,6 +412,7 @@ repo = "nvim-autopairs"; rev = "64c2656664f1c509f4185c64e388dd70fb3c358e"; sha256 = "hOoPzvB/tYSc/e3Aux30wX5XjmrwYoRWoMegajyM+D0="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/windwp/nvim-autopairs"; }; @@ -384,6 +424,7 @@ repo = "nvim-ts-autotag"; rev = "5149f0c6557fa4a492d82895a564f4cd4a9c7715"; sha256 = "tVCDJ1oFoNzMkcaR9kT4a+xGTpphCVcOpwI/Uycm3X8="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/windwp/nvim-ts-autotag"; }; @@ -395,6 +436,7 @@ repo = "Comment.nvim"; rev = "84648f1d2d1c69b693437c9b0b12e84f526c3671"; sha256 = "TdHVVeXS/LOKYlYmN7mzJLyqzD1qLzChy48BhQMg1Hs="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/numToStr/Comment.nvim"; }; @@ -406,6 +448,7 @@ repo = "nvim-treesitter-textobjects"; rev = "fea609aa58b3390a09e8df0e96902fd4b094d8b7"; sha256 = "hxf2OMgEOg1PRpAdYuMCOe0opkzX/o6yho+MEU5XQQg="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects"; }; @@ -417,6 +460,7 @@ repo = "surround.nvim"; rev = "549045828bbd9de0746b411a762fa8c382fb10ff"; sha256 = "XXR/48pbeGwKifYrhtEyMsOCUxejuIla60q0fSYFgTc="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/blackCauldron7/surround.nvim"; }; @@ -428,6 +472,7 @@ repo = "vim-matchup"; rev = "2acaf94271c24dfae4281b831945aabd19eaffa8"; sha256 = "WqZvyYchT5nkHh99TH1hIv/z7/+IDNlaTv6NdlSPJPk="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/andymass/vim-matchup"; }; @@ -439,6 +484,7 @@ repo = "undotree"; rev = "8a01863a8204b2382ec341d0203c4e9665212221"; sha256 = "43Yco/5Q2t8lVRQbgeXLpygXga0cKmLfdjvCPCsPDGo="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/mbbill/undotree"; }; @@ -450,6 +496,7 @@ repo = "lualine.nvim"; rev = "6a3d367449fac10ed9d9ee356e8f02ba1ca941f6"; sha256 = "5nwjccWYcmKw4R5COkqn3JfPi8EUbJu/Nec90GlrnUM="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/nvim-lualine/lualine.nvim"; }; @@ -461,17 +508,19 @@ repo = "bufferline.nvim"; rev = "305d4fd693b6ebcb9ac95cf16c0693ce64960162"; sha256 = "E4S613jB165yQCInBe0eysiYqhhPff8HfvTrBtOkYRE="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/akinsho/bufferline.nvim"; }; nvim-tree-lua = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "nvim-tree.lua"; - version = "1644573971"; + version = "1644756249"; src = pkgs.fetchFromGitHub { owner = "kyazdani42"; repo = "nvim-tree.lua"; - rev = "0f7da146bff79032df44b423e52ea17b05d35026"; - sha256 = "ZOLTwepyTmUXKwJZVXU0SnigZbiJcsLBj/rGeAEDL/Y="; + rev = "3f4ed9b6c2598ab8304186486a05ae7a328b8d49"; + sha256 = "tQuWBFSUESKa5Tt/GEy7EJCSaKdBtBzG0wSCbsWi6DI="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/kyazdani42/nvim-tree.lua"; }; @@ -483,6 +532,7 @@ repo = "indent-blankline.nvim"; rev = "2e35f7dcdc72f39b37c21e43cdb538d7a41c7e07"; sha256 = "ik7GDbctby+fzk+TX2A3NQNN7zq2smOxDcEeWsc88sE="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/lukas-reineke/indent-blankline.nvim"; }; @@ -494,6 +544,7 @@ repo = "virt-column.nvim"; rev = "8b7dd58fa913941537553ad6451071d00f959d10"; sha256 = "ZSgRDvWKDbthCfJ9bhavWifmhTnnXsk8ZXaVCtPrZSU="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/lukas-reineke/virt-column.nvim"; }; @@ -505,17 +556,19 @@ repo = "nvim-colorizer.lua"; rev = "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6"; sha256 = "6YrnItxExL2C8pNIdLd+hXCjsB2MbZANwWkah6dreD8="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/norcalli/nvim-colorizer.lua"; }; gitsigns-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "gitsigns.nvim"; - version = "1644331928"; + version = "1644765821"; src = pkgs.fetchFromGitHub { owner = "lewis6991"; repo = "gitsigns.nvim"; - rev = "e2b2730254df7648c79794555978f10fceb4b163"; - sha256 = "9CF3qOV+UBYU5X3iYdiiQYs1w/Lx6NuzvkgEB6+Dq84="; + rev = "420db8ddb909e0a5602146f101b059a6baa141bc"; + sha256 = "A5ZM8BvJK3b1IfJaZPNzkhb183XSWcakdV6hzuFbSHQ="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/lewis6991/gitsigns.nvim"; }; @@ -527,6 +580,7 @@ repo = "spellsitter.nvim"; rev = "db761f656f06ea07323b997b0af358a73ba7f74d"; sha256 = "k6W+T4Q+CK7VprWFsRYnvSmrA88E9yOdrBiQ4OPHl3g="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/lewis6991/spellsitter.nvim"; }; @@ -538,6 +592,7 @@ repo = "nvim-notify"; rev = "27f3176b950dc803b61c29bd007e140c232544e5"; sha256 = "uJlJLF/ujFo6qhq7xkSZj1dXClve6jWtNE20kNk+mqw="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/rcarriga/nvim-notify"; }; @@ -549,6 +604,7 @@ repo = "nvim-visual-eof.lua"; rev = "3c001c6cda4db5bf62ba33344e61e30230acd9eb"; sha256 = "azT2Cv3G5/HHsu/PkW/vW0CmrnZ/T7Q6x9Mlypr6pFY="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/LumaKernel/nvim-visual-eof.lua"; }; @@ -560,6 +616,7 @@ repo = "vim-illuminate"; rev = "db98338285574265a6ce54370b54d9f939e091bb"; sha256 = "QnrzzbWonGsnXCXhHmMLqf3LeDw67D6UtGcn9Ytu0MY="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/RRethy/vim-illuminate"; }; @@ -571,6 +628,7 @@ repo = "FTerm.nvim"; rev = "eabb65f23ba48ec9e8abb9a2514f99b77b3bc6f2"; sha256 = "xoah6q7GKXyt8UhwuhDL8MVpC0ln1e2L1J6gEhOkYS4="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/numToStr/FTerm.nvim"; }; @@ -582,6 +640,7 @@ repo = "todo-comments.nvim"; rev = "98b1ebf198836bdc226c0562b9f906584e6c400e"; sha256 = "8uj5TxO9XZlSCB4lVRbKRc1IlUEKcBf/4bDviwuxEgs="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/folke/todo-comments.nvim"; }; @@ -592,7 +651,8 @@ owner = "editorconfig"; repo = "editorconfig-vim"; rev = "a8e3e66deefb6122f476c27cee505aaae93f7109"; - sha256 = "qFLXqhV+ZVhxoq+QoxWSDUrg8W/+qChJuCd4hSJqy28="; + sha256 = "dtIAIOLskw5rsEuI23aUVTl+JJy59+O820SZO2K0ZqY="; + fetchSubmodules = true; }; meta.homepage = "https://github.com/editorconfig/editorconfig-vim"; }; diff --git a/programs/nvim/plugins.txt b/programs/nvim/plugins.txt deleted file mode 100644 index c577390..0000000 --- a/programs/nvim/plugins.txt +++ /dev/null @@ -1,54 +0,0 @@ -lewis6991/impatient.nvim -antoinemadec/FixCursorHold.nvim -delphinus/vim-auto-cursorline -folke/which-key.nvim -svermeulen/vim-yoink -svermeulen/vim-cutlass -svermeulen/vim-subversive -Mofiqul/dracula.nvim -nvim-treesitter/nvim-treesitter -nvim-treesitter/playground -martinda/Jenkinsfile-vim-syntax -nvim-lua/popup.nvim -nvim-lua/plenary.nvim -nvim-telescope/telescope.nvim -nvim-telescope/telescope-fzf-native.nvim//make -ahmedkhalf/project.nvim -neovim/nvim-lspconfig -jose-elias-alvarez/null-ls.nvim -kyazdani42/nvim-web-devicons -folke/trouble.nvim -onsails/lspkind-nvim -nvim-lua/lsp-status.nvim -hrsh7th/nvim-cmp -hrsh7th/cmp-nvim-lsp -hrsh7th/cmp-nvim-lsp-signature-help -L3MON4D3/LuaSnip -saadparwaiz1/cmp_luasnip -hrsh7th/cmp-nvim-lua -hrsh7th/cmp-path -hrsh7th/cmp-buffer -ray-x/cmp-treesitter -hrsh7th/cmp-cmdline -hrsh7th/cmp-nvim-lsp-document-symbol -windwp/nvim-autopairs -windwp/nvim-ts-autotag -numToStr/Comment.nvim -nvim-treesitter/nvim-treesitter-textobjects -blackCauldron7/surround.nvim -andymass/vim-matchup -mbbill/undotree -nvim-lualine/lualine.nvim -akinsho/bufferline.nvim -kyazdani42/nvim-tree.lua -lukas-reineke/indent-blankline.nvim -lukas-reineke/virt-column.nvim -norcalli/nvim-colorizer.lua -lewis6991/gitsigns.nvim -lewis6991/spellsitter.nvim -rcarriga/nvim-notify -LumaKernel/nvim-visual-eof.lua -RRethy/vim-illuminate -numToStr/FTerm.nvim -folke/todo-comments.nvim -editorconfig/editorconfig-vim diff --git a/programs/nvim/update-plugins.sh b/programs/nvim/update-plugins.sh index 465b5cb..3d353e4 100755 --- a/programs/nvim/update-plugins.sh +++ b/programs/nvim/update-plugins.sh @@ -8,7 +8,7 @@ trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG trap 'code=$?; if [ "$code" -ne "0" ]; then echo "\"${last_command}\" command ended with exit code $code."; fi' EXIT script_dir="$(dirname "$(realpath "$0")")" -plugins="${script_dir}/plugins.txt" +plugins_json="${script_dir}/plugins.json" nix_new_file="${script_dir}/plugins_new.nix" nix_file="${script_dir}/plugins.nix" @@ -19,25 +19,27 @@ if [ -z "$github_auth" ]; then exit 1 fi +readarray -t plugin_array <<<"$(jq -c '.[]' "$plugins_json")" + rm -f "$nix_new_file" echo '# This file has been auto-generated' >"$nix_new_file" echo '{ pkgs, ... }:' >>"$nix_new_file" echo "{" >>"$nix_new_file" -while IFS='' read -r LINE || [ -n "${LINE}" ]; do - owner="$(echo "$LINE" | cut -d'/' -f1)" - repo="$(echo "$LINE" | cut -d'/' -f2)" +for plugin in "${plugin_array[@]}"; do + raw_src="$(echo "$plugin" | jq -r '.src')" + owner="$(echo "$raw_src" | cut -d'/' -f1)" + repo="$(echo "$raw_src" | cut -d'/' -f2)" echo "Updating ${owner}/${repo} ..." - branch="$(echo "$LINE" | cut -d'/' -f3)" - build="$(echo "$LINE" | cut -d'/' -f4)" + branch="$(echo "$plugin" | jq -r '.branch // empty')" name="$(echo "$repo" | tr [.] '-')" if [ -z "$branch" ]; then - src="$(nix-prefetch-github --nix --no-fetch-submodules "$owner" "$repo" 2>/dev/null | tail -n +4)" + src="$(nix-prefetch-github --nix --fetch-submodules "$owner" "$repo" 2>/dev/null | tail -n +4)" else - src="$(nix-prefetch-github --nix --no-fetch-submodules --rev "$branch" "$owner" "$repo" 2>/dev/null | tail -n +4)" + src="$(nix-prefetch-github --nix --fetch-submodules --rev "$branch" "$owner" "$repo" 2>/dev/null | tail -n +4)" fi rev="$(echo "$src" | grep rev | cut -d '"' -f 2)" @@ -55,13 +57,21 @@ while IFS='' read -r LINE || [ -n "${LINE}" ]; do echo "version = \"${version}\";" >>"$nix_new_file" echo "src = ${src};" >>"$nix_new_file" - if [ -n "$build" ]; then - echo "buildPhase = \"${build}\";" >>"$nix_new_file" + build_inputs="$(echo "$plugin" | jq -r '.nativeBuildInputs // empty' | jq -r @sh)" + if [ -n "$build_inputs" ]; then + echo -n "nativeBuildInputs = with pkgs; [" >>"$nix_new_file" + echo -n "$build_inputs" | tr -d "'" >>"$nix_new_file" + echo '];' >>"$nix_new_file" + fi + + build_phase="$(echo "$plugin" | jq -r '.buildPhase // empty')" + if [ -n "$build_phase" ]; then + printf "buildPhase = ''\n%s\n'';\n" "$build_phase" >>"$nix_new_file" fi echo "meta.homepage = \"https://github.com/${owner}/${repo}\";" >>"$nix_new_file" echo '};' >>"$nix_new_file" -done <"$plugins" +done echo "}" >>"$nix_new_file" nixpkgs-fmt "$nix_new_file"