Skip to content

Commit 5b9fe6b

Browse files
authored
Merge pull request #83 from zardoy/develop
2 parents 18dcc3f + 75fe403 commit 5b9fe6b

17 files changed

+604
-225
lines changed

README.MD

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,18 @@ Removes import statements from references when symbol has usages in the same fil
8888

8989
You can quickly disable this plugin functionality by setting this setting to false. Useful for debugging a problem for example.
9090

91+
> Note: this setting doesn't disable Vue support.
92+
93+
### Vue Support
94+
95+
`.vue` SFC files support is disabled, but can be enabled with setting and when [Vue Language Features (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) is installed.
96+
97+
Enable now: `"tsEssentialPlugins.enableVueSupport": true` (if you're not using local `./volar.config.js`)
98+
99+
For the first time, it will configure `volar.vueserver.configFilePath` setting.
100+
101+
This also makes plugin work in Volar's takeover mode!
102+
91103
### Web Support
92104

93105
> Note: when you open TS/JS file in the web for the first time you currently need to switch editors to make everything work!

buildTsPlugin.mjs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
//@ts-check
22
import buildTsPlugin from '@zardoy/vscode-utils/build/buildTypescriptPlugin.js'
3-
import { analyzeMetafile } from 'esbuild'
3+
import { build, analyzeMetafile } from 'esbuild'
4+
5+
build({
6+
// bundle: true,
7+
// minify: !watch,
8+
entryPoints: ['./typescript/src/volarConfig.ts'],
9+
outfile: './out/volarConfig.js',
10+
format: 'cjs',
11+
logLevel: 'info',
12+
platform: 'node',
13+
// banner: {
14+
// js: 'let ts, tsFull;',
15+
// },
16+
// treeShaking: true,
17+
})
418

519
const result = await buildTsPlugin('typescript', undefined, undefined, {
620
minify: !process.argv.includes('--watch'),

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@
7777
"onLanguage:javascript",
7878
"onLanguage:javascriptreact",
7979
"onLanguage:typescript",
80-
"onLanguage:typescriptreact"
80+
"onLanguage:typescriptreact",
81+
"onLanguage:vue"
8182
],
8283
"scripts": {
8384
"start": "vscode-framework start --skip-launching",
@@ -98,7 +99,7 @@
9899
"@types/semver": "^7.3.13",
99100
"@types/vscode": "^1.63.1",
100101
"@zardoy/tsconfig": "^1.3.1",
101-
"esbuild": "^0.15.15",
102+
"esbuild": "^0.16.16",
102103
"fs-extra": "^10.1.0",
103104
"got": "^12.5.3",
104105
"type-fest": "^2.13.1",
@@ -118,6 +119,8 @@
118119
"@types/lodash": "^4.14.182",
119120
"@types/mocha": "^9.1.1",
120121
"@types/pluralize": "^0.0.29",
122+
"@volar/language-server": "^1.0.24",
123+
"@volar/language-service": "^1.0.24",
121124
"@vscode/emmet-helper": "^2.8.4",
122125
"@vscode/test-electron": "^2.1.5",
123126
"@zardoy/utils": "^0.0.9",

0 commit comments

Comments
 (0)