nvim: hurl add dependencies, binds and xml parser.

This commit is contained in:
Kevin Baensch 2025-07-11 09:26:23 +02:00
parent bd300cd87a
commit 0382056207
Signed by: derped
SSH key fingerprint: SHA256:8/FSu/lmp3c1Z17Gml06JRIEHtDjhwdd7g6pBaHQWBc

View file

@ -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 = "<leader>tE";
cmd = "<cmd>HurlRunnerToEnd<CR>";
opts = {
ft = "hurl";
desc = "Run Api request from current entry to end";
};
}
{
bind = "<leader>tm";
cmd = "<cmd>HurlToggleMode<CR>";
@ -71,6 +94,14 @@ lib.mkIf (lib.elem "nvim::hurl" config.machine.services) {
desc = "Run Api in verbose mode";
};
}
{
bind = "<leader>tV";
cmd = "<cmd>HurlVeryVerbose<CR>";
opts = {
ft = "hurl";
desc = "Run Api in very verbose mode";
};
}
{
bind = "<leader>h";
cmd = ":HurlRunner<CR>";
@ -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 ];
}