mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
plugins/hurl: init
This commit is contained in:
parent
eb719d80a8
commit
f464541b18
2 changed files with 114 additions and 0 deletions
28
plugins/by-name/hurl/default.nix
Normal file
28
plugins/by-name/hurl/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "hurl";
|
||||||
|
packPathName = "hurl.nvim";
|
||||||
|
package = "hurl-nvim";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
debug = true;
|
||||||
|
mode = "popup";
|
||||||
|
env_file = [ "vars.env" ];
|
||||||
|
formatters = {
|
||||||
|
json = [ "jq" ];
|
||||||
|
html = [
|
||||||
|
"prettier"
|
||||||
|
"--parser"
|
||||||
|
"html"
|
||||||
|
];
|
||||||
|
xml = [
|
||||||
|
"tidy"
|
||||||
|
"-xml"
|
||||||
|
"-i"
|
||||||
|
"-q"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
86
tests/test-sources/plugins/by-name/hurl/default.nix
Normal file
86
tests/test-sources/plugins/by-name/hurl/default.nix
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.hurl.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.hurl = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
debug = false;
|
||||||
|
mode = "split";
|
||||||
|
show_notification = false;
|
||||||
|
auto_close = true;
|
||||||
|
split_position = "right";
|
||||||
|
split_size = "50%";
|
||||||
|
popup_position = "50%";
|
||||||
|
popup_size = {
|
||||||
|
width = 80;
|
||||||
|
height = 40;
|
||||||
|
};
|
||||||
|
env_file = [ "vars.env" ];
|
||||||
|
fixture_vars = [
|
||||||
|
{
|
||||||
|
name = "random_int_number";
|
||||||
|
callback.__raw = ''
|
||||||
|
function()
|
||||||
|
return math.random(1, 1000)
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "random_float_number";
|
||||||
|
callback.__raw = ''
|
||||||
|
function()
|
||||||
|
local result = math.random() * 10
|
||||||
|
return string.format('%.2f', result)
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
find_env_files_in_folders.__raw = "require('hurl.utils').find_env_files_in_folders";
|
||||||
|
formatters = {
|
||||||
|
json = [ "jq" ];
|
||||||
|
html = [
|
||||||
|
"prettier"
|
||||||
|
"--parser"
|
||||||
|
"html"
|
||||||
|
];
|
||||||
|
xml = [
|
||||||
|
"tidy"
|
||||||
|
"-xml"
|
||||||
|
"-i"
|
||||||
|
"-q"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
example = {
|
||||||
|
plugins.hurl = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
debug = true;
|
||||||
|
mode = "popup";
|
||||||
|
env_file = [ "vars.env" ];
|
||||||
|
formatters = {
|
||||||
|
json = [ "jq" ];
|
||||||
|
html = [
|
||||||
|
"prettier"
|
||||||
|
"--parser"
|
||||||
|
"html"
|
||||||
|
];
|
||||||
|
xml = [
|
||||||
|
"tidy"
|
||||||
|
"-xml"
|
||||||
|
"-i"
|
||||||
|
"-q"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue