nvim: move to services we do not specify a pkgset

This commit is contained in:
Kevin Baensch 2025-07-05 20:08:20 +02:00
parent 465a6b19d1
commit 11b98d8146
Signed by: derped
GPG key ID: C0F1D326C7626543
45 changed files with 38 additions and 37 deletions

91
services/nvim/hurl.nix Normal file
View file

@ -0,0 +1,91 @@
{
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 = "<leader>A";
cmd = "<cmd>HurlRunner<CR>";
opts = {
ft = "hurl";
desc = "Run All requests";
};
}
{
bind = "<leader>a";
cmd = "<cmd>HurlRunnerAt<CR>";
opts = {
ft = "hurl";
desc = "Run Api request";
};
}
{
bind = "<leader>te";
cmd = "<cmd>HurlRunnerToEntry<CR>";
opts = {
ft = "hurl";
desc = "Run Api request to entry";
};
}
{
bind = "<leader>tm";
cmd = "<cmd>HurlToggleMode<CR>";
opts = {
ft = "hurl";
desc = "Hurl Toggle Mode";
};
}
{
bind = "<leader>tv";
cmd = "<cmd>HurlVerbose<CR>";
opts = {
ft = "hurl";
desc = "Run Api in verbose mode";
};
}
{
bind = "<leader>h";
cmd = ":HurlRunner<CR>";
opts = {
ft = "hurl";
desc = "Hurl Runner";
mode = "v";
};
}
];
}
{
lazy = true;
ft = [ "hurl" ];
dir = vPlug: vPlug.hurl;
}
];
}