summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/lsp/providers/vuels.lua
blob: 0d93c61916e100a459305290f4304480eee79798 (plain)
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
local opts = {
  setup = {
    root_dir = function(fname)
      local util = require "lspconfig/util"
      return util.root_pattern "package.json"(fname)
        or util.root_pattern "vue.config.js"(fname)
        or vim.fn.getcwd()
    end,
    init_options = {
      config = {
        vetur = {
          completion = {
            autoImport = true,
            tagCasing = "kebab",
            useScaffoldSnippets = true,
          },
          useWorkspaceDependencies = true,
          validation = {
            script = true,
            style = true,
            template = true,
          },
        },
      },
    },
  },
}
return opts