
How Code Telescope Handles Syntax Highlighting in a VS Code Webview
When I started building Code Telescope — a Telescope.nvim-inspired fuzzy finder for VS Code — one of the hardest parts wasn't the fuzzy matching or the file indexing. It was the preview panel. The preview needs to show syntax-highlighted code, update in real time as you navigate between files, and do all of this inside a VS Code webview — which is essentially a sandboxed iframe with no access to VS Code's own editor APIs. Here's how I built it. The Constraints VS Code webviews are isolated. You can't use the editor's built-in tokenizer, you can't access TextMate grammars directly, and you can't load arbitrary node modules. Everything that runs in the webview is browser code. This meant I needed a full syntax highlighting pipeline running entirely in the browser, capable of: Loading language grammars on demand Supporting whatever color theme the user has active in VS Code Rendering large files without freezing the UI Updating fast enough to feel instant while navigating I chose Shiki as
Continue reading on Dev.to
Opens in a new tab

![[Learning notes and hw] getting started with R-cnn: Manually implementing Intersection over Union (IoU)](/_next/image?url=https%3A%2F%2Fmedia2.dev.to%2Fdynamic%2Fimage%2Fwidth%3D800%252Cheight%3D%252Cfit%3Dscale-down%252Cgravity%3Dauto%252Cformat%3Dauto%2Fhttps%253A%252F%252Fdev-to-uploads.s3.amazonaws.com%252Fuploads%252Farticles%252Favit2emoxc0g68e5ltqj.jpg&w=1200&q=75)
