-
Notifications
You must be signed in to change notification settings - Fork 306
Servers TypeScript
Prabir Shrestha edited this page Sep 18, 2017
·
16 revisions
npm install -g typescript typescript-language-server
Note: tsserver
is required to be in path. If you would like to point to a custom version of tsserver use --tsserver-path <path>
where <path>
is the absolute path of tsserver.
if 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