Skip to content

Commit

Permalink
refactor(language-server): re-export @vue/typescript-plugin (#4061)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Mar 10, 2024
1 parent 1692266 commit 0f5dfce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
1 change: 1 addition & 0 deletions packages/language-server/typescript-plugin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export = require('@vue/typescript-plugin');
16 changes: 5 additions & 11 deletions packages/typescript-plugin/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
# typescript plugin

This is a plug-in for `tsserver` or `typescript-language-server`. It must be
installed in a file-system location accessible by the language server or in the
`node_modules` directory of projects being edited.
This is a plug-in for `tsserver` or `typescript-language-server`. It must be installed in a file-system location accessible by the language server or in the `node_modules` directory of projects being edited.

The LSP client must be configured to explicitly enable this plug-in. This is
done by passing `initializationOptions` with the appropriate [`plugins`]
configuration to the language server:
The LSP client must be configured to explicitly enable this plug-in. This is done by passing `initializationOptions` with the appropriate [`plugins`] configuration to the language server:

[`plugins`]: https://github.com/typescript-language-server/typescript-language-server/blob/b224b878652438bcdd639137a6b1d1a6630129e4/docs/configuration.md?plain=1#L27-L31

Expand All @@ -15,16 +11,14 @@ configuration to the language server:
"plugins": [
{
"name": "@vue/typescript-plugin",
"location": "/usr/local/lib/node_modules/@vue/typescript-plugin",
"languages": ["javascript", "typescript", "vue"],
"location": "/usr/local/lib/node_modules/@vue/typescript-plugin", // or "/usr/local/lib/node_modules/@vue/language-server/typescript-plugin",
"languages": ["vue"],
},
],
},
```

The `languages` field must specify file-types for which the plug-in will be
enabled. If the plug-in package is installed in the local `node_modules`, the
`location` field may contain any arbitrary string, but MUST be present.
The `languages` field must specify file-types for which the plug-in will be enabled. If the plug-in package is installed in the local `node_modules`, the `location` field may contain any arbitrary string, but MUST be present.

## Client-specific configuration

Expand Down

0 comments on commit 0f5dfce

Please sign in to comment.