aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitsuo Heijo <mitsuo.heijo@gmail.com>2019-12-29 21:42:48 +0900
committerMitsuo Heijo <mitsuo.heijo@gmail.com>2019-12-29 21:42:48 +0900
commitf3d4e807d673d745c2229d82cedbff11f20df124 (patch)
treecc21fb08a208dad4f53503b341f84c702939e223
parentf53792d9192c9a7173d8b758ee26c86d85cbb94b (diff)
downloadvim-lsp-settings-f3d4e807d673d745c2229d82cedbff11f20df124.tar.gz
vim-lsp-settings-f3d4e807d673d745c2229d82cedbff11f20df124.tar.bz2
vim-lsp-settings-f3d4e807d673d745c2229d82cedbff11f20df124.zip
fix: add filetype for react
-rw-r--r--settings.json22
-rw-r--r--settings/typescript-language-server.vim2
2 files changed, 23 insertions, 1 deletions
diff --git a/settings.json b/settings.json
index 7f91f20..c1dd381 100644
--- a/settings.json
+++ b/settings.json
@@ -125,6 +125,20 @@
]
}
],
+ "javascriptreact": [
+ {
+ "command": "typescript-language-server",
+ "requires": [
+ "npm"
+ ]
+ },
+ {
+ "command": "javascript-typescript-stdio",
+ "requires": [
+ "npm"
+ ]
+ }
+ ],
"json": [
{
"command": "json-languageserver",
@@ -275,6 +289,14 @@
]
}
],
+ "typescriptreact": [
+ {
+ "command": "typescript-language-server",
+ "requires": [
+ "npm"
+ ]
+ }
+ ],
"vim": [
{
"command": "vim-language-server",
diff --git a/settings/typescript-language-server.vim b/settings/typescript-language-server.vim
index 438696c..534a151 100644
--- a/settings/typescript-language-server.vim
+++ b/settings/typescript-language-server.vim
@@ -5,7 +5,7 @@ augroup vimlsp_settings_typescript_language_server
\ 'cmd': {server_info->lsp_settings#get('typescript-language-server', 'cmd', [lsp_settings#exec_path('typescript-language-server'), '--stdio', '--tsserver-path', lsp_settings#exec_path('tsserver')])},
\ 'root_uri':{server_info->lsp_settings#get('typescript-language-server', 'root_uri', lsp_settings#root_uri(['.git/', 'package.json']))},
\ 'initialization_options': lsp_settings#get('typescript-language-server', 'initialization_options', {"diagnostics": "true"}),
- \ 'whitelist': lsp_settings#get('typescript-language-server', 'whitelist', ['javascript', 'typescript', 'typescriptreact']),
+ \ 'whitelist': lsp_settings#get('typescript-language-server', 'whitelist', ['javascript', 'javascriptreact', 'typescript', 'typescriptreact']),
\ 'blacklist': lsp_settings#get('typescript-language-server', 'blacklist', []),
\ 'config': lsp_settings#get('typescript-language-server', 'config', {}),
\ 'workspace_config': lsp_settings#get('typescript-language-server', 'workspace_config', {}),