mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-09 16:54:36 +02:00
plugins/rest: init
This commit is contained in:
parent
82b7d70dfd
commit
85ee07abde
3 changed files with 236 additions and 0 deletions
52
tests/test-sources/plugins/utils/rest.nix
Normal file
52
tests/test-sources/plugins/utils/rest.nix
Normal file
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.rest.enable = true;
|
||||
};
|
||||
|
||||
defaults = {
|
||||
plugins.rest = {
|
||||
enable = true;
|
||||
|
||||
resultSplitHorizontal = false;
|
||||
resultSplitInPlace = false;
|
||||
stayInCurrentWindowAfterSplit = false;
|
||||
skipSslVerification = false;
|
||||
encodeUrl = true;
|
||||
highlight = {
|
||||
enabled = true;
|
||||
timeout = 150;
|
||||
};
|
||||
result = {
|
||||
showUrl = true;
|
||||
showCurlCommand = true;
|
||||
showHttpInfo = true;
|
||||
showHeaders = true;
|
||||
showStatistics = false;
|
||||
formatters = {
|
||||
json = "jq";
|
||||
html.__raw = ''
|
||||
function(body)
|
||||
if vim.fn.executable("tidy") == 0 then
|
||||
return body
|
||||
end
|
||||
-- stylua: ignore
|
||||
return vim.fn.system({
|
||||
"tidy", "-i", "-q",
|
||||
"--tidy-mark", "no",
|
||||
"--show-body-only", "auto",
|
||||
"--show-errors", "0",
|
||||
"--show-warnings", "0",
|
||||
"-",
|
||||
}, body):gsub("\n$", "")
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
jumpToRequest = false;
|
||||
envFile = ".env";
|
||||
customDynamicVariables = null;
|
||||
yankDryRun = true;
|
||||
searchBack = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue