ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

LSP-vue

by sublimelsp ST3 Trending

Vue support for Sublime's LSP plugin

Labels lsp, vue

Details

  • 3.5.0
    2.2.4
    2.0.1
  • github.​com
  • github.​com
  • 4 months ago
  • 4 hours ago
  • 7 years ago

Installs

  • Total 11K
  • Win 5K
  • Mac 4K
  • Linux 3K
May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17
Windows 1 2 2 0 1 0 0 2 1 1 6 1 1 1 1 3 0 4 3 2 0 3 0 1 4 1 0 0 3 3 2 1 1 0 1 4 2 0 1 2 0 0 1 1 1 1
Mac 0 1 4 6 1 0 3 0 3 0 0 1 1 0 2 0 3 2 0 1 0 3 0 0 2 1 0 1 0 0 1 1 0 1 0 6 4 4 1 2 1 0 0 3 2 3
Linux 2 2 11 1 1 2 0 1 0 1 1 2 0 5 1 0 0 0 1 0 2 3 1 0 0 0 1 1 1 0 4 1 3 0 1 1 0 3 3 0 0 4 1 2 0 0

Readme

Source
raw.​githubusercontent.​com

LSP-vue

This is a helper package that automatically installs and updates the Vue Language Server (formerly Volar) for you.

Table of Contents

Installation

[!NOTE] Make sure that LSP-typescript is installed - it's a required dependency.

Configuration

Open the configuration file using Command Palette with Preferences: LSP-vue Settings command or opening it from the Sublime menu (Preferences > Package Settings > LSP > Servers > LSP-vue).

Semantic Tokens

Server assigns a dedicated entity.name.tag.vue scope to component tags which allows one to customize their color. To customize, select UI: Customize Color Scheme from the Command Palette and add a rule like the following (with your chosen color):

Error: language “jsonc” is not supported
{
    // ...
    "rules": [
        // ...
        {
            "scope": "entity.name.tag.vue",
            "foreground": "color(var(blue))",
        },
    ],
}

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-vue 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+.