# Cmdline Feature Plan## Easy Wins### 1. Per-format border/icon colors- [ ] Add highlight groups: `CmdlineBorderSearch`, `CmdlineBorderLua`,
`CmdlineBorderInput`
- [ ] In `render.lua`, set `winhighlight` based on `fmt.type`
- [ ] Apply icon highlight via extmark instead of plain text
- Files: `render.lua`, `nugu/init.lua`
### 2. Separate search direction icons- [ ] Add `search_up` icon to `std/icon.lua`
- [ ] Use it in `format.lua` when `firstc == '?'`
- Files: `std/icon.lua`, `format.lua`
### 3. Additional type detection (!/help/=)- [ ] Add patterns for `:!` (filter/bash), `:help`, `:=` (calculator)
- [ ] Add icons for each type
- Files: `format.lua`, `std/icon.lua`
### 4. Virtual-text icon rendering- [ ] Replace `icon .. ' ' .. text` with extmark-based icon
- [ ] Simplify cursor position math (no more icon_bytes offset)
- [ ] Remove trailing space hack if no longer needed
- Files: `render.lua`
## Medium Effort### 5. Syntax highlighting in cmdline- [ ] Add `lang` field to format table entries (`vim`, `lua`, `bash`, `regex`)
- [ ] After writing buffer text, apply treesitter highlights to command region
- [ ] Fallback to vim syntax if no treesitter parser
- Files: `render.lua`, new `highlight.lua` or inline
### 6. Popupmenu match highlighting- [ ] Compute typed prefix from cmdline text
- [ ] In `format_item()`, split text into matched/unmatched portions
- [ ] Apply `PmenuMatch` highlight to matched portion via extmarks
- Files: `popupmenu.lua`
### 7. Kind-specific popupmenu highlights- [ ] Define `CompletionItemKind*` highlight groups
- [ ] Apply per-kind highlight to icon portion in popupmenu
- Files: `popupmenu.lua`, `nugu/init.lua`
## Nice to Have### 8. Prompt-as-title for input()- [ ] When `prompt` is short, show as border title instead of inline
- [ ] Reconfigure window border dynamically
- Files: `render.lua`
### 9. Popupmenu scrollbar- [ ] Create thin scrollbar windows alongside popupmenu
- [ ] Update on scroll
- Files: new `scrollbar.lua` or inline in `popupmenu.lua`