vuels.lua 639 B

1234567891011121314151617181920212223242526
  1. local opts = {
  2. setup = {
  3. root_dir = function(fname)
  4. local util = require "lvim.lspconfig/util"
  5. return util.root_pattern "package.json"(fname) or util.root_pattern "vue.config.js"(fname) or vim.fn.getcwd()
  6. end,
  7. init_options = {
  8. config = {
  9. vetur = {
  10. completion = {
  11. autoImport = true,
  12. tagCasing = "kebab",
  13. useScaffoldSnippets = true,
  14. },
  15. useWorkspaceDependencies = true,
  16. validation = {
  17. script = true,
  18. style = true,
  19. template = true,
  20. },
  21. },
  22. },
  23. },
  24. },
  25. }
  26. return opts