-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Example request] Embedded lsp for typescript/javascript #283
Comments
@aeschli assigning to you. Not sure who would be the right person for this. |
JavaScript embedded in a other language? |
@aeschli Thanks for the reply! I am looking for an example that embeds another language into Javascript. Specifically embedded into javascript template tags. |
If you want to run inside the TypeScript/JavaScript language server: |
Assigning to @mjbvz to decide if we want to a sample that shows how to extend the TypeScript language server. |
This is a pretty niche problem so it's probably best to look at what existing extensions do here. See https://github.com/mjbvz/vscode-lit-html for example |
that sort of works but it's not what I would have expected... it does not support any code that uses imports (which probably every meaningful code will do) e.g. examples like this do not work in 👉 export const foo = { on: 'foo', off: 'baz' } 👉 <script type="module">
import { foo } from './foo.js';
foo.o // no autocomplete for on/off
</script> an example how to get "real" javascript completion (like in a js file supporting imports) would be awesome 🤞 I have been reading through some issues and I am not sure if it's even possible? if it's currently not possible what would be needed to make it possible? 🤔 |
Hello, I am trying to create an embedded language extension for typescript/javascript.
The current lsp-embedded examples are useful but there is no typescript equivalent for "vscode-html-languageservice".
Is it possible to add an embedded language example targeting typescript?
The text was updated successfully, but these errors were encountered: