Skip to content

Commit

Permalink
Merge pull request #83 from zardoy/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoy authored Jan 11, 2023
2 parents 18dcc3f + 75fe403 commit 5b9fe6b
Show file tree
Hide file tree
Showing 17 changed files with 604 additions and 225 deletions.
12 changes: 12 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@ Removes import statements from references when symbol has usages in the same fil

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

> Note: this setting doesn't disable Vue support.
### Vue Support

`.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.

Enable now: `"tsEssentialPlugins.enableVueSupport": true` (if you're not using local `./volar.config.js`)

For the first time, it will configure `volar.vueserver.configFilePath` setting.

This also makes plugin work in Volar's takeover mode!

### Web Support

> Note: when you open TS/JS file in the web for the first time you currently need to switch editors to make everything work!
Expand Down
16 changes: 15 additions & 1 deletion buildTsPlugin.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
//@ts-check
import buildTsPlugin from '@zardoy/vscode-utils/build/buildTypescriptPlugin.js'
import { analyzeMetafile } from 'esbuild'
import { build, analyzeMetafile } from 'esbuild'

build({
// bundle: true,
// minify: !watch,
entryPoints: ['./typescript/src/volarConfig.ts'],
outfile: './out/volarConfig.js',
format: 'cjs',
logLevel: 'info',
platform: 'node',
// banner: {
// js: 'let ts, tsFull;',
// },
// treeShaking: true,
})

const result = await buildTsPlugin('typescript', undefined, undefined, {
minify: !process.argv.includes('--watch'),
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@
"onLanguage:javascript",
"onLanguage:javascriptreact",
"onLanguage:typescript",
"onLanguage:typescriptreact"
"onLanguage:typescriptreact",
"onLanguage:vue"
],
"scripts": {
"start": "vscode-framework start --skip-launching",
Expand All @@ -98,7 +99,7 @@
"@types/semver": "^7.3.13",
"@types/vscode": "^1.63.1",
"@zardoy/tsconfig": "^1.3.1",
"esbuild": "^0.15.15",
"esbuild": "^0.16.16",
"fs-extra": "^10.1.0",
"got": "^12.5.3",
"type-fest": "^2.13.1",
Expand All @@ -118,6 +119,8 @@
"@types/lodash": "^4.14.182",
"@types/mocha": "^9.1.1",
"@types/pluralize": "^0.0.29",
"@volar/language-server": "^1.0.24",
"@volar/language-service": "^1.0.24",
"@vscode/emmet-helper": "^2.8.4",
"@vscode/test-electron": "^2.1.5",
"@zardoy/utils": "^0.0.9",
Expand Down
Loading

0 comments on commit 5b9fe6b

Please sign in to comment.