-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
TypeScript support for VS Code notebooks #58717
Comments
we have plugin support to add external files and external files that act as js using plugins |
@sheetalkamat Thanks for your response. Can you explain what you mean by this the |
Here are some links for language service plugins and how it interacts with tsserver: |
@c3danielxu are you using some built-in functionality, or have you tried out https://github.com/DonJayamanne/typescript-notebook ? |
Thanks @sheetalkamat I will take a look at the resources you linked. @DanielRosenwasser I have a custom implementation of a Node.js notebook (inspired by the TypeScript notebook) but the feature request is more generic. For example, even with minimal files I can go to definition for my class ![]() |
@sheetalkamat @DanielRosenwasser I was under the impression that TypeScript cannot support notebooks natively due to not using the Language Server Protocol. Is that something that is on your radar or planned in the foreseeable future? That way VS Code can bump their TypeScript version and hopefully that will allow for intellisense in notebooks. |
LSP is fairly unrelated to whether or not notebooks are supported. There are a slew of other concerns for some sort of in-house notebook support. |
π Search Terms
"TypeScript", "VS Code", "VS Code notebooks", "notebook", "intellisense", "JavaScript cell"
β Viability Checklist
β Suggestion
We would like to have
d.ts
files affect JavaScript cells in a VS Code notebook. For the full context, the original feature request was for VS Code: microsoft/vscode#195745 We were encouraged by the VS Code team to create a request here because intellisense functionality comes from TypeScript.Currently, JavaScript cells in a VS Code notebook is using some non-configurable intellisense and cannot be affected by a
jsconfig.json
. It would be great if we could have this working for non-Jupyter notebooks. For example, in the"include"
configuration in thejsconfig
, in addition to**/*.js
we could have**/*.ipynb
and**/*.foobarnb
.π Motivating Example
VS Code notebooks are very powerful and are increasingly used to develop software. TypeScript intellisense is an extremely useful feature for JS/TS developers and it would benefit developers if you can use that in a notebook. Currently, you need to write your code in a
*.js
JavaScript file, configure thejsconfig
to include that file, then repeatedly copy paste the file content into a JavaScript cell in a notebook.π» Use Cases
Multiple teams at my workplace are using a JavaScript notebook to develop software. We can't execute some code in a file using Node.js because we need some integrations that are only in the notebook. We need intellisense from various JavaScript classes we have that are given in the
.d.ts
files.Currently, there are two workarounds we are using:
The text was updated successfully, but these errors were encountered: