{ lib, config, pkgs, ... }: lib.mkIf (lib.elem "nvim::hurl" config.machine.pkgs) { programs.nvim-lazy.lazyPlugins = [ { lazy = true; dir = vPlug: vPlug.nui-nvim; } { lazy = true; ft = [ "hurl" ]; short = "jellydn/hurl.nvim"; dependencies = (vPlug: with vPlug; [ nui-nvim ]); opts = { debug = false; show_notification = false; # Show response in popup or split mode = "popup"; formatters = { json = [ "${pkgs.jq}/bin/jq" ]; html = [ "${pkgs.nodePackages.prettier}/bin/prettier" "--parser" "html" ]; }; }; keys = [ { bind = "A"; cmd = "HurlRunner"; opts = { ft = "hurl"; desc = "Run All requests"; }; } { bind = "a"; cmd = "HurlRunnerAt"; opts = { ft = "hurl"; desc = "Run Api request"; }; } { bind = "te"; cmd = "HurlRunnerToEntry"; opts = { ft = "hurl"; desc = "Run Api request to entry"; }; } { bind = "tm"; cmd = "HurlToggleMode"; opts = { ft = "hurl"; desc = "Hurl Toggle Mode"; }; } { bind = "tv"; cmd = "HurlVerbose"; opts = { ft = "hurl"; desc = "Run Api in verbose mode"; }; } { bind = "h"; cmd = ":HurlRunner"; opts = { ft = "hurl"; desc = "Hurl Runner"; mode = "v"; }; } ]; } { lazy = true; ft = [ "hurl" ]; dir = vPlug: vPlug.hurl; } ]; }