diff options
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2019-12-16 09:35:24 +0900 |
---|---|---|
committer | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2019-12-16 09:35:24 +0900 |
commit | e467a154ae75e5a9b0f6c4d5890772517c052695 (patch) | |
tree | 17ea329356b438c68e7db8db6eef2aebf3169d6e /settings | |
parent | 46a813f53f3149bffb3efb1a2706a127a878f8ea (diff) | |
download | vim-lsp-settings-e467a154ae75e5a9b0f6c4d5890772517c052695.tar.gz vim-lsp-settings-e467a154ae75e5a9b0f6c4d5890772517c052695.tar.bz2 vim-lsp-settings-e467a154ae75e5a9b0f6c4d5890772517c052695.zip |
Fix script
Diffstat (limited to 'settings')
-rw-r--r-- | settings/javascript-typescript-langserver.vim | 13 | ||||
-rw-r--r-- | settings/typescript-language-server.vim | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/settings/javascript-typescript-langserver.vim b/settings/javascript-typescript-langserver.vim new file mode 100644 index 0000000..e9a5ea6 --- /dev/null +++ b/settings/javascript-typescript-langserver.vim @@ -0,0 +1,13 @@ +augroup vimlsp_settings_javascript_typescript_langserver + au! + autocmd User lsp_setup call lsp#register_server({ + \ 'name': 'javascript-typescript-langserver', + \ 'cmd': lsp_settings#get('javascript-typescript-langserver', 'cmd', {server_info->[lsp_settings#exec_path('javascript-typescript-langserver'), '--stdio']}), + \ 'root_uri':{server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), 'tsconfig.json'))}, + \ 'initialization_options': lsp_settings#get('javascript-typescript-langserver', 'initialization_options', {"diagnostics": "true"}), + \ 'whitelist': lsp_settings#get('javascript-typescript-langserver', 'whitelist', ['typescript', 'typescript.tsx']), + \ 'blacklist': lsp_settings#get('javascript-typescript-langserver', 'blacklist', []), + \ 'config': lsp_settings#get('javascript-typescript-langserver', 'config', {}), + \ 'workspace_config': lsp_settings#get('javascript-typescript-langserver', 'workspace_config', {}), + \ }) +augroup END diff --git a/settings/typescript-language-server.vim b/settings/typescript-language-server.vim index ab7009d..f9bb5f1 100644 --- a/settings/typescript-language-server.vim +++ b/settings/typescript-language-server.vim @@ -2,7 +2,7 @@ augroup vimlsp_settings_typescript_language_server au! autocmd User lsp_setup call lsp#register_server({ \ 'name': 'typescript-language-server', - \ 'cmd': lsp_settings#get('typescript-language-server', {server_info->[lsp_settings#exec_path('typescript-language-server'), '--stdio']}), + \ 'cmd': lsp_settings#get('typescript-language-server', 'cmd', {server_info->[lsp_settings#exec_path('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'))}, \ 'initialization_options': lsp_settings#get('typescript-language-server', 'initialization_options', {"diagnostics": "true"}), \ 'whitelist': lsp_settings#get('typescript-language-server', 'whitelist', ['typescript', 'typescript.tsx']), |