aboutsummaryrefslogtreecommitdiff
path: root/settings
diff options
context:
space:
mode:
authorYasuhiro Matsumoto <mattn.jp@gmail.com>2019-12-16 09:35:24 +0900
committerYasuhiro Matsumoto <mattn.jp@gmail.com>2019-12-16 09:35:24 +0900
commite467a154ae75e5a9b0f6c4d5890772517c052695 (patch)
tree17ea329356b438c68e7db8db6eef2aebf3169d6e /settings
parent46a813f53f3149bffb3efb1a2706a127a878f8ea (diff)
downloadvim-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.vim13
-rw-r--r--settings/typescript-language-server.vim2
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']),