typescript-jsdoctag-completions-plugin
v2.1.4-beta
Published
This plugin provides jsdoc tag completion and completion details. (with document of tag
Maintainers
Readme
TypeScript JSDoc Tag Completions Plugin
This plugin provides JSDoc tag completions and displays detailed documentation for each tag.
- Using the Preset API, you can define documentation and syntax for each JSDoc
tag.
These definitions will appear in the completion details shown by your editor.
Installation & Quick Start
$ npm i --save-dev typescript typescript-jsdoctag-completions-pluginNext, configure the plugin in your tsconfig.json:
{
"compilerOptions": {
"target": "es2019",
"module": "esnext",
"strict": true,
// In TypeScript 5.x, compilerOptions/locale was removed,
// so Moved locale to plugin settings.
// However, for older versions of TypeScript,
// this value is still read by the plugin as before.
// "locale": "ja",
"plugins": [
{
"name": "typescript-jsdoctag-completions-plugin",
// Plugin specific configuration
// builtin preset is "default" and "closure".
// If you want to use a jsdoc tag preset that you have defined yourself based on the preset API,
// specify the path of that module.
"preset": "closure",
"verbose": true, // enable/disable plugin logging
// plugin refers to the value of `@compilerOptions/plugins[@name=typescript-jsdoctag-completions-plugin]/locale`
// If not set, use the OS locale
"locale": "ja"
}
]
}
}Then launch Visual Studio Code or your preferred TypeScript editor.
About JSDoc Tag Presets
The plugin supports two types of presets:
Built-in presets:
| Preset name | Details | | :---------- | :--------------------------------------------------- | | default | TypeScript built-in JSDoc tags and Inline JSDoc tags | | closure | Closure Compiler JSDoc tags |
Custom presets:
To create your own preset, implement
TJSDocTagRawPresetas defined in preset-api.d.ts:
LocalePriority
The priority for resolving the locale setting is:
Project configuration (tsconfig.json, etc.)
- VSCode settings (vscode extension vscode-typescript-jsdoctag-completions)
OS locale
Usage Tips
- Set the TypeScript version in VSCode: ensure that the TypeScript version in VSCode is set to the version installed in your project.
- Include your source files in tsconfig.json: The plugin only applies to files listed in the "include" section.
License
This project is licensed under the MIT License. See the LICENSE file for details.
