docs(sync): document bundled credentials and config fields
This commit is contained in:
parent
bdd3e138c8
commit
de177b78b9
1 changed files with 40 additions and 13 deletions
|
|
@ -608,11 +608,8 @@ loads: >lua
|
||||||
sync = {
|
sync = {
|
||||||
gcal = {
|
gcal = {
|
||||||
calendar = 'Pendings',
|
calendar = 'Pendings',
|
||||||
credentials_path = '/path/to/client_secret.json',
|
|
||||||
},
|
|
||||||
gtasks = {
|
|
||||||
credentials_path = '/path/to/client_secret.json',
|
|
||||||
},
|
},
|
||||||
|
gtasks = {},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
<
|
<
|
||||||
|
|
@ -683,7 +680,9 @@ Fields: ~
|
||||||
{sync} (table, default: {}) *pending.SyncConfig*
|
{sync} (table, default: {}) *pending.SyncConfig*
|
||||||
Sync backend configuration. Each key is a backend
|
Sync backend configuration. Each key is a backend
|
||||||
name and the value is the backend-specific config
|
name and the value is the backend-specific config
|
||||||
table. Currently only `gcal` is built-in.
|
table. Built-in backends: `gcal`, `gtasks`. Both
|
||||||
|
ship bundled OAuth credentials so no setup is
|
||||||
|
needed beyond `:Pending <backend> auth`.
|
||||||
|
|
||||||
{icons} (table) *pending.Icons*
|
{icons} (table) *pending.Icons*
|
||||||
Icon characters displayed in the buffer. The
|
Icon characters displayed in the buffer. The
|
||||||
|
|
@ -934,12 +933,14 @@ Configuration: >lua
|
||||||
sync = {
|
sync = {
|
||||||
gcal = {
|
gcal = {
|
||||||
calendar = 'Pendings',
|
calendar = 'Pendings',
|
||||||
credentials_path = '/path/to/client_secret.json',
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
<
|
<
|
||||||
|
|
||||||
|
No configuration is required to get started — bundled OAuth credentials are
|
||||||
|
used by default. Run `:Pending gcal auth` and the browser opens immediately.
|
||||||
|
|
||||||
*pending.GcalConfig*
|
*pending.GcalConfig*
|
||||||
Fields: ~
|
Fields: ~
|
||||||
{calendar} (string, default: 'Pendings')
|
{calendar} (string, default: 'Pendings')
|
||||||
|
|
@ -947,13 +948,27 @@ Fields: ~
|
||||||
with this name does not exist it is created
|
with this name does not exist it is created
|
||||||
automatically on the first sync.
|
automatically on the first sync.
|
||||||
|
|
||||||
{credentials_path} (string)
|
{client_id} (string, optional)
|
||||||
Path to the OAuth client secret JSON file downloaded
|
OAuth client ID. When set together with
|
||||||
|
{client_secret}, these take priority over the
|
||||||
|
credentials file and bundled defaults.
|
||||||
|
|
||||||
|
{client_secret} (string, optional)
|
||||||
|
OAuth client secret. See {client_id}.
|
||||||
|
|
||||||
|
{credentials_path} (string, optional)
|
||||||
|
Path to an OAuth client secret JSON file downloaded
|
||||||
from the Google Cloud Console. Default:
|
from the Google Cloud Console. Default:
|
||||||
`stdpath('data')..'/pending/gcal_credentials.json'`.
|
`stdpath('data')..'/pending/gcal_credentials.json'`.
|
||||||
The file may be in the `installed` wrapper format
|
The file may be in the `installed` wrapper format
|
||||||
that Google provides or as a bare credentials object.
|
that Google provides or as a bare credentials object.
|
||||||
|
|
||||||
|
Credential resolution: ~
|
||||||
|
Credentials are resolved in order:
|
||||||
|
1. `client_id` + `client_secret` config fields (highest priority).
|
||||||
|
2. JSON file at `credentials_path` (or the default path).
|
||||||
|
3. Bundled credentials shipped with the plugin (always available).
|
||||||
|
|
||||||
OAuth flow: ~
|
OAuth flow: ~
|
||||||
On the first `:Pending gcal` call the plugin detects that no refresh token
|
On the first `:Pending gcal` call the plugin detects that no refresh token
|
||||||
exists and opens the Google authorization URL in the browser using
|
exists and opens the Google authorization URL in the browser using
|
||||||
|
|
@ -988,22 +1003,34 @@ created automatically on first sync.
|
||||||
Configuration: >lua
|
Configuration: >lua
|
||||||
vim.g.pending = {
|
vim.g.pending = {
|
||||||
sync = {
|
sync = {
|
||||||
gtasks = {
|
gtasks = {},
|
||||||
credentials_path = '/path/to/client_secret.json',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
<
|
<
|
||||||
|
|
||||||
|
No configuration is required to get started — bundled OAuth credentials are
|
||||||
|
used by default. Run `:Pending gtasks auth` and the browser opens immediately.
|
||||||
|
|
||||||
*pending.GtasksConfig*
|
*pending.GtasksConfig*
|
||||||
Fields: ~
|
Fields: ~
|
||||||
{credentials_path} (string)
|
{client_id} (string, optional)
|
||||||
Path to the OAuth client secret JSON file downloaded
|
OAuth client ID. When set together with
|
||||||
|
{client_secret}, these take priority over the
|
||||||
|
credentials file and bundled defaults.
|
||||||
|
|
||||||
|
{client_secret} (string, optional)
|
||||||
|
OAuth client secret. See {client_id}.
|
||||||
|
|
||||||
|
{credentials_path} (string, optional)
|
||||||
|
Path to an OAuth client secret JSON file downloaded
|
||||||
from the Google Cloud Console. Default:
|
from the Google Cloud Console. Default:
|
||||||
`stdpath('data')..'/pending/gtasks_credentials.json'`.
|
`stdpath('data')..'/pending/gtasks_credentials.json'`.
|
||||||
Accepts the `installed` wrapper format or a bare
|
Accepts the `installed` wrapper format or a bare
|
||||||
credentials object.
|
credentials object.
|
||||||
|
|
||||||
|
Credential resolution: ~
|
||||||
|
Same three-tier resolution as the gcal backend (see |pending-gcal|).
|
||||||
|
|
||||||
OAuth flow: ~
|
OAuth flow: ~
|
||||||
Same PKCE flow as the gcal backend; listens on port 18393. Tokens are stored
|
Same PKCE flow as the gcal backend; listens on port 18393. Tokens are stored
|
||||||
at `stdpath('data')/pending/gtasks_tokens.json`. Run `:Pending gtasks auth`
|
at `stdpath('data')/pending/gtasks_tokens.json`. Run `:Pending gtasks auth`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue