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

Test: Extension contributed TS Server plugins #42361

Closed
3 tasks done
mjbvz opened this issue Jan 29, 2018 · 1 comment
Closed
3 tasks done

Test: Extension contributed TS Server plugins #42361

mjbvz opened this issue Jan 29, 2018 · 1 comment

Comments

@mjbvz
Copy link
Collaborator

mjbvz commented Jan 29, 2018

#41113

Complexity: 3

OS:

Summary

Extensions can now contribute TS Server plugins that augment our JS and TS tooling

Testing

  1. Install the lit-html extension: https://marketplace.visualstudio.com/items?itemName=bierner.lit-html

  2. In a new workspace, create some js and ts files

    • ✅ You get html intellisense for strings such as:

      const z = html`<img>`
    • ✅ Format works for the html content

  3. Now create a jsconfig or tsconfig and restart vs code

    • ✅ You still get intellisense
  4. In your jsconfig/tsconifg, try to configure the lit html plugin and restart the ts server:

    {
    	"compilerOptions": {
    		"module": "commonjs",
    		"target": "es2016",
    		"jsx": "preserve",
    		"plugins": [
    			{
    				"name": "typescript-lit-html-plugin",
    				"tags": ["foo"]
    			}
    		]
    	},
    	"exclude": [
    		"node_modules",
    		"**/node_modules/*"
    	]
    }
    • ✅ This config will break syntax highlighting but you now should be able to manually trigger intellisense inside of foo tagged templates:

      const z = foo`<img>`
  5. Now install a workspace version of typescript and run Select TypeScript version in the workspace to switch to it

    • ✅ The html intellisense should no longer be enabled.
  6. Now install the plugin manually into your workspace npm install typescript-lit-html-plugin and restart the tsserver

    • ✅ IntelliSense should be back

Other things to check

@aeschli
Copy link
Contributor

aeschli commented Jan 30, 2018

Pretty cool! Nice work.

@aeschli aeschli removed their assignment Jan 30, 2018
@sandy081 sandy081 removed their assignment Jan 30, 2018
@roblourens roblourens removed their assignment Jan 31, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants