-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathts-ls.lua
More file actions
34 lines (33 loc) · 806 Bytes
/
ts-ls.lua
File metadata and controls
34 lines (33 loc) · 806 Bytes
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
local M = {}
local me = require("kide.melspconfig")
M.config = {
name = "ts_ls",
cmd = { "typescript-language-server", "--stdio" },
on_attach = me.on_attach,
on_init = me.on_init,
root_dir = vim.fs.root(0, { "tsconfig.json", "jsconfig.json", "package.json", ".git" }),
capabilities = me.capabilities(),
init_options = {
plugins = {
{
name = "@vue/typescript-plugin",
location = vim.fs.joinpath(me.global_node_modules(), "@vue", "typescript-plugin"),
languages = { "javascript", "typescript", "vue" },
},
},
},
filetypes = {
"javascript",
"javascriptreact",
"javascript.jsx",
"typescript",
"typescriptreact",
"typescript.tsx",
"vue",
},
settings = {
ts_ls = {},
},
single_file_support = true,
}
return M