Skip to content

Commit

Permalink
feat: Added vscode-vue-js-language-template for windows
Browse files Browse the repository at this point in the history
feat: Added vscode-vue-js-language-template for windows

Fixes #710
  • Loading branch information
welcome-day authored Dec 23, 2024
1 parent 246439d commit d878977
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/main/resources/templates/vue-js-language-server/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
You can use [Vue Language Server](https://github.com/vuejs/language-tools/tree/master/packages/language-server) by following these instructions:
* [Install Node.js](https://nodejs.org/en/download)
* [npm install -g @vue/language-server](https://www.npmjs.com/package/@volar/vue-language-server)
* [npm install -g typescript](https://www.npmjs.com/package/typescript)

Configure, example on windows:
* Server > Command > `vue-language-server.cmd --stdio` OR `node "C:/Users/${user.name}/AppData/Roaming/npm/node_modules/@vue/language-server/bin/vue-language-server.js" --stdio`
* Mappings > File name patterns > press "+" > File name patterns like "`*.vue`" and language id like "`vue`"
* Configuration: `{}`
* Initialization Options, need set `${user.name}`:
``` JSON
{
"typescript": {
"tsdk": "C:/Users/${user.name}/AppData/Roaming/npm/node_modules/typescript/lib"
},
"vue": {
"hybridMode": false
}
}
```

You can use [Vue highlight](https://github.com/vuejs/vue-syntax-highlight) in the TextMate by following these instructions:
* Download and unzip in a folder
* File -> Settings -> Editor -> TextMate Bundles
* And press "+" `Select Path` to folder with highlight
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"typescript": {
"tsdk": "C:/Users/${user.name}/AppData/Roaming/npm/node_modules/typescript/lib"
},
"vue": {
"hybridMode": false
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
18 changes: 18 additions & 0 deletions src/main/resources/templates/vue-js-language-server/template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"id": "vue-js-language-server",
"name": "Vue.js Language Server",
"programArgs": {
"windows": "vue-language-server.cmd --stdio",
"default": "vue-language-server --stdio"
},
"fileTypeMappings": [
{
"fileType": {
"patterns": [
"*.vue"
]
},
"languageId": "vue"
}
]
}

0 comments on commit d878977

Please sign in to comment.