Skip to content

Commit 7f89886

Browse files
committed
docs: update default format output and replace • with -
1 parent dfcaa0c commit 7f89886

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

doc/ccusage.txt

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ API limits and costs. Perfect for users with Anthropic Pro subscriptions who
1010
need to monitor their usage strategically.
1111

1212
Links:
13-
Changelog: https://github.com/S1M0N38/ccusage.nvim/blob/main/CHANGELOG.md
14-
License (MIT): https://github.com/S1M0N38/ccusage.nvim/blob/main/LICENSE
13+
- Changelog: https://github.com/S1M0N38/ccusage.nvim/blob/main/CHANGELOG.md
14+
- License (MIT): https://github.com/S1M0N38/ccusage.nvim/blob/main/LICENSE
1515

1616
Table of contents:
1717

@@ -101,11 +101,11 @@ statistics, and should return a string for display or nil to hide the
101101
component.
102102

103103
Default format function behavior: ~
104-
The default format shows: `245.2K $12.34` with indicators for active/inactive
105-
Claude Code sessions, where:
106-
• Token count with K/M suffixes for readability
107-
• Cost in USD
108-
• Status indicators for session activity
104+
The default format shows: `time 75% | tok 45%` with color indicators based on
105+
token usage, where:
106+
- Time percentage of current session elapsed
107+
- Token usage percentage of cycle limit
108+
- Color coding for token ratio: red (>100%), yellow (≥80%), default (<80%)
109109

110110
Custom formatting example: ~
111111
>lua
@@ -217,7 +217,7 @@ Usage example: ~
217217
-- Using raw CLI data
218218
local cli = require("ccusage.cli")
219219
local blocks_data = cli.ccusage_blocks()
220-
220+
221221
if blocks_data and blocks_data.blocks then
222222
for _, block in ipairs(blocks_data.blocks) do
223223
if block.isActive then
@@ -229,11 +229,11 @@ Usage example: ~
229229
-- Using formatter context (recommended)
230230
local data = require("ccusage.data")
231231
local context = data.get_formatter_context()
232-
232+
233233
if context.stats then
234234
print(string.format("Usage: %d/%d tokens (%.1f%%)",
235-
context.stats.tokens,
236-
context.stats.max_tokens,
235+
context.stats.tokens,
236+
context.stats.max_tokens,
237237
context.stats.usage_ratio * 100))
238238
end
239239
<
@@ -258,20 +258,20 @@ in a clean environment:
258258
Common Issues: ~
259259

260260
Issue: Component not showing in statusline ~
261-
Ensure ccusage CLI is installed: `npm install -g ccusage`
262-
Check health: `:checkhealth ccusage`
263-
Ensure lualine is configured with the "ccusage" component
264-
Verify ccusage has data: run `ccusage blocks --json` in terminal
261+
- Ensure ccusage CLI is installed: `npm install -g ccusage`
262+
- Check health: `:checkhealth ccusage`
263+
- Ensure lualine is configured with the "ccusage" component
264+
- Verify ccusage has data: run `ccusage blocks --json` in terminal
265265

266266
Issue: "ccusage command not found" error ~
267-
Install ccusage globally: `npm install -g ccusage`
268-
Verify PATH includes npm global binaries
269-
Set custom command path: `ccusage_cmd = "/full/path/to/ccusage"`
267+
- Install ccusage globally: `npm install -g ccusage`
268+
- Verify PATH includes npm global binaries
269+
- Set custom command path: `ccusage_cmd = "/full/path/to/ccusage"`
270270

271271
Issue: No usage data displayed ~
272-
Use Claude Code to generate some usage data first
273-
Run `:CCUsage` to check if data is available
274-
Verify ccusage CLI returns data: `ccusage blocks --json`
272+
- Use Claude Code to generate some usage data first
273+
- Run `:CCUsage` to check if data is available
274+
- Verify ccusage CLI returns data: `ccusage blocks --json`
275275

276276
Manual Testing: ~
277277

0 commit comments

Comments
 (0)