* Add flow

* Add flow
This commit is contained in:
Shinya Ohyanagi
2021-03-27 23:49:16 +09:00
committed by GitHub
parent e0269b5f67
commit d9b0e91880
5 changed files with 47 additions and 0 deletions

View File

@@ -112,6 +112,7 @@ Because there is no way to update a server, please run `:LspInstallServer` again
| JavaScript | typescript-language-server | Yes | Yes |
| JavaScript | javascript-typescript-stdio | Yes | Yes |
| JavaScript | rome | Yes | Yes |
| JavaScript | flow | Yes | Yes |
| JavaScript | eslint-language-server | Yes | Yes |
| Julia | LanguageServer.jl | Yes | No |
| Java | java-language-server | No | No |
@@ -173,6 +174,10 @@ If you installed rls already, you can use rls without configurations. But if you
To use deno, `node_modules` should **not** located on the project directory.
### flow (JavaScript)
To use flow, the `.flowconfig` has to be located on the top of project directory.
### graphql-language-service-cli(GraphQL)
To use graphql-language-service-cli, the [GraphQL Config](https://graphql-config.com/introduction#examples) has to be located on the top of project directory. The schema must be pointed to the schema file correctly.

View File

@@ -0,0 +1,3 @@
@echo off
call "%~dp0\npm_install.cmd" flow flow-bin

5
installer/install-flow.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -e
"$(dirname "$0")/npm_install.sh" flow flow-bin

View File

@@ -460,6 +460,16 @@
"requires": [
"cargo"
]
},
{
"command": "flow",
"requires": [
"npm"
],
"root_uri_patterns": [
"package.json",
".flowconfig"
]
}
],
"javascriptreact": [
@@ -496,6 +506,16 @@
{
"command": "deno",
"requires": []
},
{
"command": "flow",
"requires": [
"npm"
],
"root_uri_patterns": [
"package.json",
".flowconfig"
]
}
],
"json": [

14
settings/flow.vim Normal file
View File

@@ -0,0 +1,14 @@
augroup vim_lsp_settings_flow
au!
LspRegisterServer {
\ 'name': 'flow',
\ 'cmd': {server_info->lsp_settings#get('node', 'cmd', [lsp_settings#exec_path('flow'), 'lsp'])},
\ 'root_uri': {server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), '.flowconfig'))},
\ 'initialization_options': lsp_settings#get('flow', 'initialization_options', {}),
\ 'allowlist': lsp_settings#get('flow', 'allowlist', ['javascript', 'javascriptreact']),
\ 'blocklist': lsp_settings#get('flow', 'blocklist', []),
\ 'config': lsp_settings#get('flow', 'config', {}),
\ 'workspace_config': lsp_settings#get('flow', 'workspace_config', {}),
\ 'semantic_highlight': lsp_settings#get('flow', 'semantic_highlight', {}),
\}
augroup END