diff options
author | Abouzar Parvan <[email protected]> | 2021-08-31 22:18:01 +0430 |
---|---|---|
committer | GitHub <[email protected]> | 2021-08-31 13:48:01 -0400 |
commit | 92ee9552e90bef282218069f4d74dd87d77b4fcd (patch) | |
tree | d10187d16f19677a1a6a120c19b15363f5fffca9 | |
parent | 67a0ee6fddf4c8ce7c5612ce32de684a0683e3ab (diff) |
better vue support (#1438)
-rw-r--r-- | lua/config/defaults.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lua/config/defaults.lua b/lua/config/defaults.lua index 4f93f924..9aa60e9a 100644 --- a/lua/config/defaults.lua +++ b/lua/config/defaults.lua @@ -1077,6 +1077,27 @@ lvim.lang = { cmd = { DATA_PATH .. "/lspinstall/vue/node_modules/.bin/vls", }, + 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, + }, + }, + }, + }, }, }, }, |