From fe62fa97315768f8a18d9a5586204aeaf5c1adf0 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Tue, 19 Jul 2022 23:30:12 +0200 Subject: [PATCH] nvim: Switch to nvim-surround --- config/nvim/plugins/surround.fnl | 3 ++ flake.lock | 30 ++++++------- programs/nvim/default.nix | 9 ++-- programs/nvim/plugins.nix | 77 ++++++++++++++++++-------------- programs/nvim/plugins.yaml | 1 + 5 files changed, 69 insertions(+), 51 deletions(-) create mode 100644 config/nvim/plugins/surround.fnl diff --git a/config/nvim/plugins/surround.fnl b/config/nvim/plugins/surround.fnl new file mode 100644 index 0000000..e677d8d --- /dev/null +++ b/config/nvim/plugins/surround.fnl @@ -0,0 +1,3 @@ +(let [surround (require :nvim-surround)] + (surround.setup {})) + diff --git a/flake.lock b/flake.lock index 1fd5abe..fbbabc9 100644 --- a/flake.lock +++ b/flake.lock @@ -74,11 +74,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1657719085, - "narHash": "sha256-nQt3MEBwKuKlmFKSRhdoh60AGlc+YlspV5e8kO/3y8U=", + "lastModified": 1658151168, + "narHash": "sha256-0uHoOHr20pJTOGzgS4kNgOP4wfrch0fc+9vZ/6LgD44=", "owner": "nix-community", "repo": "home-manager", - "rev": "2c94b9801f1a11cde0fc97aa850687bb9137d42c", + "rev": "4a724cb84cc3aa464af1713d11bf0cfbbdb56c00", "type": "github" }, "original": { @@ -97,11 +97,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1657854862, - "narHash": "sha256-Fcrerxg3Q78ydeB8XhKiOclHMBGR9z3aTF6mzYLYE7M=", + "lastModified": 1658206822, + "narHash": "sha256-p84nJsuqgWmjrdJ/KEU72JkHI7SXmy1nBjJr63vlVrU=", "owner": "neovim", "repo": "neovim", - "rev": "9777907467b29e890556db287b6a9995c0024896", + "rev": "7b835ba79672bfc9e802ffb650a05aa4b67b1272", "type": "github" }, "original": { @@ -120,11 +120,11 @@ ] }, "locked": { - "lastModified": 1657873048, - "narHash": "sha256-+Kc4Lch8SSWwB8FVY6QCfLjOSaZlsxRMXqeRCK1V+1c=", + "lastModified": 1658218596, + "narHash": "sha256-yl1Q3laxqvj5LFwju+YRDswgjukpDI8c70dabs4karU=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "38f85bb651bf5e61444a7144896e8541ce65a5fc", + "rev": "49bcab391fb6cc1a29a17cb924fc6ef52f33f3a5", "type": "github" }, "original": { @@ -155,11 +155,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1657849727, - "narHash": "sha256-68J4eSwzr98r7VCzgrX/WWaQzkY7gdKqH2uSyQheYj0=", + "lastModified": 1658240757, + "narHash": "sha256-dG4NfEQkllCmRHmZScd+5NA+ncuWNO9KdeWltl9zFjA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "0b683abff06fe55755ea992ba47f2e787081a30f", + "rev": "d57f20b903c801b9325aea6279a4d61d19368fb0", "type": "github" }, "original": { @@ -202,11 +202,11 @@ ] }, "locked": { - "lastModified": 1657846482, - "narHash": "sha256-RoPu/W3GCkA+67aDQhlhlMXLGPRKqXBm7dxT7ywN6Ec=", + "lastModified": 1658105291, + "narHash": "sha256-3EXG2r5/h/iyzytRqI+tWTP11f1PdaJJ8Hl5QRe95OE=", "owner": "arqv", "repo": "zig-overlay", - "rev": "68fb9b645e627316fc13d9db68c9628386551dc1", + "rev": "bfd640ef3c9bf8b4cd300af9f79a7ba950823ef5", "type": "github" }, "original": { diff --git a/programs/nvim/default.nix b/programs/nvim/default.nix index b01a6f7..23dca33 100644 --- a/programs/nvim/default.nix +++ b/programs/nvim/default.nix @@ -212,6 +212,12 @@ in # Textobjects nvim-treesitter-textobjects + { + plugin = nvim-surround; + config = builtins.readFile ../../config/nvim/plugins/surround.fnl; + type = "fennel"; + } + # UI { plugin = heirline-nvim; @@ -331,9 +337,6 @@ in type = "fennel"; } - # Textobjects - vim-surround - # UI undotree ]); diff --git a/programs/nvim/plugins.nix b/programs/nvim/plugins.nix index ca6dc23..e12f702 100644 --- a/programs/nvim/plugins.nix +++ b/programs/nvim/plugins.nix @@ -47,12 +47,12 @@ }; yanky-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "yanky.nvim"; - version = "2022-07-11"; + version = "2022-07-19"; src = pkgs.fetchFromGitHub { owner = "gbprod"; repo = "yanky.nvim"; - rev = "3eb4134c11af85efd41f4012ef63fab1747d3bd8"; - sha256 = "1rj0rd1gpa9fk9yawmysdsyf5w23nwn3k18myc291aafrm41jz0a"; + rev = "b9bebb5cb2685274f6ad7b07e376aba20ae8a309"; + sha256 = "1kbm0kjflr5pzpz5chp673w81sw793cg996qizs1k9ix57sxwz4j"; fetchSubmodules = false; }; }; @@ -80,12 +80,12 @@ }; leap-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "leap.nvim"; - version = "2022-07-13"; + version = "2022-07-19"; src = pkgs.fetchFromGitHub { owner = "ggandor"; repo = "leap.nvim"; - rev = "1d1032feefb53d407c59ea37d80374d77f6f9f3b"; - sha256 = "05m0pbqrdqfhylsa01x77wrh8n14wjv27vckmw6cm154ykxijgxc"; + rev = "c0ff5d85d11d7f68d23816b99a0121a43c0338bb"; + sha256 = "1qxqdgbgiwp5rdxyxsxgiklh30cc3xaklv9fwc5i4rq77d1wgsda"; fetchSubmodules = false; }; }; @@ -124,12 +124,12 @@ }; telescope-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "telescope.nvim"; - version = "2022-07-12"; + version = "2022-07-19"; src = pkgs.fetchFromGitHub { owner = "nvim-telescope"; repo = "telescope.nvim"; - rev = "b79cd6c88b3d96b0f49cb7d240807cd59b610cd8"; - sha256 = "0dwpnigm3qybcif53zcqk1ihw34bwln09xri02c7gnxyhabp85vi"; + rev = "8c563017200bebd76153feb1046ecdf2db26c9d4"; + sha256 = "1i4f7ibqii35g9kkx0mp470cwlrvlzmv95df9i8rf8sly93k5755"; fetchSubmodules = false; }; }; @@ -197,12 +197,12 @@ }; nvim-lspconfig = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "nvim-lspconfig"; - version = "2022-07-14"; + version = "2022-07-17"; src = pkgs.fetchFromGitHub { owner = "neovim"; repo = "nvim-lspconfig"; - rev = "0da8c129dc27e70770c3247c44988bbf0af6b1af"; - sha256 = "0hy6adq7ci7gxisk316vw7p57p93rcia4xg3xf92wwi2z6hjcqyq"; + rev = "347947355ba0a15d803cbd61b18f8bb8f401c793"; + sha256 = "0rx9jlp865sv0aamlfxwm5aaa4xa36fz9i2ydq8j5dpzi8y9pjhn"; fetchSubmodules = false; }; }; @@ -230,45 +230,45 @@ }; nvim-lint = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "nvim-lint"; - version = "2022-07-13"; + version = "2022-07-16"; src = pkgs.fetchFromGitHub { owner = "mfussenegger"; repo = "nvim-lint"; - rev = "b5ef300ae6cc59e4a8d2af53964126c746c711dd"; - sha256 = "14nbf9p4bsq9a8xwlrz5ycvrxibzzmlldj6gq6y1g5ns9dkh4im1"; + rev = "e0ff4ed8661ace35813f0fdabce297f41280c69f"; + sha256 = "0i5pl2rsc9hsnz9b5z9mq3dgi17402c7xwfyng5m3alv8rhhsxqw"; fetchSubmodules = false; }; }; comment-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "comment.nvim"; - version = "2022-07-13"; + version = "2022-07-18"; src = pkgs.fetchFromGitHub { owner = "numtostr"; repo = "comment.nvim"; - rev = "7c49fb2ac01a9f03410100c8e78f647bbea857e8"; - sha256 = "10jw258m39myxkfmna5bwz0kijl3k3gxdjczwlhazhranc8sdmqf"; + rev = "2e0572cc35ecc117c0ab6dc0aa3132b109d61047"; + sha256 = "0pwjj5a9ghwkm2f6iqpqc27v4cnlsds4k9l67f2432fzwz24rl5g"; fetchSubmodules = false; }; }; LuaSnip = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "LuaSnip"; - version = "2022-07-15"; + version = "2022-07-19"; src = pkgs.fetchFromGitHub { owner = "L3MON4D3"; repo = "LuaSnip"; - rev = "8f71a7c9d6155413f85df4a2350f59d0abd46dfc"; - sha256 = "0k3m960psxp03z7aqhj2611499094nfrpf5b4b9jgwmz8is25fb7"; + rev = "be3083bbb8ebc21671bf7c91c27f043ebe0a8d8d"; + sha256 = "1jhp10bb3xmlpr3y2fwfiss1w9ll0a5cqycqwz0w9xk5mfixk0v3"; fetchSubmodules = false; }; }; friendly-snippets = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "friendly-snippets"; - version = "2022-07-11"; + version = "2022-07-19"; src = pkgs.fetchFromGitHub { owner = "rafamadriz"; repo = "friendly-snippets"; - rev = "0e516c9d9892d6bf268492136971d315dd704d16"; - sha256 = "1kdyqzcmzg62djyw4ggk81gwi6ka38a4nhjlafnk4r8mvfawmlyf"; + rev = "40c306be87059d27f82fc5d00c60e62e1fb48078"; + sha256 = "18v30b1hckxbdagf6xpk2s9f2ii29hdywgr8cay97rxki852bl59"; fetchSubmodules = false; }; }; @@ -417,12 +417,12 @@ }; vim-matchup = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "vim-matchup"; - version = "2022-07-13"; + version = "2022-07-16"; src = pkgs.fetchFromGitHub { owner = "andymass"; repo = "vim-matchup"; - rev = "33fc8b819f62e7415d51a22d011e52f2026a638e"; - sha256 = "0pz2nk3cw37bfpinmbij2411dzd1cq0f3684zg71ym8mvvc7mkik"; + rev = "3cebd218a7b85a75df3f4f7867adc79b8624a217"; + sha256 = "0n7hhiws3i0dckk8jmb9bb6qqm43h1l39v6f1m3z918lgjmlx5rw"; fetchSubmodules = false; }; }; @@ -437,6 +437,17 @@ fetchSubmodules = false; }; }; + nvim-surround = pkgs.vimUtils.buildVimPluginFrom2Nix { + pname = "nvim-surround"; + version = "2022-07-19"; + src = pkgs.fetchFromGitHub { + owner = "kylechui"; + repo = "nvim-surround"; + rev = "78f10536d30a4f86155354636335263a0e6a7891"; + sha256 = "047mn583yaipzjmyx25bnwyg6917a2p5qxm81xbcadbm066nfa4m"; + fetchSubmodules = false; + }; + }; heirline-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "heirline.nvim"; version = "2022-07-06"; @@ -483,12 +494,12 @@ }; toggleterm-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "toggleterm.nvim"; - version = "2022-07-12"; + version = "2022-07-19"; src = pkgs.fetchFromGitHub { owner = "akinsho"; repo = "toggleterm.nvim"; - rev = "8e6f938ed8eec7f988dc07aec2af148ad57c6d95"; - sha256 = "020h06h2a4b3c9wlp2xs2a143h4kbf2vzgfqacs5mrlf2ajwnrkz"; + rev = "9db6f98af4f700945cff0f4f34b92ec80ab67a2b"; + sha256 = "0dsk6h7dh067pzl5fvvgpwwis6k539sdylvj6xxbs3wvnj0lqhd6"; fetchSubmodules = false; }; }; @@ -516,12 +527,12 @@ }; neogit = pkgs.vimUtils.buildVimPluginFrom2Nix { pname = "neogit"; - version = "2022-07-13"; + version = "2022-07-17"; src = pkgs.fetchFromGitHub { owner = "TimUntersberger"; repo = "neogit"; - rev = "da1f59c705bcefb54920f724c52cdeca42df486b"; - sha256 = "10d7czscn51zzhixzv3a2w3rrjr4xd5gkwwczvwfc44cnjnfqcrd"; + rev = "73fc14502703f48930eabfc494d30476c6def0d6"; + sha256 = "1zimhyhi77dn7k1vy17n2qg11c2arnv6qvxq8wq86czprhhrppwi"; fetchSubmodules = false; }; }; diff --git a/programs/nvim/plugins.yaml b/programs/nvim/plugins.yaml index 962d381..a702416 100644 --- a/programs/nvim/plugins.yaml +++ b/programs/nvim/plugins.yaml @@ -74,6 +74,7 @@ # Textobjects - src: nvim-treesitter/nvim-treesitter-textobjects +- src: kylechui/nvim-surround # UI - src: rebelot/heirline.nvim