Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
236 commits
Select commit Hold shift + click to select a range
538fddf
wip: get session and message from server api
sudo-tee Oct 9, 2025
e16e939
ui: debounce output render via util.debounce; create extmark ns once;…
sudo-tee Oct 9, 2025
0f289a6
wip: only append to output buffer
sudo-tee Oct 10, 2025
a68fd89
Squashed commit of the following:
cameronr Oct 11, 2025
c26c151
chore(session): fix type annotation
cameronr Oct 11, 2025
cfcaab8
fix(session_formatter): msg should be msg.info
cameronr Oct 11, 2025
1b53b7e
fix(topbar): nil check
cameronr Oct 11, 2025
38a10d7
test: update tests based on changes
cameronr Oct 11, 2025
ae68e4e
fix(state): type annotation for messages
cameronr Oct 11, 2025
5e549fa
fix(streaming_renderer): use correct type for state
cameronr Oct 11, 2025
ac0051e
test(replay): add headless mode for agent testing
cameronr Oct 12, 2025
f4b854b
fix(streaming_renderer): part must be text for delta
cameronr Oct 12, 2025
e6b333e
fix(streaming_renderer): user file extmark
cameronr Oct 12, 2025
2e53f14
fix(streaming_renderer): don't render step-start/finish
cameronr Oct 12, 2025
50452c9
test(replay): fix namespace ids
cameronr Oct 12, 2025
4f78b38
fix(output_window): set status/signcolumn
cameronr Oct 12, 2025
90851cc
fix(output_window): don't set statuscolumn
cameronr Oct 12, 2025
1d76dea
test(replay): set statuscolumn/number for debugging
cameronr Oct 12, 2025
a3bd666
fix(streaming_renderer): remove text delta code
cameronr Oct 12, 2025
344e280
fix(session_formatter): don't shadow icons variable
cameronr Oct 12, 2025
aa8601a
chore(streaming_renderer): diagnostic
cameronr Oct 12, 2025
8781365
test(replay): add planning to tests
cameronr Oct 12, 2025
5d1e1e3
feat(event_manager): debug ability to capture events
cameronr Oct 12, 2025
93a066b
chore(streaming_renderer): comment typo
cameronr Oct 12, 2025
80f5cbc
feat(streaming_renderer): support permissions
cameronr Oct 12, 2025
83174eb
test(streaming_renderer): permission, diff
cameronr Oct 12, 2025
b85a75a
fix(permission): handle deny
cameronr Oct 12, 2025
0d93e52
test(replay): default to 50 ms
cameronr Oct 12, 2025
2d316b3
test(replay): update docs, all 50ms delay
cameronr Oct 12, 2025
b8eee8e
test(replay): share code with unit tests
cameronr Oct 12, 2025
9b2f568
test(permission-denied): add
cameronr Oct 12, 2025
d80aeaf
feat(tests): add -t -f params to run single tests
sudo-tee Oct 12, 2025
46e0e2d
chore: remove double condition
sudo-tee Oct 12, 2025
51a6e3b
feat(timer): cleanup timer code
sudo-tee Oct 12, 2025
b885ef7
fix(streaming_renderer): debounce scroll
cameronr Oct 12, 2025
6a3071a
fix(replay): make sure to use empty buffer
cameronr Oct 12, 2025
b41a4df
chore(ui): find better way to call render markdown
cameronr Oct 12, 2025
f08f4c8
fix(topbar): make sure it's always set
cameronr Oct 12, 2025
7c46978
fix(core): remove ui.stop_render_output()
cameronr Oct 12, 2025
2f88947
test(replay): add statuscolumn option, nil check api_client
cameronr Oct 12, 2025
a2ddb2f
fix(session_formatter): double ** around snapshots
cameronr Oct 12, 2025
bf052b1
fix(session_formatter): no space in action backticks
cameronr Oct 12, 2025
cc00898
fix(session_formatter): no backstick spaces, pluralize match
cameronr Oct 12, 2025
698298b
test(replay): remove debug log
cameronr Oct 12, 2025
315f981
test(replay): s/ReplayCapture/ReplaySave
cameronr Oct 12, 2025
94aed0f
fix(session_formatter): no fit in todo
cameronr Oct 12, 2025
123dd99
test(data): update replay data after output tweaks
cameronr Oct 12, 2025
47f0677
test(replay): ability to re-run all
cameronr Oct 12, 2025
2fded97
test(replay): add step arg to ReplayNext
cameronr Oct 13, 2025
cad5684
fix(streaming_renderer): extmarks row needs offset
cameronr Oct 13, 2025
dd29850
test(data): update after diff extmark fix
cameronr Oct 13, 2025
52a56ef
fix(context): don't resend current_file if mentioned
cameronr Oct 13, 2025
9aefe05
chore(output_window): remove PAD_LINES, append
cameronr Oct 13, 2025
468e9e1
fix(session_formatter): don't add 2 lines at start
cameronr Oct 13, 2025
6d67a8d
test(replay): add id to log
cameronr Oct 13, 2025
9cde761
test(replay): fix play all again
cameronr Oct 13, 2025
6278bd9
fix(config_file): remove unnecessary nil checks
cameronr Oct 13, 2025
9fc506e
fix(streaming_renderer): lifecycle improvements
cameronr Oct 13, 2025
6d45657
test(replay/unit): better setup of streaming_renderer
cameronr Oct 13, 2025
8fa870a
test(replay): extract index so it's right
cameronr Oct 13, 2025
663094d
fix(streaming_renderer): scroll on permissions
cameronr Oct 13, 2025
f999254
refactor(streaming_renderer): don't need msg cache
cameronr Oct 13, 2025
6be98af
fix(streaming_renderer): better way to shift part lines
cameronr Oct 13, 2025
24536d3
fix(session_formatter): render invalid tool error
cameronr Oct 13, 2025
70ebc28
fix(streaming_renderer): leverage _write_formatted_data
cameronr Oct 13, 2025
d38222f
docs(streaming_renderer): add function comments
cameronr Oct 13, 2025
b254dd1
fix(api): clean up reset calls
cameronr Oct 13, 2025
39c9491
fix(topbar/footer): subscriptions + lifecycle
cameronr Oct 13, 2025
f9b068a
fix(session_formatter): fix patch/code spacing
cameronr Oct 14, 2025
286e731
chore(session_formatter): type annotation _calculate_revert_stats
cameronr Oct 14, 2025
3773572
chore(config): missing local
cameronr Oct 14, 2025
ce40ed1
fix(init): set up config before state
cameronr Oct 14, 2025
8314625
test(streaming_renderer): auto-discover json files
cameronr Oct 14, 2025
0eec607
fix(ui): add render_lines back in
cameronr Oct 14, 2025
7913ec7
refactor(session_formatter): context file helper
cameronr Oct 14, 2025
50aee98
fix(streaming_renderer): set last_user_message earlier
cameronr Oct 14, 2025
3a0215d
feat(session_formatter): add selected text to format isolated part
sudo-tee Oct 14, 2025
bf12691
feat(session_formatter): unify part formatting
sudo-tee Oct 14, 2025
c0d77b9
test(github): add workflow to run unit tests
cameronr Oct 14, 2025
554b7db
test(replay): 0 delay ReplayAll
cameronr Oct 14, 2025
50ec9a5
test(replay): regenerate_expected script
cameronr Oct 14, 2025
389eae7
test(unit): use UTC timestamps in replays
cameronr Oct 14, 2025
b9291f2
refactor: streaming_renderer, session_formatter
cameronr Oct 14, 2025
45820b2
refactor: move full session loading to renderer
cameronr Oct 15, 2025
5d81644
refactor(render): helper for loading full session
cameronr Oct 15, 2025
f8d7140
test(replay): share setup, fix diagnostics
cameronr Oct 15, 2025
79d1a73
fix(renderer): _scroll_to_bottom
cameronr Oct 15, 2025
7b2b9ba
test(replay): replay full session reload path
cameronr Oct 15, 2025
3493aa2
test(data): more namespace normalization
cameronr Oct 15, 2025
644827a
test(replay): animate footer
cameronr Oct 15, 2025
28795a5
feat(renderer): ensure file is reloaded when edited
sudo-tee Oct 15, 2025
e782524
refactor(renderer): move data lookup in specialized class
sudo-tee Oct 15, 2025
4d420d7
fix(formatter): _format_error needs MessageInfo
cameronr Oct 15, 2025
c6331f9
test(replay): better output when mismatching data
cameronr Oct 15, 2025
c785eaf
test(timer): give more time for GH macos
cameronr Oct 15, 2025
7089f9a
test(replay): disable esc to close on input window
cameronr Oct 15, 2025
572bc3d
test(replay): show ids for permission events
cameronr Oct 15, 2025
b83de17
fix(server_job): better error logging
cameronr Oct 15, 2025
33ed73d
chore(output) add functions to type
cameronr Oct 15, 2025
ee0cff3
refactor: add actions to renderer, remove formatter state
cameronr Oct 15, 2025
502c79f
refactor(formatter): output should be first param
cameronr Oct 15, 2025
ff76bb1
refactor(formatter): format_message_header_single
cameronr Oct 15, 2025
73efc26
refactor: move stats to renderer
cameronr Oct 15, 2025
991d210
refactor(renderer): pass properties to handler
cameronr Oct 15, 2025
30ba379
refactor(renderer): load session data same as events
cameronr Oct 16, 2025
a55a150
chore(formatter): remove old code
cameronr Oct 16, 2025
fa71f4c
test(replay): set job_count = 0 on stop
cameronr Oct 16, 2025
877f379
test(data): event only test permission-prompt
cameronr Oct 16, 2025
9f776a2
chore(renderer): add re-render debug logging
cameronr Oct 16, 2025
3590544
fix(navigation): reimplemented without metadata
cameronr Oct 16, 2025
02e502f
fix(core/renderer): tune rerenders
cameronr Oct 16, 2025
12372d3
test(replay): use . for next
cameronr Oct 16, 2025
65075a5
fix(api): handle display_routes + rendering
cameronr Oct 16, 2025
59677b5
chore(ouput): i don't think we need deepcopy here
cameronr Oct 16, 2025
2df7962
chore(formatter): already have config
cameronr Oct 16, 2025
37dbcc2
test(replay): shorter updatetime for contextual_actions
cameronr Oct 16, 2025
0cd3cc8
fix(core): don't refresh on every switch to input
cameronr Oct 16, 2025
81546cd
test(replay): also check actions
cameronr Oct 16, 2025
0977c46
test(data): regen with actions
cameronr Oct 16, 2025
296aaa9
fix(ui): fix screen jitter!
cameronr Oct 17, 2025
bcbdc97
fix(event_manager): deepcopy events
cameronr Oct 17, 2025
de594bc
test(data): add shift and multi perms
cameronr Oct 17, 2025
25f749b
fix(renderer): shift part lines
cameronr Oct 17, 2025
7ca56bc
refactor: clean up renderer/formatter
cameronr Oct 17, 2025
a3938a4
fix(topbar): subscribe to active_session
cameronr Oct 17, 2025
3380f6f
test(replay): suppress no opencode project errors
cameronr Oct 17, 2025
ae6060a
refactor: add render_state WIP
cameronr Oct 17, 2025
263f76b
chore(formatter): remove old code
cameronr Oct 17, 2025
f546fa2
refactor(render_state) offset for add_action, rename types
cameronr Oct 17, 2025
bed0c97
refactor(render_state): slightly cleaner shift_lines
cameronr Oct 17, 2025
c5508cc
chore: message_map no longer needed
cameronr Oct 17, 2025
a92e640
test(render_state): add unit tests
cameronr Oct 17, 2025
b3aca65
test(timer): resolution too tight for GHA mac
cameronr Oct 17, 2025
281a93b
chore(render_state): fix get_part_by_call_id docs
cameronr Oct 17, 2025
50ae1bf
refactor(render_state): build line index lazily
cameronr Oct 17, 2025
22bd0c8
fix(server_job): forcibly cancel requests
cameronr Oct 17, 2025
55eba4e
chore(server_job): remove notify
cameronr Oct 17, 2025
1adbc8e
fix(renderer): look for part starting at end
cameronr Oct 17, 2025
21667e4
test(replay): fix agent instructions and dump
cameronr Oct 17, 2025
364a424
test(replay): ReplayNext to specific msg for agents
cameronr Oct 17, 2025
9668ac6
fix(renderer): part and message deletion
cameronr Oct 17, 2025
51a47a1
test(replay): part and message deletion
cameronr Oct 17, 2025
163c0de
feat(picker): keymap for starting a new session
cameronr Oct 18, 2025
18d3681
fix(server_job): don't set job_count=0
cameronr Oct 18, 2025
43ffcbd
chore(render_state): comment tweak
cameronr Oct 18, 2025
4479a72
test(data): selection replay
cameronr Oct 18, 2025
eccb30c
feat(renderer): config for markdown rendering
cameronr Oct 20, 2025
aec9000
chore(output_renderer): remove
cameronr Oct 20, 2025
40a905f
fix(topbar): update on session.updated
cameronr Oct 20, 2025
b642358
fix(renderer): Markview error
cameronr Oct 20, 2025
889485b
test(replay): deepcopy events
cameronr Oct 20, 2025
9c0bad5
fix(renderer): handle error rendering
cameronr Oct 20, 2025
50d1ddd
feat(renderer): make undo/redo work
sudo-tee Oct 20, 2025
7f50103
feat(redo): update redo to match opencode behavior
sudo-tee Oct 20, 2025
65b8407
refactor(render_state): clean up set/update apis
cameronr Oct 20, 2025
b9770b9
test(data): error rendering test
cameronr Oct 20, 2025
8bce13d
chore(renderer): remove errant debug log
cameronr Oct 20, 2025
7cfbab9
fix(renderer): no autoscroll on full session load
cameronr Oct 20, 2025
b81ed2d
fix(server_job): force job_count = 0 if requests is empty
cameronr Oct 20, 2025
e8a637e
fix(renderer): no callback if windows gone
cameronr Oct 20, 2025
7937e17
fix(core): undoing my change to cancel requests on stop
cameronr Oct 20, 2025
94034b4
chore(event_manager): add custom. prefix in front of custom events
sudo-tee Oct 21, 2025
f1ec731
feat(restore-point): make restore points work
sudo-tee Oct 21, 2025
0b9c260
fix(context): fix off-by-one range for file mention
sudo-tee Oct 21, 2025
2861601
feat(mention): highlight mention in user prompt
sudo-tee Oct 21, 2025
dbbb936
test(replay): set debug
cameronr Oct 22, 2025
27cdb72
feat(renderer): highlight mentions in output
cameronr Oct 22, 2025
e9b410d
test(data): add mentions with ranges replay test
cameronr Oct 22, 2025
c59971e
chore(mention): remove debug print
cameronr Oct 22, 2025
c15f1f4
fix(formatter): separator already has a line
cameronr Oct 22, 2025
b2c71a3
fix(formatter): extmarks should be 0 indexed
cameronr Oct 22, 2025
6194daa
test(replay): show msg/part ids when removing
cameronr Oct 22, 2025
ca45b6d
feat(mention): add support for subagents mention also
sudo-tee Oct 22, 2025
f76c94d
chore(types): merge MessagePart into OpencodeMessagePart
sudo-tee Oct 22, 2025
6ffb8de
chore(renderer): some warnings/state cleaning
sudo-tee Oct 22, 2025
f536222
feat(renderer): make markdown rendering debounce configurable
sudo-tee Oct 22, 2025
3a96bba
chore(event_manager): fix event_manager typings
sudo-tee Oct 22, 2025
92ec8f6
refactor(config): move on_data_rendered
cameronr Oct 22, 2025
7c05358
chore(formatter): clean up part.file type diags
cameronr Oct 22, 2025
42dc08f
chore(output): remove FIXME
cameronr Oct 22, 2025
35a9850
chore(output): remove unused metadata
cameronr Oct 22, 2025
f53fc0d
chore(replay): FIXME was already handled
cameronr Oct 22, 2025
ae6cfc3
fix(server_job): don't call shutdown in on_exit
cameronr Oct 22, 2025
c6a50b7
refactor(state): rename opencode_server_job
cameronr Oct 22, 2025
a029220
fix(core): restart opencode server on 3 cancels
cameronr Oct 22, 2025
5e832ea
chore(renderer): remove debug logging
cameronr Oct 23, 2025
1f58990
feat(permissions): add permissions keymaps to output_window also
sudo-tee Oct 23, 2025
ad5629e
fix(permissions): change permissions shortcuts on focus changes
sudo-tee Oct 23, 2025
21e91f4
fix(debug): find the nearest message for debug instead of a fixed line
sudo-tee Oct 23, 2025
9692c0a
fix(init): don't need vim.schedule around setup
cameronr Oct 23, 2025
a34a8e1
chore(cleanup): cleanup unrelated files
sudo-tee Oct 23, 2025
912c16a
feat(session_picker): add new keymap in title legend
sudo-tee Oct 23, 2025
dfabc1a
fix(rebase): fix error caused by rebase
sudo-tee Oct 23, 2025
7ca8000
test(snapshot): regenerate snapshots tests
sudo-tee Oct 23, 2025
191e64c
chore(server_job): remove unused code
cameronr Oct 23, 2025
a7fa453
fix(topbar): also subscribe to current_model
cameronr Oct 23, 2025
761487e
fix(config): don't overwrite keymaps with diff keymap_prefix
cameronr Oct 23, 2025
0e7da03
fix(formatter): strip ansi from bash/code blocks
cameronr Oct 24, 2025
776d321
perf(output): use table directly instead of function call overhead
sudo-tee Oct 24, 2025
e93708d
perf(event_manager): schedule every callback
sudo-tee Oct 24, 2025
87641f0
fix(formatter): don't add extra lines in bash tool
cameronr Oct 24, 2025
ea095e8
fix(renderer): don't use state.append/remove
cameronr Oct 24, 2025
ae35ab3
fix(event_manager): don't need the vim.schedule
cameronr Oct 24, 2025
a7960b0
chore(mention): remove debugging code
cameronr Oct 24, 2025
f4671c6
chore(renderer): add event capture (commented out)
cameronr Oct 24, 2025
f9d4191
docs(README): fix typo
cameronr Oct 24, 2025
bece9f8
fix(replay): fix on windows (non-wsl)
cameronr Oct 24, 2025
a501f51
fix(renderer): only set diff lines on part replace
cameronr Oct 25, 2025
a9af2b4
fix(renderer): fast exit when formatted_data equal
cameronr Oct 25, 2025
81e3dc9
chore(output_window): debug perf tracking
cameronr Oct 25, 2025
be76486
fix(renderer): inline set cursor
cameronr Oct 25, 2025
ce61b67
test(replay): refactor to use defer_fn
cameronr Oct 25, 2025
17e8e91
refactor(event_manager): throttle event emission
cameronr Oct 25, 2025
c7a6661
test(replay): refactor to use event_manager
cameronr Oct 25, 2025
64dbaeb
refactor(event_manager): throttle_ms from config
cameronr Oct 25, 2025
a63d04e
feat(event_manager): collapse repeated parts in queue
cameronr Oct 25, 2025
9b68a95
test(replay): better way to wait for all events
cameronr Oct 25, 2025
8b3b7f9
test(data): add very large perf file for testing
cameronr Oct 25, 2025
49f6cb8
feat(config): event_collapsing, defaults on
cameronr Oct 25, 2025
def1d10
chore(types): add Rendering class, fix config diag
cameronr Oct 25, 2025
f921ce8
chore(output_window): remove debugging code
cameronr Oct 25, 2025
6f424e0
fix(output_window): clear all extmarks when clearing
cameronr Oct 26, 2025
4f1d172
fix(api): no restore_position on mention/slash
cameronr Oct 26, 2025
c1b9568
fix(files/snacks): restore win/mode/cursor on cancel
cameronr Oct 26, 2025
d5a51b5
feat(loading_animation): default to braille animation
cameronr Oct 26, 2025
77045bd
chore: diagnostic cleanup
cameronr Oct 26, 2025
bb53413
chore(renderer): cleaning up types/diagnostics
cameronr Oct 26, 2025
c84b9de
chore(renderer): cleaning up diagnostics
cameronr Oct 26, 2025
9f1070d
chore(event_manager): clean up diagnostics
cameronr Oct 26, 2025
c5f6c26
chore(emmyrc): don't include lazy dir in workspace
cameronr Oct 26, 2025
ec18917
chore(api): cleaning up diagnostics
cameronr Oct 26, 2025
2a7dbe1
chore(event_manager): remove debug logging
cameronr Oct 26, 2025
e5cb4a1
fix: report errors on promise:wait failures
cameronr Oct 27, 2025
5e883c4
chore(types): minor emmylua type cleanup
cameronr Oct 27, 2025
097874c
fix(server_job): set job_count to #M.requests
cameronr Oct 27, 2025
4b7187d
fix(core): handle permissions when aborting
cameronr Oct 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .emmyrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://raw.githubusercontent.com/EmmyLuaLs/emmylua-analyzer-rust/refs/heads/main/crates/emmylua_code_analysis/resources/schema.json",
"runtime": {
"version": "LuaJIT"
},
"workspace": {
"library": [
"$VIMRUNTIME",
"$HOME/.local/share/nvim/lazy/luvit-meta/library/uv.lua",
],
"ignoreGlobs": [
"**/*_spec.lua"
]
}
}
59 changes: 59 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# From
# https://github.com/shortcuts/neovim-plugin-boilerplate/blob/main/.github/workflows/main.yml

