Skip to content

Commit 71e9f2c

Browse files
committed
feat: Now we ship support for Volar (.vue SFC files) out of the box! For the first time, it will configure volar.vueserver.configFilePath setting, to disable this support use "tsEssentialPlugins.enableVueSupport": true setting. This also makes plugin work in takeover mode!
feat: rework `replaceSuggestions` feature. Main property now support `*` to match word with any length (0 included, transforms to `.*` regex), also more configuration values to filter & patch were added and add config fixes fix: a lot of fixes were rules of replaceSuggestions were applied incorrectly. Skip processing completions that were already processed by previous rules. Clone each completion deeply to ensure patching applies doesnt mutate others.
1 parent fe9bc4b commit 71e9f2c

16 files changed

+799
-226
lines changed

README.MD

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@ 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 enabled out of the box when [Vue Language Features (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) is installed.
96+
97+
For the first time, it will configure `volar.vueserver.configFilePath` setting, to disable Vue support use `"tsEssentialPlugins.enableVueSupport": true` setting.
98+
99+
This also makes plugin work in Volar's takeover mode!
100+
91101
### Web Support
92102

93103
> 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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
"@types/semver": "^7.3.13",
9999
"@types/vscode": "^1.63.1",
100100
"@zardoy/tsconfig": "^1.3.1",
101-
"esbuild": "^0.15.15",
101+
"esbuild": "^0.16.16",
102102
"fs-extra": "^10.1.0",
103103
"got": "^12.5.3",
104104
"type-fest": "^2.13.1",
@@ -118,6 +118,8 @@
118118
"@types/lodash": "^4.14.182",
119119
"@types/mocha": "^9.1.1",
120120
"@types/pluralize": "^0.0.29",
121+
"@volar/language-server": "^1.0.24",
122+
"@volar/language-service": "^1.0.24",
121123
"@vscode/emmet-helper": "^2.8.4",
122124
"@vscode/test-electron": "^2.1.5",
123125
"@zardoy/utils": "^0.0.9",

0 commit comments

Comments
 (0)