From 0be8d1aa555d7b39a80f39289834d6aeecf967c9 Mon Sep 17 00:00:00 2001 From: Uttarayan Mondal Date: Wed, 27 Mar 2024 09:56:41 +0530 Subject: [PATCH] fix(nvim): Pin rest.nvim to v1.0.0 Use pinentry-curses for macos --- common/home.nix | 2 +- common/nvim.nix | 13 +++---------- flake.lock | 4 ++-- flake.nix | 2 +- overlays.nix | 16 ++++++++++------ 5 files changed, 17 insertions(+), 20 deletions(-) diff --git a/common/home.nix b/common/home.nix index 54ea0e13..057ce287 100644 --- a/common/home.nix +++ b/common/home.nix @@ -253,7 +253,7 @@ base_url = "https://pass.uttarayan.me"; pinentry = if device.isMac - then pkgs.pinentry_mac + then pkgs.pinentry-curses else pkgs.pinentry-gnome3; }; }; diff --git a/common/nvim.nix b/common/nvim.nix index 4688347a..a6a8cd3c 100644 --- a/common/nvim.nix +++ b/common/nvim.nix @@ -300,7 +300,8 @@ in { "\"" = ''[["+]]''; "c" = "[[ChatGPT]]"; "dr" = "[[RustLsp debuggables]]"; - "ee" = "[[Rest run]]"; + # "ee" = "[[Rest run]]"; + "ee" = "[[RestNvim]]"; "el" = "[[Rest run last]]"; "hh" = "[[DevdocsOpenFloat]]"; "hl" = "[[DevdocsToggle]]"; @@ -392,15 +393,7 @@ in { end end - do - function setup() - require('rest-nvim').setup() - end - success, output = pcall(setup) - if not success then - print("Failed to setup rest-nvim: " .. output) - end - end + catcher(require('rest-nvim').setup) -- require('telescope').load_extension("dap") diff --git a/flake.lock b/flake.lock index ae6a240c..13f0edcb 100644 --- a/flake.lock +++ b/flake.lock @@ -1461,11 +1461,11 @@ "locked": { "lastModified": 1, "narHash": "sha256-PaTXAe/aVsZln/cKtHPXfiWIL+VwFxRiSQU0CRmglLI=", - "path": "/nix/store/5v4fml58z01s1lf98qhi4zp8plqqjv41-source/flakes", + "path": "./flakes", "type": "path" }, "original": { - "path": "/nix/store/5v4fml58z01s1lf98qhi4zp8plqqjv41-source/flakes", + "path": "./flakes", "type": "path" } }, diff --git a/flake.nix b/flake.nix index 08725d1c..070a7b8e 100644 --- a/flake.nix +++ b/flake.nix @@ -62,7 +62,7 @@ subflakes = { # TODO: Will eventualy move all the non-flake fetchFromGitHub urls to this flake # As inputs for the flake that way I don't have to update the hashes manually - url = "./flakes"; + url = "path:./flakes"; inputs.nixpkgs.follows = "nixpkgs"; }; rust-overlay = { diff --git a/overlays.nix b/overlays.nix index 5976af0c..8ab47197 100644 --- a/overlays.nix +++ b/overlays.nix @@ -235,21 +235,24 @@ rest-nvim-src = final.pkgs.fetchFromGitHub { owner = "rest-nvim"; repo = "rest.nvim"; - rev = "64175b161b61b6807b4c6f3f18dd884325cf04e0"; + # rev = "64175b161b61b6807b4c6f3f18dd884325cf04e0"; + # Before v2 release + rev = "v1.0.0"; # sha256 = "sha256-3EC0j/hEbdQ8nJU0I+LGmE/zNnglO/FrP/6POer0338"; # sha256 = "sha256-3EC0j/hEbdQ8nJU0I+LGmE/zNnglO/FrP/6POer0339"; - sha256 = "sha256-w/Z9lHu99gpbmrDCw/MEUDy6jyABsC7K5dbbl3K+HWk="; + sha256 = "sha256-jSY5WXx5tQAD0ZefPbg2luHywGAMcB9wdUTy6Av3xnY"; }; in { vimPlugins = prev.vimPlugins // { - rest-nvim = final.neovimUtils.buildNeovimPlugin { + rest-nvim = final.vimUtils.buildVimPlugin { pname = "rest.nvim"; - version = "scm-1"; + version = "1.0.0"; src = rest-nvim-src; - rockspecVersion = "0.2-1"; - buildInputs = with final.pkgs.lua51Packages; [lua lua-curl mimetypes nvim-nio xml2lua]; + # version = "scm-1"; + # rockspecVersion = "0.2-1"; + # buildInputs = with final.pkgs.lua51Packages; [lua lua-curl mimetypes nvim-nio xml2lua]; }; }; # lua51Packages = @@ -297,6 +300,7 @@ in [ zellij catppuccinThemes vimPlugins + rest-nvim-overlay tree-sitter-grammars tmuxPlugins anyrun-overlay