aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/vuels.lua
blob: 146387e1852f03e24177d18d80c9e5042849e5e1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
local configs = require 'lspconfig/configs'
local util = require 'lspconfig/util'

local server_name = "vuels"
local bin_name = "vls"

configs[server_name] = {
  default_config = {
    cmd = {bin_name};
    filetypes = {"vue"};
    root_dir = util.root_pattern("package.json", "vue.config.js");
    init_options = {
      config = {
        vetur = {
          useWorkspaceDependencies = false;
          validation = {
            template = true;
            style = true;
            script = true;
          };
          completion = {
            autoImport = false;
            useScaffoldSnippets = false;
            tagCasing = "kebab";
          };
          format = {
            defaultFormatter = {
              js = "none";
              ts = "none";
            };
            defaultFormatterOptions = {};
            scriptInitialIndent = false;
            styleInitialIndent = false;
          }
        };
        css = {};
        html = {
            suggest = {};
        };
        javascript = {
            format = {};
        };
        typescript = {
            format = {};
        };
        emmet = {};
        stylusSupremacy = {};
      };
    };
  };
  docs = {
    package_json = "https://raw.githubusercontent.com/vuejs/vetur/master/package.json";
    description = [[
https://github.com/vuejs/vetur/tree/master/server

Vue language server(vls)
`vue-language-server` can be installed via `npm`:
```sh
npm install -g vls
```
]];
    default_config = {
      root_dir = [[root_pattern("package.json", "vue.config.js")]];
      init_options = {
        config = {
          vetur = {
            useWorkspaceDependencies = false;
            validation = {
              template = true;
              style = true;
              script = true;
            };
            completion = {
              autoImport = false;
              useScaffoldSnippets = false;
              tagCasing = "kebab";
            };
            format = {
              defaultFormatter = {
                js = "none";
                ts = "none";
              };
              defaultFormatterOptions = {};
              scriptInitialIndent = false;
              styleInitialIndent = false;
            }
          };
          css = {};
          html = {
              suggest = {};
          };
          javascript = {
              format = {};
          };
          typescript = {
              format = {};
          };
          emmet = {};
          stylusSupremacy = {};
        };
      };
    };
  };
}

-- vim:et ts=2 sw=2