Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce tsserver for typescript code cells #119

Merged
merged 10 commits into from
Jul 10, 2024
Merged

Introduce tsserver for typescript code cells #119

merged 10 commits into from
Jul 10, 2024

Conversation

benjreinhart
Copy link
Contributor

@benjreinhart benjreinhart commented Jul 5, 2024

This PR replaces tsc with tsserver for reporting TypeScript diagnostics. Additionally, it does it on source change, rather than only at the time the code is executed, which makes for a more responsive editor experience.

This is the first step in a larger effort to have a full LSP running in srcbook with type definitions, autocomplete, reporting, etc.

Prerequisites before merging

TODOs

Lots of TODOs but some immediate follow-ups to call out:

Screenshot 2024-07-08 at 2 00 40 PM

@benjreinhart benjreinhart requested a review from nichochar July 5, 2024 22:19
@benjreinhart benjreinhart force-pushed the tsserver branch 3 times, most recently from 58f495e to 13bfb1a Compare July 8, 2024 23:40
packages/api/index.mts Outdated Show resolved Hide resolved
Copy link
Contributor

@nichochar nichochar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. Indeed using the output channel feels wrong, makes sense to migrate to its own channel as a follow up.

packages/api/server/ws.mts Show resolved Hide resolved
packages/api/server/ws.mts Show resolved Hide resolved
packages/api/server/ws.mts Show resolved Hide resolved
packages/api/server/ws.mts Show resolved Hide resolved
packages/api/server/ws.mts Show resolved Hide resolved
packages/api/tsserver/tsserver.mts Show resolved Hide resolved
packages/api/tsserver/tsserver.mts Outdated Show resolved Hide resolved
packages/api/tsserver/tsservers.mts Show resolved Hide resolved
@benjreinhart benjreinhart merged commit d04eb5a into main Jul 10, 2024
@benjreinhart benjreinhart deleted the tsserver branch July 10, 2024 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants