" Vim syntax file " Language: Junction router config (pf.conf-style) " Maintainer: Junction " Usage: put in ~/.vim/syntax/junction.vim and add to ftdetect: " au BufRead,BufNewFile junction.conf,*.junction.conf set filetype=junction if exists("b:current_syntax") finish endif syn case match " Comments syn match junctionComment "#.*$" contains=@Spell " Strings syn region junctionString start=+"+ skip=+\\"+ end=+"+ oneline syn region junctionString start=+'+ skip=+\\'+ end=+'+ oneline " Blocks syn keyword junctionBlock endpoint pool vkey mcp nextgroup=junctionName skipwhite syn match junctionName "\<[A-Za-z0-9_.:-]\+\>" contained " Top-level and rule keywords syn keyword junctionKeyword listen connect_timeout_ms offline_hold_s max_body_bytes syn keyword junctionKeyword max_inflight queue_timeout retry_num retry_backoff retry_max_wait syn keyword junctionKeyword offline_wait spend_log guard request log_prefix syn keyword junctionKeyword cache_ttl cache_entries cache_bytes cache tcp cache_secret_env cache_peer cache_peer_timeout_ms syn keyword junctionKeyword so_reuseport drain_timeout mcp_auth auto_endpoints syn keyword junctionKeyword probe_interval probe_timeout ctx_chars_per_token prices_path syn keyword junctionKeyword metrics control control_unix control_tcp syn keyword junctionKeyword balance compress compress_keep compress_min_bytes syn keyword junctionKeyword mcp_cache_ttl cache_deterministic_only " Rule directives syn keyword junctionRule req pass block syn keyword junctionCondition for path need check retry ctx vision strip as syn keyword junctionCheckValue hooks none syn keyword junctionSpecial on_hard on_soft skip delay " Endpoint/block properties syn keyword junctionProperty base kind context priority timeout idle_timeout cooldown syn keyword junctionProperty hook hook_retry hook_backoff wake api_key_env syn keyword junctionProperty auth_basic_user pass_cmd base_cmd usage_cmd usage_poll_s syn keyword junctionProperty budget_soft budget_hard on_soft_delay_s on_hard_skip syn keyword junctionProperty offpeak_from offpeak_to cost_weight syn keyword junctionProperty tls_verify tls_ca cache_on header vision max_model_inflight probe_on syn keyword junctionProperty connect_timeout_ms weight compress syn keyword junctionProperty url cmd headers timeout_s retry_ms enabled syn keyword junctionProperty token_env allow endpoints mcp_tools rpm budget_usd budget " Booleans / values syn keyword junctionBoolean on off true false auto all none syn keyword junctionBalance first round-robin least-usage cost syn keyword junctionKind remote local opencode-go opencode " Numbers, durations, sizes, percents syn match junctionNumber "\<\d\+\(\.\d\+\)\=\>" syn match junctionOperator "[{},=<>*]" " Paths/URLs (simple heuristic) syn match junctionPath "\(^\|\s\)\zs/\f\+" syn match junctionUrl "\