Skip to content
Permalink
Browse files

feat(lsp): add setting to support flow lazyMode.

  • Loading branch information...
Mayank1791989 committed Feb 15, 2019
1 parent fe84db2 commit 9c1440068f8faee95e487fc9f69b5f5ffed64bf1
Showing with 13 additions and 0 deletions.
  1. +4 −0 README.md
  2. +2 −0 lib/flowLSP/FlowLanguageClient/FlowLanguageClient.js
  3. +1 −0 lib/flowLSP/handlers.js
  4. +6 −0 package.json
@@ -52,6 +52,10 @@ You can specify a configuration by amending the VS Code `settings.json` file. Ac

> **Note:** Only supported when useLSP: true.
* `flow.lazyMode` (default: null): to support flow [lazyMode](https://flow.org/en/docs/lang/lazy-modes/)

> **Note:** Only supported when useLSP: true.
* `flow.stopFlowOnExit` (default: true) stop flow server on exit from Project.

* `flow.runOnEdit` (default: true) If `true` will run flow on every edit, otherwise will run only when changes are saved.
@@ -20,6 +20,7 @@ type Config = {|
useBundledFlow: boolean,
stopFlowOnExit: boolean,
liveSyntaxErrors: boolean,
lazyMode: string | null,
logLevel: LogLevel,
coverage: {|
showUncovered: boolean,
@@ -156,6 +157,7 @@ export default class FlowLanguageClient {
args: [
'lsp',
...['--from', 'vscode'],
...(config.lazyMode ? ['--lazy-mode', config.lazyMode] : []),
// auto stop flow process
config.stopFlowOnExit ? '--autostop' : null,
].filter(Boolean),
@@ -112,6 +112,7 @@ export function onDidOpenTextDocument(
stopFlowOnExit: pluginConfig.get('stopFlowOnExit'),
liveSyntaxErrors: pluginConfig.get('runOnEdit'),
logLevel: pluginConfig.get('logLevel'),
lazyMode: pluginConfig.get('lazyMode'),
coverage: {
showUncovered: pluginConfig.get('showUncovered'),
diagnosticSeverity: toDiagnosticSeverity(
@@ -65,6 +65,12 @@
"default": "info",
"description": "Type coverage diagnostic severity"
},
"flow.lazyMode": {
"scope": "resource",
"type": "string",
"default": null,
"description": "Set value to enable flow lazy mode"
},
"flow.stopFlowOnExit": {
"scope": "resource",
"type": "boolean",

0 comments on commit 9c14400

Please sign in to comment.
You can’t perform that action at this time.