Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
cbochs committed Mar 27, 2024
1 parent 5e85367 commit f23d2c0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ require("grapple").setup({
scope = "git_branch",
})

-- Define a custom scope
-- Define and use a custom scope
require("grapple").setup({
scope = "custom",

Expand Down Expand Up @@ -1089,10 +1089,16 @@ Used for defining new scopes.
**Type**: `table`

- **`name`**: `string` scope name
- **`desc`**: `string` scope description
- **`resolver`**: [`grapple.scope_resolver`](#grapplescope_resolver)
- **`desc?`**: `string` scope description (default: `""`)
- **`force?`**: `string` scope description
- **`fallback?`**: `string` fallback scope name
- **`cache?`**: [`grapple.cache.options`](#grapplecacheoptions) | `boolean`
- **`priority?`**: `integer` scope priority, higher scopes are loaded first
- **`hidden?`**: `integer` do not show the scope in the [Scopes Window](#scopes-window)
- **`delete?`**: `integer`

**Note**: Scopes are given a `priority` based on their fallback ordering. By default, scopes without a fallback are given a priority of `1000`; scopes with a fallback, but are also fallbacks themselves, are given a priority of `100`; and all other scopes are given a priority of `1`. Higher priority scopes are loaded first. This can be overridden by setting a scope's `priority` manually in the [settings](#settings).

### `grapple.scope_resolver`

Expand Down

0 comments on commit f23d2c0

Please sign in to comment.