-
Notifications
You must be signed in to change notification settings - Fork 310
Servers TypeScript
Prabir Shrestha edited this page Oct 3, 2017
·
16 revisions
Note: tsserver is searched in workspace node_modules followed by global install. Use -g to install globally.
npm install -g typescript typescript-language-serverif executable('typescript-language-server')
au User lsp_setup call lsp#register_server({
\ 'name': 'typescript-language-server',
\ 'cmd': {server_info->[&shell, &shellcmdflag, 'typescript-language-server --stdio']},
\ 'root_uri':{server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), 'tsconfig.json'))},
\ 'whitelist': ['typescript'],
\ })
endif