TypeScript language service plugin that adds IntelliSense for nornj tagged templates
npm install typescript-nornj-pluginbash
npm install --save-dev typescript-nornj-plugin typescript
`
Then add a plugins section to your tsconfig.json or jsconfig.json
`json
{
"compilerOptions": {
"plugins": [
{
"name": "typescript-nornj-plugin"
}
]
}
}
`
Finally, run the Select TypeScript version command in VS Code to switch to use the workspace version of TypeScript for VS Code's JavaScript and TypeScript language support. You can find more information about managing typescript versions in the VS Code documentation.
Configuration
You can configure the behavior of this plugin in plugins section of in your tsconfig or jsconfig.
If you are using nornj-highlight extension for VS Code, you can configure these settings in the editor settings instead of using a tsconfig or jsconfig.
$3
This plugin adds html IntelliSense to any template literal tagged with nj:
`js
import nj from 'nornj';
nj
`
You can enable IntelliSense for other tag names by configuring "tags":
`json
{
"compilerOptions": {
"plugins": [
{
"name": "typescript-nornj-plugin",
"tags": [
"html",
"nj",
"njs",
"t"
]
}
]
}
}
`
$3
The plugin formats html code by default. You can disable this by setting "format.enabled": false
`json
{
"compilerOptions": {
"plugins": [
{
"name": "typescript-nornj-plugin",
"format": { "enabled": false }
}
]
}
}
`
$3
Run the test using the e2e script:
`bash
(cd e2e && npm install)
npm run e2e
`
The repo also includes a vscode launch.json that you can use to debug the tests and the server. The Mocha Tests launch configuration starts the unit tests. Once a test is running and the TypeScript server for it has been started, use the Attach To TS Server` launch configuration to debug the plugin itself.