From 9cabc6594684f62be7bd0c8431139109d5a013d3 Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Thu, 7 Mar 2024 23:35:31 +0000 Subject: [PATCH] nvim: deal with nixvim changes --- flake.lock | 36 ++++++++++++++++++------------------ sets/nvim.nix | 36 +++++++++++++++++------------------- 2 files changed, 35 insertions(+), 37 deletions(-) diff --git a/flake.lock b/flake.lock index d9e24ca..7f4534c 100644 --- a/flake.lock +++ b/flake.lock @@ -153,11 +153,11 @@ ] }, "locked": { - "lastModified": 1706830856, - "narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=", + "lastModified": 1709336216, + "narHash": "sha256-Dt/wOWeW6Sqm11Yh+2+t0dfEWxoMxGBvv3JpIocFl9E=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f", + "rev": "f7b3c975cf067e56e7cda6cb098ebe3fb4d74ca2", "type": "github" }, "original": { @@ -279,11 +279,11 @@ ] }, "locked": { - "lastModified": 1709578243, - "narHash": "sha256-hF96D+c2PBmAFhymMw3z8hou++lqKtZ7IzpFbYeL1/Y=", + "lastModified": 1709764752, + "narHash": "sha256-+lM4J4JoJeiN8V+3WSWndPHj1pJ9Jc1UMikGbXLqCTk=", "owner": "nix-community", "repo": "home-manager", - "rev": "23ff9821bcaec12981e32049e8687f25f11e5ef3", + "rev": "cf111d1a849ddfc38e9155be029519b0e2329615", "type": "github" }, "original": { @@ -300,11 +300,11 @@ ] }, "locked": { - "lastModified": 1709629079, - "narHash": "sha256-Q8R63JR7lv285MjWnHoNep1bLOG3fxScGAF4IZSVO+M=", + "lastModified": 1709744297, + "narHash": "sha256-Q2LOs08hmFlzJdJMN4yNrWvZTegfpHEajLin0vcw7t0=", "owner": "jovian-experiments", "repo": "jovian-nixos", - "rev": "159d19febe910d27062ede99e748c31196b5c07c", + "rev": "f8e3302ee1e0ccaabc443f45dc415e117b54926f", "type": "github" }, "original": { @@ -349,11 +349,11 @@ ] }, "locked": { - "lastModified": 1709435391, - "narHash": "sha256-s4itTkIVxn5lYeTzwkbAgl99atnjdZv1idI1118vdzA=", + "lastModified": 1709708644, + "narHash": "sha256-XAFOkZ6yexsqeJrCXWoHxopq0i+7ZqbwATXomMnGmr4=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "93554c04c2f1c02f4a383538e8848d511c3129e9", + "rev": "94a1e46434736a40f976a454f8bd3ea2144f349b", "type": "github" }, "original": { @@ -379,11 +379,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1709479366, - "narHash": "sha256-n6F0n8UV6lnTZbYPl1A9q1BS0p4hduAv1mGAP17CVd0=", + "lastModified": 1709703039, + "narHash": "sha256-6hqgQ8OK6gsMu1VtcGKBxKQInRLHtzulDo9Z5jxHEFY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b8697e57f10292a6165a20f03d2f42920dfaf973", + "rev": "9df3e30ce24fd28c7b3e2de0d986769db5d6225d", "type": "github" }, "original": { @@ -424,11 +424,11 @@ "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1709549216, - "narHash": "sha256-9KX2QB7qo9mISo936dDyiwDTES30y4OvDtM9zpAJLHI=", + "lastModified": 1709837370, + "narHash": "sha256-TlJ9iOw4HQmGIzycmwNT2OHOTUMkO5zHHKxnzMWa1tY=", "owner": "nix-community", "repo": "nixvim", - "rev": "680889ac01df8c2bfcb7a6ac7c850153d13d7b8f", + "rev": "45dec97e806ecee29856cb714e5c4979b143ef94", "type": "github" }, "original": { diff --git a/sets/nvim.nix b/sets/nvim.nix index 5352ee0..d616bce 100644 --- a/sets/nvim.nix +++ b/sets/nvim.nix @@ -134,26 +134,24 @@ lib.setAttrByPath setPath ( cmp-cmdline.enable = true; cmp-git.enable = true; cmp-buffer.enable = true; - nvim-cmp = { + cmp = { enable = true; - snippet.expand = "luasnip"; - sources = [ - { name = "luasnip"; } - { name = "nvim_lsp"; } - { name = "path"; } - { name = "calc"; } - { name = "emoji"; } - ]; - mappingPresets = [ - "insert" - "cmdline" - ]; - mapping = { - "" = "cmp.mapping.confirm({ select = true })"; - "" = "cmp.mapping.scroll_docs(-4)"; - "" = "cmp.mapping.scroll_docs(4)"; - "" = "cmp.mapping.complete()"; - "" = "cmp.mapping.abort()"; + settings = { + snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end"; + sources = [ + { name = "luasnip"; } + { name = "nvim_lsp"; } + { name = "path"; } + { name = "calc"; } + { name = "emoji"; } + ]; + mapping = { + "" = "cmp.mapping.confirm({ select = true })"; + "" = "cmp.mapping.scroll_docs(-4)"; + "" = "cmp.mapping.scroll_docs(4)"; + "" = "cmp.mapping.complete()"; + "" = "cmp.mapping.abort()"; + }; }; }; };