From 038205620708ec4f10aff62f2fefd20391eda89e Mon Sep 17 00:00:00 2001 From: derped Date: Fri, 11 Jul 2025 09:26:23 +0200 Subject: [PATCH] nvim: hurl add dependencies, binds and xml parser. --- services/nvim/hurl.nix | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/services/nvim/hurl.nix b/services/nvim/hurl.nix index ac86d78..47e60a8 100644 --- a/services/nvim/hurl.nix +++ b/services/nvim/hurl.nix @@ -14,8 +14,17 @@ lib.mkIf (lib.elem "nvim::hurl" config.machine.services) { { lazy = true; ft = [ "hurl" ]; - short = "jellydn/hurl.nvim"; - dependencies = (vPlug: with vPlug; [ nui-nvim ]); + dir = vPlug: vPlug.hurl-nvim; + dependencies = ( + vPlug: + with vPlug; + [ + "nvim-treesitter" + nui-nvim + plenary-nvim + ] + ++ (lib.optional (lib.elem "nvim::render-markdown-nvim" config.machine.services) vPlug.render-markdown-nvim) + ); opts = { debug = false; show_notification = false; @@ -28,6 +37,12 @@ lib.mkIf (lib.elem "nvim::hurl" config.machine.services) { "--parser" "html" ]; + xml = [ + "${pkgs.html-tidy}/bin/tidy" + "-xml" + "-i" + "-q" + ]; }; }; keys = [ @@ -55,6 +70,14 @@ lib.mkIf (lib.elem "nvim::hurl" config.machine.services) { desc = "Run Api request to entry"; }; } + { + bind = "tE"; + cmd = "HurlRunnerToEnd"; + opts = { + ft = "hurl"; + desc = "Run Api request from current entry to end"; + }; + } { bind = "tm"; cmd = "HurlToggleMode"; @@ -71,6 +94,14 @@ lib.mkIf (lib.elem "nvim::hurl" config.machine.services) { desc = "Run Api in verbose mode"; }; } + { + bind = "tV"; + cmd = "HurlVeryVerbose"; + opts = { + ft = "hurl"; + desc = "Run Api in very verbose mode"; + }; + } { bind = "h"; cmd = ":HurlRunner"; @@ -82,10 +113,6 @@ lib.mkIf (lib.elem "nvim::hurl" config.machine.services) { } ]; } - { - lazy = true; - ft = [ "hurl" ]; - dir = vPlug: vPlug.hurl; - } ]; + environment.systemPackages = with pkgs; [ hurl ]; }