|
|
|
@ -62,6 +62,12 @@ vim.lsp.config['lua_ls'] = {
|
|
|
|
|
|
|
|
|
|
|
|
vim.lsp.enable('lua_ls')
|
|
|
|
vim.lsp.enable('lua_ls')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vim.lsp.config['ts_ls'] = {
|
|
|
|
|
|
|
|
-- capabilities = capabilities,
|
|
|
|
|
|
|
|
on_attach = on_attach,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
vim.lsp.enable('ts_ls')
|
|
|
|
|
|
|
|
|
|
|
|
vim.lsp.config['pyright'] = {
|
|
|
|
vim.lsp.config['pyright'] = {
|
|
|
|
-- capabilities = capabilities,
|
|
|
|
-- capabilities = capabilities,
|
|
|
|
on_attach = on_attach,
|
|
|
|
on_attach = on_attach,
|
|
|
|
@ -80,45 +86,9 @@ vim.lsp.config['clangd'] = {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
vim.lsp.enable('clangd')
|
|
|
|
vim.lsp.enable('clangd')
|
|
|
|
|
|
|
|
|
|
|
|
local tsserver_filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' }
|
|
|
|
vim.lsp.config['volar'] = {
|
|
|
|
local global_node_modules = vim.fn.system("npm root -g"):gsub("%s+", "")
|
|
|
|
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue', 'json' },
|
|
|
|
local vue_language_server_path = global_node_modules .. '/@vue/language-server'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local vue_plugin = {
|
|
|
|
|
|
|
|
name = '@vue/typescript-plugin',
|
|
|
|
|
|
|
|
location = vue_language_server_path,
|
|
|
|
|
|
|
|
languages = { 'vue' },
|
|
|
|
|
|
|
|
configNamespace = 'typescript',
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vim.lsp.config['ts_ls'] = {
|
|
|
|
|
|
|
|
init_options = {
|
|
|
|
|
|
|
|
plugins = {
|
|
|
|
|
|
|
|
vue_plugin,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
filetypes = tsserver_filetypes,
|
|
|
|
|
|
|
|
on_attach = on_attach,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vim.lsp.config['vtsls'] = {
|
|
|
|
|
|
|
|
on_attach = on_attach,
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
|
|
|
|
vtsls = {
|
|
|
|
|
|
|
|
tsserver = {
|
|
|
|
|
|
|
|
globalPlugins = {
|
|
|
|
|
|
|
|
vue_plugin,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
filetypes = tsserver_filetypes,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vim.lsp.config['vue_ls'] = {
|
|
|
|
|
|
|
|
filetypes = tsserver_filetypes,
|
|
|
|
|
|
|
|
-- capabilities = capabilities,
|
|
|
|
-- capabilities = capabilities,
|
|
|
|
on_attach = on_attach,
|
|
|
|
on_attach = on_attach,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
vim.lsp.enable({ 'vtsls', 'vue_ls' })
|
|
|
|
vim.lsp.enable('volar')
|
|
|
|
|