Skip to content

Commit

Permalink
Merge pull request #53 from mistweaverco/feat/internal
Browse files Browse the repository at this point in the history
feat: add internal processing
  • Loading branch information
gorillamoe authored Jul 14, 2024
2 parents d2dc145 + 01a3bdd commit b86f8a1
Show file tree
Hide file tree
Showing 18 changed files with 437 additions and 103 deletions.
2 changes: 1 addition & 1 deletion docs/docs/http_file_spec.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## HTTP File Specification
# HTTP File Specification

- The .http file syntax.
- How to create an .http file.
Expand Down
30 changes: 3 additions & 27 deletions docs/docs/install.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Install
# Install

> Requires Neovim 0.10.0+
Expand All @@ -12,33 +12,9 @@ require('lazy').setup({
{
'mistweaverco/kulala.nvim'
config = function()
require('kulala').setup({
-- default_view, body or headers
default_view = "body",
-- dev, test, prod, can be anything
-- see: https://learn.microsoft.com/en-us/aspnet/core/test/http-files?view=aspnetcore-8.0#environment-files
default_env = "dev",
-- enable/disable debug mode
debug = false,
-- default formatters for different content types
formatters = {
json = { "jq", "." },
xml = { "xmllint", "--format", "-" },
html = { "xmllint", "--format", "--html", "-" },
},
-- default icons
icons = {
inlay = {
loading = "",
done = ""
},
lualine = "🐼",
},
-- additional cURL options
-- e.g. { "--insecure", "-A", "Mozilla/5.0" }
additional_curl_options = {},
})
require('kulala').setup()
end
},
})
```

2 changes: 1 addition & 1 deletion docs/docs/public_methods.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Public methods
# Public methods

### run

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/requirements.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Requirements
# Requirements

### Neovim

Expand Down
183 changes: 183 additions & 0 deletions docs/docs/setup-options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
# Setup Options

The following options can be set in the setup function:

### Full example

Here is a full example of setting up the Kulala plugin with the `setup` function:

```lua title="setup.lua"
require("kulala").setup({
-- default_view, body or headers
default_view = "body",
-- dev, test, prod, can be anything
-- see: https://learn.microsoft.com/en-us/aspnet/core/test/http-files?view=aspnetcore-8.0#environment-files
default_env = "dev",
-- enable/disable debug mode
debug = false,
-- default formatters for different content types
formatters = {
json = { "jq", "." },
xml = { "xmllint", "--format", "-" },
html = { "xmllint", "--format", "--html", "-" },
},
-- default icons
icons = {
inlay = {
loading = "",
done = "",
error = "",
},
lualine = "🐼",
},
-- additional cURL options
-- see: https://curl.se/docs/manpage.html
additional_curl_options = {},
})
```

### default_view

Default view.

Possible values:

- `body`
- `headers`

Default: `body`

Example:

```lua
require("kulala").setup({
default_view = "body",
})
```

### default_env

Default environment.

See: https://learn.microsoft.com/en-us/aspnet/core/test/http-files?view=aspnetcore-8.0#environment-files

Possible values:

- `[any string]`

Default: `dev`

Example:

```lua
require("kulala").setup({
default_env = "body",
})
```

### debug

Enable debug mode.

Possible values:

- `true`
- `false`

Default: `false`

Example:

```lua
require("kulala").setup({
debug = false,
})
```

### formatters

Default formatters for different content types.

Possible values:

- `json = [command-table]`
- `xml = [command-table]`
- `html = [command-table]`

Default:

```lua
formatters = {
json = { "jq", "." },
xml = { "xmllint", "--format", "-" },
html = { "xmllint", "--format", "--html", "-" },
}
```

Example:

```lua
require("kulala").setup({
formatters = {
json = { "jq", "." },
xml = { "xmllint", "--format", "-" },
html = { "xmllint", "--format", "--html", "-" },
},
})
```

### icons

Default icons.

Possible values:

- `inlay = { loading = [string], done = [string], error = [string] }`
- `lualine = [string]`

Default:

```lua
icons = {
inlay = {
loading = "",
done = ""
error = "",
},
lualine = "🐼",
}
```

Example:

```lua
require("kulala").setup({
icons = {
inlay = {
loading = "",
done = ""
error = "",
},
lualine = "🐼",
},
})
```

### Additional cURL options

Additional cURL options.

Possible values:

- `[table of strings]`

Default: `{}`

Example:

```lua
require("kulala").setup({
additional_curl_options = { "--insecure", "-A", "Mozilla/5.0" },
})
```

62 changes: 0 additions & 62 deletions docs/docs/usage.md

This file was deleted.

7 changes: 7 additions & 0 deletions docs/docs/usage/authentication.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Authentication

See these topics for more information:

- [Sending form data](sending-form-data.md)
- [Dynamic environment variables](dynamically-setting-environment-variables-based-on-response-json.md)
- [Dotenv and environment files](dotenv-and-http-client.env.json-support)
Loading

0 comments on commit b86f8a1

Please sign in to comment.