1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
-- Example configuration for token management in SQL-CLI nvim plugin
-- Add this to your Neovim config (init.lua or wherever you setup plugins)
require.
-- Available commands after setup:
-- :TokenRefresh - Manually refresh the token
-- :TokenShow - Show current token (first 30 chars)
-- :TokenConfig - Show current config
-- :TokenConfig <url> - Set token endpoint URL
-- Usage in SQL macros:
-- The token will be automatically used when you have:
-- API_TOKEN = ${JWT_TOKEN}
-- in your CONFIG macro
-- Example workflow:
-- 1. Open nvim
-- 2. :TokenRefresh (or it auto-refreshes if configured)
-- 3. Expand your macros - token is automatically injected
-- 4. Token refreshes automatically every 14 minutes (or your configured interval)