From 4e1c3123a01ef252e02503990814c622732a88e1 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 21 Dec 2023 12:09:03 +0000 Subject: [PATCH] Switch back to 23.05 Issues with Neovim, Harpoon and/or Telescope. --- config/neovim/after/plugin/harpoon.lua | 22 +++++++--------------- flake.lock | 22 +++++++++++----------- flake.nix | 4 ++-- system/nixos/configuration.nix | 3 ++- system/nixos/home-manager/default.nix | 1 + system/shared/home-manager-packages.nix | 3 ++- system/shared/home-manager.nix | 13 ++++--------- system/shared/modules/neovim.nix | 4 ++-- system/wsl2/default.nix | 1 + 9 files changed, 32 insertions(+), 41 deletions(-) diff --git a/config/neovim/after/plugin/harpoon.lua b/config/neovim/after/plugin/harpoon.lua index 4705cf3..8d2c7d9 100644 --- a/config/neovim/after/plugin/harpoon.lua +++ b/config/neovim/after/plugin/harpoon.lua @@ -1,26 +1,18 @@ -local harpoon = require "harpoon" +require("harpoon").setup() + local nmap = require("opdavies.keymap").nmap -harpoon:setup() +nmap { "", require("harpoon.ui").toggle_quick_menu } +nmap { "", require("harpoon.mark").add_file } -nmap { - "hl", - function() - harpoon.ui:toggle_quick_menu(harpoon:list()) - end, -} -nmap { - "hm", - function() - harpoon:list():append() - end, -} +nmap { "hl", require("harpoon.ui").toggle_quick_menu } +nmap { "hm", require("harpoon.mark").add_file } for i = 1, 5 do nmap { string.format("%s", i), function() - harpoon:list():select(i) + require("harpoon.ui").nav_file(i) end, } end diff --git a/flake.lock b/flake.lock index 9ce97d6..c7209b7 100644 --- a/flake.lock +++ b/flake.lock @@ -24,32 +24,32 @@ ] }, "locked": { - "lastModified": 1702195709, - "narHash": "sha256-+zRjWkm5rKqQ57PuLZ3JF3xi3vPMiOJzItb1m/43Cq4=", + "lastModified": 1702195668, + "narHash": "sha256-Lxmjez0nfNBptdqV5GsXKm7Bb7swjGsrxiLxWJu0tL8=", "owner": "nix-community", "repo": "home-manager", - "rev": "6761b8188b860f374b457eddfdb05c82eef9752f", + "rev": "33110fb3c7fe6a94b98b641866a5eddb64b7c23f", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-23.11", + "ref": "release-23.05", "repo": "home-manager", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1702233072, - "narHash": "sha256-H5G2wgbim2Ku6G6w+NSaQaauv6B6DlPhY9fMvArKqRo=", + "lastModified": 1703034876, + "narHash": "sha256-4bMPFv/bs5g1nEsXQwXlrAGJgjv1Ilr0ejdaTkBwQLs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "781e2a9797ecf0f146e81425c822dca69fe4a348", + "rev": "312ab59e8ade69e6083017bd9b98a2919f1fb86a", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-23.11", + "ref": "nixos-23.05", "repo": "nixpkgs", "type": "github" } @@ -74,11 +74,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1702151865, - "narHash": "sha256-9VAt19t6yQa7pHZLDbil/QctAgVsA66DLnzdRGqDisg=", + "lastModified": 1703255338, + "narHash": "sha256-Z6wfYJQKmDN9xciTwU3cOiOk+NElxdZwy/FiHctCzjU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "666fc80e7b2afb570462423cb0e1cf1a3a34fedd", + "rev": "6df37dc6a77654682fe9f071c62b4242b5342e04", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 28de1ae..fd96cc3 100644 --- a/flake.nix +++ b/flake.nix @@ -1,9 +1,9 @@ { inputs = { home-manager.inputs.nixpkgs.follows = "nixpkgs"; - home-manager.url = "github:nix-community/home-manager/release-23.11"; + home-manager.url = "github:nix-community/home-manager/release-23.05"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; }; outputs = inputs@{ flake-parts, self, ... }: diff --git a/system/nixos/configuration.nix b/system/nixos/configuration.nix index e1f3380..0fabc77 100644 --- a/system/nixos/configuration.nix +++ b/system/nixos/configuration.nix @@ -179,7 +179,8 @@ in monospace = [ "JetBrainsMono Nerd Font Mono" ]; }; }; - packages = with pkgsUnstable; [ + + fonts = with pkgsUnstable; [ (nerdfonts.override { fonts = [ "AnonymousPro" diff --git a/system/nixos/home-manager/default.nix b/system/nixos/home-manager/default.nix index cc37559..f9087df 100644 --- a/system/nixos/home-manager/default.nix +++ b/system/nixos/home-manager/default.nix @@ -35,5 +35,6 @@ in LC_CTYPE = "en_GB.UTF-8"; PATH = "$PATH:./vendor/bin:./node_modules/.bin"; PULUMI_SKIP_UPDATE_CHECK = "true"; + RIPGREP_CONFIG_PATH = "$HOME/.config/ripgrep/config"; }; } diff --git a/system/shared/home-manager-packages.nix b/system/shared/home-manager-packages.nix index a051d2f..c33404d 100644 --- a/system/shared/home-manager-packages.nix +++ b/system/shared/home-manager-packages.nix @@ -9,7 +9,6 @@ with pkgs; [ delta dog doppler - eza fd file fzf @@ -25,8 +24,10 @@ with pkgs; [ lua mysql neofetch + pkgsUnstable.eza pkgsUnstable.rustywind pv + ripgrep tldr tree tree-sitter diff --git a/system/shared/home-manager.nix b/system/shared/home-manager.nix index 7a658d3..b66bad6 100644 --- a/system/shared/home-manager.nix +++ b/system/shared/home-manager.nix @@ -32,15 +32,10 @@ home.sessionPath = [ "$HOME/.config/bin" ]; - programs.ripgrep = { - enable = true; - - arguments = [ - "--follow" - "--hidden" - "--smart-case" - ]; - }; + xdg.configFile."ripgrep/config".text = '' + --follow + --smart-case + ''; xdg.configFile.bin = { source = ../../bin; diff --git a/system/shared/modules/neovim.nix b/system/shared/modules/neovim.nix index 5a4fd2a..dddb2ad 100644 --- a/system/shared/modules/neovim.nix +++ b/system/shared/modules/neovim.nix @@ -86,8 +86,8 @@ in ''; } - pkgsUnstable.vimPlugins.harpoon - pkgsUnstable.vimPlugins.refactoring-nvim + vimPlugins.harpoon + vimPlugins.refactoring-nvim vimPlugins.comment-nvim vimPlugins.dial-nvim vimPlugins.gitsigns-nvim diff --git a/system/wsl2/default.nix b/system/wsl2/default.nix index e4d569b..919a80b 100644 --- a/system/wsl2/default.nix +++ b/system/wsl2/default.nix @@ -18,6 +18,7 @@ inputs.home-manager.lib.homeManagerConfiguration { EXA_COLORS = "uu=38;5;255:gu=38;5;255:ur=38;5;255:uw=38;5;255:ue=38;5;255:wx=38;5;255:gr=38;5;250:gw=38;5;250:gx=38;5;250:tr=38;5;255:tw=38;5;255:tx=38;5;255:da=38;5;250:sn=32:sb=0:di=38;5;105"; PATH = "$PATH:./vendor/bin:./node_modules/.bin"; PULUMI_SKIP_UPDATE_CHECK = "true"; + RIPGREP_CONFIG_PATH = "$HOME/.config/ripgrep/config"; }; } ];