name: tests

on:
push:
pull_request:
types: [opened, synchronize]

jobs:
lint:
runs-on: ubuntu-latest
name: lint
steps:
- uses: actions/checkout@v4

- uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --check . -g '*.lua' -g '!deps/'

test:
timeout-minutes: 4
strategy:
matrix:
os: [ubuntu-latest]
neovim_version: ["v0.10.3", "v0.11.4", "nightly"]
include:
- os: macos-latest
neovim_version: v0.11.4
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: setup neovim
uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: ${{ matrix.neovim_version }}

# only needed if testing in ssh but doesn't hurt
- name: Add nvim to PATH
run: echo "${{ steps.setup_nvim.outputs.executable }}" >> $GITHUB_PATH

- name: Install plenary
run: |
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim

- name: Run tests
run: ./run_tests.sh

# # For sshing in to debug GH actions
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# with:
# detached: true
20 changes: 0 additions & 20 deletions .luarc.json

This file was deleted.

12 changes: 10 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
# AGENTS.md

## Build, Lint, and Test

- **Run all tests:** `./run_tests.sh`
- **Minimal tests:**
`nvim --headless -u tests/minimal/init.lua -c "lua require('plenary.test_harness').test_directory('./tests/minimal', {minimal_init = './tests/minimal/init.lua', sequential = true})"`
- **Unit tests:**
`nvim --headless -u tests/minimal/init.lua -c "lua require('plenary.test_harness').test_directory('./tests/unit', {minimal_init = './tests/minimal/init.lua'})"`
- **Run a single test:** Replace the directory in the above command with the test file path, e.g.:
`nvim --headless -u tests/minimal/init.lua -c "lua require('plenary.test_harness').test_directory('./tests/unit/job_spec.lua', {minimal_init = './tests/minimal/init.lua'})"`
`nvim --headless -u tests/manual/init.lua -c "lua require('plenary.test_harness').test_directory('./tests/unit/job_spec.lua', {minimal_init = './tests/minimal/init.lua'})"`
- **Manual/Visual tests:** `./tests/manual/run_replay.sh` - Replay captured event data for visual testing
- **Debug rendering in headless mode:**
`nvim --headless -u tests/manual/init_replay.lua "+ReplayHeadless" "+ReplayLoad tests/data/FILE.json" "+ReplayAll 0" "+qa"`
This will replay events and dump the output buffer to stdout, useful for debugging rendering issues without a UI.
You can also run to just a specific message # with (e.g. message # 12):
`nvim --headless -u tests/manual/init_replay.lua "+ReplayHeadless" "+ReplayLoad tests/data/message-removal.json" "+ReplayNext 12" "+qa"`
- **Lint:** No explicit lint command; follow Lua best practices.

