Home / Companies / Mintlify / Blog / Post Details
Content Deep Dive

Building an LSP for your docs

Blog post from Mintlify

Post Details
Company
Date Published
Author
Ricardo Nunez
Word Count
1,323
Company Posts That Month
6
Language
English
Hacker News Points
-
Post removed?
No
Summary

Mintlify has integrated a new library called Twoslash into its platform to enhance developer documentation by providing an IDE-like experience that shows type information on hover in code examples. Twoslash, which has rapidly gained popularity, works by creating an in-memory TypeScript project and using the TypeScript compiler to add type annotations into a virtual file system, allowing users to see type information without adding extra JavaScript. Despite its effectiveness locally, Mintlify faced challenges deploying it to Vercel due to missing TypeScript type definitions, as Vercel's serverless functions only include compiled output, excluding necessary type files. To resolve this, Mintlify used Next.js's outputFileTracingIncludes setting to ensure the inclusion of required TypeScript types in the build output, successfully enabling Twoslash to function correctly on Vercel. This feature is available for TypeScript and JavaScript code blocks, providing developers with enhanced documentation capabilities.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Serverless 4 880 235 92 +5%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.