The AI Feature You Use 100x a Day (Built From Scratch)

In this 2 part-series, we will build Cursor-style AI tab completion/autocomplete feature from scratch. The final output will be a VS Code Extension. Tutorial GitHub Link: https://github.com/RivaanRanawat/tab_... Contribute to the project here: https://github.com/RivaanRanawat/taba... VS Code Extension: https://marketplace.visualstudio.com/... Discord Server -   / discord   Part 2:    • Building the Infrastructure for Real-Time ...   Resources: languageUtils.ts File: https://github.com/RivaanRanawat/tab_... download-grammar.js File: https://github.com/RivaanRanawat/tab_... src/services/astAnalysis.ts file: https://github.com/RivaanRanawat/tab_... promptBuilder.ts file: https://github.com/RivaanRanawat/tab_... Timestamps: (00:00:00) Introduction (00:02:33) Project Setup + Boilerplate Walkthrough (00:14:35) High Level Architecture (00:29:11) Very High Level Overview (00:30:51) MVP Architecture (00:31:20) Displaying Ghost Suggestion (00:53:41) Adding LLM Connection Support (OpenRouter) (01:00:49) Configuration Service (01:25:06) Streaming LLM Response & Connecting to Ghost Suggestion Display (02:15:14) MVP Completed (02:16:12) Existing Pending Completion Check (02:35:25) Token + Request Cancellation (02:41:13) Prediction Continuation (03:03:41) Early Exits Sequence Diagram + Overview (03:05:49) Intent Tracker (04:45:00) Cache (LRU + LFU) Architecture (04:55:17) Bounded Cache - Reusable Cache (05:21:23) Completion Cache + Intent Tracker Handling Editor Change (06:11:19) Context Gathering - User Prompt Schema & Architecture (06:21:57) Intent Tracker Serialization + Context Gatherer Boilerplate (06:39:14) Prefix Stage Architecture + What is LSP (06:52:53) Coding up Prefix Stage + LSP + Same File Dependency Resolving (Multi-Tier Strategy) (09:42:04) Part 2 out on April 10, 2026 Connect With Me Here: GitHub: https://github.com/rivaanranawat Linkedin:   / rivaan-ranawat   X: https://x.com/RanawatRivaan Substack: https://rivaanranawat.substack.com Instagram:   / optimalcoding