## Code Style Guidelines

- **Imports:** `local mod = require('mod')` at the top. Group standard, then project imports.
- **Formatting:** 2 spaces per indent. No trailing whitespace. Lines ≤ 100 chars.
- **Types:** Use Lua annotations (`---@class`, `---@field`, etc.) for public APIs/config.
Expand All @@ -19,6 +27,6 @@
- **Comments:** Only when necessary for clarity. Prefer self-explanatory code.
- **Functions:** Prefer local functions. Use `M.func` for module exports.
- **Config:** Centralize in `config.lua`. Use deep merge for user overrides.
- **Tests:** Place in `tests/minimal/` or `tests/unit/`.
- **Tests:** Place in `tests/minimal/` or `tests/unit/`. Manual/visual tests in `tests/manual/`.

_Agentic coding agents must follow these conventions strictly for consistency and reliability._
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ require('opencode').setup({
tools = {
show_output = true, -- Show tools output [diffs, cmd output, etc.] (default: true)
},
rendering = {
markdown_debounce_ms = 250, -- Debounce time for markdown rendering on new data (default: 250ms)
on_data_rendered = nil, -- Called when new data is rendered; set to false to disable default RenderMarkdown/Markview behavior
},
},
input = {
text = {
Expand Down Expand Up @@ -530,7 +534,7 @@ The plugin defines several highlight groups that can be customized to match your
- `OpencodeAgentBuild`: Agent indicator in winbar for Build mode (default: #616161 background)
- `OpencodeAgentCustom`: Agent indicator in winbar for custom modes (default: #3b4261 background)
- `OpencodeContestualAction`: Highlight for contextual actions in the output window (default: #3b4261 background)
- `OpencodeInpuutLegend`: Highlight for input window legend (default: #CCCCCC background)
- `OpencodeInputLegend`: Highlight for input window legend (default: #CCCCCC background)
- `OpencodeHint`: Highlight for hinting messages in input window and token info in output window footer (linked to `Comment`)

## 🔧 Setting up Opencode
Expand Down
Loading