From b3049d49585b0371d49a1be3331a168e6b28deaf Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Thu, 23 Nov 2023 21:33:18 +0100 Subject: [PATCH] Update deps; TabNine --- flake.lock | 32 +++++++++++++++---------------- home/config/nvim/nifoc/theme.fnl | 6 ++++-- home/config/nvim/plugins/cmp.fnl | 17 +++++++++++----- home/config/nvim/plugins/mini.fnl | 4 +--- home/programs/nvim/default.nix | 1 + home/programs/nvim/plugins.nix | 30 ++++++++++++++--------------- 6 files changed, 49 insertions(+), 41 deletions(-) diff --git a/flake.lock b/flake.lock index af9c4ed..796f36d 100644 --- a/flake.lock +++ b/flake.lock @@ -244,11 +244,11 @@ ] }, "locked": { - "lastModified": 1700553346, - "narHash": "sha256-kW7uWsCv/lxuA824Ng6EYD9hlVYRyjuFn0xBbYltAeQ=", + "lastModified": 1700695018, + "narHash": "sha256-MAiPLgBF4GLzSOlhnPCDWkWW5CDx4i7ApIYaR+TwTVg=", "owner": "nix-community", "repo": "home-manager", - "rev": "1aabb0a31b25ad83cfaa37c3fe29053417cd9a0f", + "rev": "134deb46abd5d0889d913b8509413f6f38b0811e", "type": "github" }, "original": { @@ -287,11 +287,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1700585179, - "narHash": "sha256-aiPGciNwiqsO1BdRrKPDx+EoyZ/m3Qa2ND7XhRAHdH8=", + "lastModified": 1700751952, + "narHash": "sha256-BliTb/KMnXmnMDaOI5g2iDOxjyf+gGQbuTbu2h2QC5Q=", "owner": "neovim", "repo": "neovim", - "rev": "7e97c773e3ba78fcddbb2a0b9b0d572c8210c83e", + "rev": "b514edcdf4747b2ebf00a97f89f310d6d4f090f5", "type": "github" }, "original": { @@ -312,11 +312,11 @@ ] }, "locked": { - "lastModified": 1700600149, - "narHash": "sha256-282a5d5O95R1K6uNRZtC3bPv/bcMoxV8n0lewwbOoUE=", + "lastModified": 1700754329, + "narHash": "sha256-3/Q+TULTG7OSYSicLqEiWGaNeyORpjT99VnpISYQTfc=", "ref": "refs/heads/master", - "rev": "0ca2d5027fc456daa5a3eb10f19ac4a440029a17", - "revCount": 592, + "rev": "22088d188af6e6bad330eb817e1e78a789e5f407", + "revCount": 595, "type": "git", "url": "https://git.kempkens.io/daniel/nix-overlay" }, @@ -332,11 +332,11 @@ ] }, "locked": { - "lastModified": 1699867978, - "narHash": "sha256-+arl45HUOcBdKiRGrKXZYXDyBQ6MQGkYPZa/28f6Yzo=", + "lastModified": 1700732776, + "narHash": "sha256-Q4hhnBVg4EVaqCQb9R84oGJNDqLg0KK9FY2LbCL0oV8=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "e67f2bf515343da378c3f82f098df8ca01bccc5f", + "rev": "c465a67a54aa34cf2883536c97d4e856fa4a373d", "type": "github" }, "original": { @@ -363,11 +363,11 @@ }, "nixos-unstable": { "locked": { - "lastModified": 1700553648, - "narHash": "sha256-UhENpRvTgaLlfqcRNeLB0FOEhxHRvVOhRi/f9g8F3UI=", + "lastModified": 1700641131, + "narHash": "sha256-M3bsoVMQM2PcuBWb6n1KDNeMX87svcSj/4qlBcVqs3k=", "owner": "nixos", "repo": "nixpkgs", - "rev": "37e6adc926fc74e270e86a544a41aecabb0effb1", + "rev": "da41de71f62bf7fb989a04e39629b8adbf8aa8b5", "type": "github" }, "original": { diff --git a/home/config/nvim/nifoc/theme.fnl b/home/config/nvim/nifoc/theme.fnl index 4fb08a3..5fc7a2a 100644 --- a/home/config/nvim/nifoc/theme.fnl +++ b/home/config/nvim/nifoc/theme.fnl @@ -62,7 +62,6 @@ :CmpItemKindModule :CmpItemKindOperator :CmpItemKindVariable - :CmpItemKindFile :CmpItemKindUnit :CmpItemKindSnippet :CmpItemKindFolder @@ -73,6 +72,9 @@ :CmpItemKindColor :CmpItemKindTypeParameter]] (each [_ group (pairs cmp-groups)] - (swap-bg-with-fg mod.colors.black group)))) + (swap-bg-with-fg mod.colors.black group))) + (highlight :CmpItemKindFile {:fg mod.colors.white :bg mod.colors.black}) + (highlight :CmpItemKindTabNine + {:fg mod.colors.black :bg mod.colors.bright_magenta})) mod) diff --git a/home/config/nvim/plugins/cmp.fnl b/home/config/nvim/plugins/cmp.fnl index 5dd1ff6..1bc62ed 100644 --- a/home/config/nvim/plugins/cmp.fnl +++ b/home/config/nvim/plugins/cmp.fnl @@ -23,6 +23,7 @@ (cmp.setup {:sources (cmp.config.sources [{:name :nvim_lsp} {:name :luasnip} + {:name :cmp_tabnine} {:name :treesitter :keyword_length 3} {:name :buffer :keyword_length 3} @@ -59,11 +60,17 @@ kind (kind-fn entry vim-item) strings (vim.split kind.kind "%s" {:trimempty true})] - (set kind.kind - (.. " " (or (. strings 1) "") " ")) - (set kind.menu - (.. " (" (or (. strings 2) "") - ")")) + (if (= entry.source.name :cmp_tabnine) + (do + (set kind.kind " 󱜚 ") + (set kind.menu " (TabNine)")) + (do + (set kind.kind + (.. " " (or (. strings 1) "") + " ")) + (set kind.menu + (.. " (" + (or (. strings 2) "") ")")))) kind))}}) (cmp.setup.cmdline "/" {:sources (cmp.config.sources [{:name :nvim_lsp_document_symbol}] diff --git a/home/config/nvim/plugins/mini.fnl b/home/config/nvim/plugins/mini.fnl index 8ad9d6a..5b073e9 100644 --- a/home/config/nvim/plugins/mini.fnl +++ b/home/config/nvim/plugins/mini.fnl @@ -5,9 +5,7 @@ ;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-clue.md (miniclue.setup {:triggers [; Leader {:mode :n :keys :} - {:mode :x :keys :} - ; Built-in - {:mode :i :keys :}] + {:mode :x :keys :}] :clues [(miniclue.gen_clues.builtin_completion)]}) ;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-hipatterns.md (hipatterns.setup {:highlighters {:fixme {:pattern "%f[%w]()FIXME()%f[%W]" diff --git a/home/programs/nvim/default.nix b/home/programs/nvim/default.nix index 331cfa3..3cdeb3d 100644 --- a/home/programs/nvim/default.nix +++ b/home/programs/nvim/default.nix @@ -237,6 +237,7 @@ in cmp-buffer cmp-cmdline cmp-nvim-lsp-document-symbol + pkgs.vimPlugins.cmp-tabnine # Formatting diff --git a/home/programs/nvim/plugins.nix b/home/programs/nvim/plugins.nix index dbbc456..a624202 100644 --- a/home/programs/nvim/plugins.nix +++ b/home/programs/nvim/plugins.nix @@ -62,12 +62,12 @@ in }; yanky-nvim = buildVimPlugin { pname = "yanky.nvim"; - version = "2023-11-03"; + version = "2023-11-23"; src = fetchFromGitHub { owner = "gbprod"; repo = "yanky.nvim"; - rev = "9268018e92d02650a94e39dd5f5903c542f7ea11"; - sha256 = "07blik6lsj1qdk5y3afjc80a0rbjjxq68q3fkvkayn5zs41i76y2"; + rev = "631b44d4129b04f9b3e87e4a29627504d350eba4"; + sha256 = "0p5bj24zlsgn8fkxqfjh9hkzhhdw5cf1gjkzqm4sg6qhbxz1a2n6"; fetchSubmodules = false; }; }; @@ -106,12 +106,12 @@ in }; nvim-treesitter = buildVimPlugin { pname = "nvim-treesitter"; - version = "2023-11-21"; + version = "2023-11-23"; src = fetchFromGitHub { owner = "nvim-treesitter"; repo = "nvim-treesitter"; - rev = "7da3cb6323d1e1fbfc4d7dc05cac74946458b8a0"; - sha256 = "1bmr1j6s5r8ig3s2i2qgnr5if8vrqbmf34qk2g74mvqnl38gadyl"; + rev = "71bdf97bf6dafc776ad957169533f2f669a8c562"; + sha256 = "0y8scsr8xy02cnwjr0fddn62f2fv74qash6aspnfdfp3b400v2qm"; fetchSubmodules = false; }; }; @@ -128,12 +128,12 @@ in }; rainbow-delimiters-nvim = buildVimPlugin { pname = "rainbow-delimiters.nvim"; - version = "2023-11-19"; + version = "2023-11-22"; src = fetchFromGitHub { owner = "HiPhish"; repo = "rainbow-delimiters.nvim"; - rev = "c6dce365e647162ae0031c1f814053beaf3dd843"; - sha256 = "07px1wk23p0sxvh7sv7gki0pp0mv0618kfgl7c6s5ylrpw6a11wq"; + rev = "7f3cfa07f243261a0428d782bef6496929e9dcd8"; + sha256 = "18dmkf04315rna28pzxps8idph4a33w6nypdazwm0g2h0dvlhv2l"; fetchSubmodules = false; }; }; @@ -208,12 +208,12 @@ in }; nvim-lspconfig = buildVimPlugin { pname = "nvim-lspconfig"; - version = "2023-11-21"; + version = "2023-11-22"; src = fetchFromGitHub { owner = "neovim"; repo = "nvim-lspconfig"; - rev = "addad5176dbbe8bcc82ef91c51c5f1bf6629ec2d"; - sha256 = "166fwrhrfqr21sy1w25x2pdrk5q5g1bcnsm98j9gsd7wnabqizqg"; + rev = "553c4e0e667167640c5398573f6f3a488ff8047a"; + sha256 = "0jm03jrsy1yj293hyimakhxcsak45f55zjc1ch1smy0h0qgr23fm"; fetchSubmodules = false; }; }; @@ -472,12 +472,12 @@ in }; gitsigns-nvim = buildVimPlugin { pname = "gitsigns.nvim"; - version = "2023-11-17"; + version = "2023-11-23"; src = fetchFromGitHub { owner = "lewis6991"; repo = "gitsigns.nvim"; - rev = "0ccd5fb2316b3f8d8b2f775bc31cae7bc6a77a55"; - sha256 = "0xgw0p6wb33wlb4lnnjj1adxsll6lnmq3niabqzricsz4phmvf4f"; + rev = "5fc573f2d2a49aec74dd6dc977e8b137429d1897"; + sha256 = "0ijwyxw9w4idd1qczd1d8bs8454i83s6vxny39r9vn4ykhxm9v10"; fetchSubmodules = false; }; };