plugins.rest.settings

Options provided to the require('rest').setup function.

Type: attribute set of anything

Default: { }

Example:

{
  client = "curl";
  env_file = ".env";
  keybinds = [
    [
      "<localleader>rr"
      "<cmd>Rest run<cr>"
      "Run request under the cursor"
    ]
    [
      "<localleader>rl"
      "<cmd>Rest run last<cr>"
      "Re-run latest request"
    ]
  ];
  logs = {
    level = "info";
    save = true;
  };
  result = {
    split = {
      horizontal = false;
      in_place = false;
      stay_in_current_window_after_split = true;
    };
  };
}

Declared by:

plugins.rest.settings.client

The HTTP client to be used when running requests.

Plugin default: "curl"

Type: null or string or raw lua code

Default: null

Declared by:

plugins.rest.settings.custom_dynamic_variables

Custom dynamic variables. Keys are variable names and values are lua functions.

default: {}

Type: null or (attribute set of lua function string) or raw lua code

Default: null

Example:

{
  "\$randomInt" = ''
    function()
      return math.random(0, 1000)
    end
  '';
  "\$timestamp" = "os.time";
}

Declared by:

plugins.rest.settings.encode_url

Encode URL before making request.

Plugin default: true

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.rest.settings.env_edit_command

Neovim command to edit an environment file.

Plugin default: "tabedit"

Type: null or string or raw lua code

Default: null

Declared by:

plugins.rest.settings.env_file

Environment variables file to be used for the request variables in the document.

Plugin default: ".env"

Type: null or string or raw lua code

Default: null

Declared by:

plugins.rest.settings.env_pattern

Environment variables file pattern for telescope.nvim.

Plugin default: "\\.env$"

Type: null or string or raw lua code

Default: null

Declared by:

plugins.rest.settings.keybinds

Declare some keybindings. Format: list of 3 strings lists: key, action and description.

Plugin default:

[
  [
    "<localleader>rr"
    "<cmd>Rest run<cr>"
    "Run request under the cursor"
  ]
  [
    "<localleader>rl"
    "<cmd>Rest run last<cr>"
    "Re-run latest request"
  ]
]

Type: null or (list of ((list of string) or raw lua code))

Default: null

Declared by:

plugins.rest.settings.skip_ssl_verification

Skip SSL verification, useful for unknown certificates.

Plugin default: false

Type: null or boolean or raw lua code

Default: null

Declared by: