LSP-volar
Vue support for Sublime's LSP plugin
Details
Installs
- Total 3K
- Win 1K
- Mac 1K
- Linux 669
Mar 26 | Mar 25 | Mar 24 | Mar 23 | Mar 22 | Mar 21 | Mar 20 | Mar 19 | Mar 18 | Mar 17 | Mar 16 | Mar 15 | Mar 14 | Mar 13 | Mar 12 | Mar 11 | Mar 10 | Mar 9 | Mar 8 | Mar 7 | Mar 6 | Mar 5 | Mar 4 | Mar 3 | Mar 2 | Mar 1 | Feb 28 | Feb 27 | Feb 26 | Feb 25 | Feb 24 | Feb 23 | Feb 22 | Feb 21 | Feb 20 | Feb 19 | Feb 18 | Feb 17 | Feb 16 | Feb 15 | Feb 14 | Feb 13 | Feb 12 | Feb 11 | Feb 10 | Feb 9 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 1 | 3 | 4 | 1 | 1 | 2 | 3 | 2 | 3 | 3 | 3 | 4 | 2 | 0 | 2 | 2 | 4 | 2 | 3 | 3 | 4 | 4 | 5 | 6 | 5 | 6 | 13 | 8 | 3 | 3 | 4 | 7 | 5 | 4 | 1 | 5 | 4 | 5 | 10 | 4 | 2 | 5 | 4 | 7 | 8 |
Mac | 0 | 1 | 6 | 4 | 2 | 4 | 5 | 2 | 0 | 3 | 5 | 4 | 2 | 2 | 3 | 3 | 2 | 6 | 2 | 3 | 3 | 2 | 3 | 3 | 2 | 7 | 7 | 5 | 4 | 2 | 5 | 5 | 5 | 0 | 2 | 3 | 2 | 7 | 5 | 4 | 4 | 4 | 2 | 3 | 4 | 9 |
Linux | 0 | 0 | 2 | 4 | 2 | 2 | 2 | 2 | 2 | 0 | 0 | 2 | 0 | 4 | 2 | 1 | 2 | 4 | 1 | 1 | 5 | 1 | 1 | 0 | 2 | 1 | 0 | 3 | 0 | 3 | 3 | 3 | 3 | 1 | 1 | 3 | 1 | 1 | 1 | 1 | 0 | 3 | 0 | 0 | 1 | 2 |
Readme
- Source
- raw.githubusercontent.com
LSP-volar
This is a helper package that automatically installs and updates the Volar Language Server for you.
Table of Contents
Installation
- Install LSP, Vue Syntax Highlight and LSP-volar from Package Control.
- Restart Sublime.
Configuration
Open the configuration file using Command Palette with Preferences: LSP-volar Settings
command or opening it from the Sublime menu (Preferences > Package Settings > LSP > Servers > LSP-volar
).
Enable for non-Vue files
Allow LSP-volar to start in *.ts | *.tsx | *.js | *.jsx
files.
Per project:
Create a sublime project file with the following contents:
{
"folders":
[
{
"path": "."
}
],
"settings": {
"LSP": {
"LSP-volar": {
"selector": "text.html.vue | source.ts | source.tsx | source.js | source.jsx"
},
"LSP-typescript": {
"enabled": false
}
}
}
}
Globally:
From the Command Palette select Preferences: LSP-volar Settings
and paste the following:
// Settings in here override those in "LSP-volar/LSP-volar.sublime-settings"
{
"selector": "text.html.vue | source.ts | source.tsx | source.js | source.jsx"
}
NOTE: When enabling LSP-volar for non-Vue files, it is advisable to disable the
LSP-typescript
package to avoid showing duplicate results.
Inlay hints
Inlay hints are short textual annotations that show parameter names, type hints.
To enable inlay hints:
1. Open the command palette and select Preferences: LSP Settings
, then enable show_inlay_hints
:
“js
{
"show_inlay_hints”: true
}
2. Modify the following settings through `Preferences: LSP-volar Settings`:
```js
{
"settings": {
// javascript inlay hints options.
"javascript.inlayHints.enumMemberValues.enabled": false,
"javascript.inlayHints.functionLikeReturnTypes.enabled": false,
"javascript.inlayHints.parameterNames.enabled": "none",
"javascript.inlayHints.parameterNames.suppressWhenArgumentMatchesName": false,
"javascript.inlayHints.parameterTypes.enabled": false,
"javascript.inlayHints.propertyDeclarationTypes.enabled": false,
"javascript.inlayHints.variableTypes.enabled": false,
// typescript inlay hints options.
"typescript.inlayHints.enumMemberValues.enabled": false,
"typescript.inlayHints.functionLikeReturnTypes.enabled": false,
"typescript.inlayHints.parameterNames.enabled": "none",
"typescript.inlayHints.parameterNames.suppressWhenArgumentMatchesName": false,
"typescript.inlayHints.parameterTypes.enabled": false,
"typescript.inlayHints.propertyDeclarationTypes.enabled": false,
"typescript.inlayHints.variableTypes.enabled": false,
}
}
NOTE: Inlay hints require TypeScript 4.4+.
Vue 2 support
Please see Volar's Installation for setup instructions.