From e806d9a88373822ccc0d434b3df8095fc485483d Mon Sep 17 00:00:00 2001 From: Hirokazu Hata Date: Tue, 24 Dec 2019 14:33:11 +0900 Subject: flow: set package.json #79 --- README.md | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++ lua/nvim_lsp/flow.lua | 1 + 2 files changed, 99 insertions(+) diff --git a/README.md b/README.md index 8b4b9d6e..36cbc83a 100644 --- a/README.md +++ b/README.md @@ -811,6 +811,104 @@ See below for lsp command options. npm run flow lsp -- --help ``` +This server accepts configuration via the `settings` key. +
Available settings: + +- **`flow.coverageSeverity`**: `enum { "error", "warn", "info" }` + + Default: `"info"` + + Type coverage diagnostic severity + +- **`flow.enabled`**: `boolean` + + Default: `true` + + Is flow enabled + +- **`flow.fileExtensions`**: `array` + + Default: `{ ".js", ".mjs", ".jsx", ".flow", ".json" }` + + Array items: `{type = "string"}` + + (Supported only when useLSP: false). File extensions to consider for flow processing + +- **`flow.lazyMode`**: `string` + + Default: `vim.NIL` + + Set value to enable flow lazy mode + +- **`flow.logLevel`**: `enum { "error", "warn", "info", "trace" }` + + Default: `"info"` + + Log level for output panel logs + +- **`flow.pathToFlow`**: `string` + + Default: `"flow"` + + Absolute path to flow binary. Special var ${workspaceFolder} or ${flowconfigDir} can be used in path (NOTE: in windows you can use '/' and can omit '.cmd' in path) + +- **`flow.runOnAllFiles`**: `boolean` + + (Supported only when useLSP: false) Run Flow on all files, No need to put //@flow comment on top of files. + +- **`flow.runOnEdit`**: `boolean` + + Default: `true` + + If true will run flow on every edit, otherwise will run only when changes are saved (Note: 'useLSP: true' only supports syntax errors) + +- **`flow.showStatus`**: `boolean` + + Default: `true` + + (Supported only when useLSP: false) If true will display flow status is the statusbar + +- **`flow.showUncovered`**: `boolean` + + If true will show uncovered code by default + +- **`flow.stopFlowOnExit`**: `boolean` + + Default: `true` + + Stop Flow on Exit + +- **`flow.trace.server`** + + Default: `"off"` + + Traces the communication between VSCode and the flow lsp service. + +- **`flow.useBundledFlow`**: `boolean` + + Default: `true` + + If true will use flow bundled with this plugin if nothing works + +- **`flow.useCodeSnippetOnFunctionSuggest`**: `boolean` + + Default: `true` + + Complete functions with their parameter signature. + +- **`flow.useLSP`**: `boolean` + + Default: `true` + + Turn off to switch from the official Flow Language Server implementation to talking directly to flow. + +- **`flow.useNPMPackagedFlow`**: `boolean` + + Default: `true` + + Support using flow through your node_modules folder, WARNING: Checking this box is a security risk. When you open a project we will immediately run code contained within it. + +
```lua require'nvim_lsp'.flow.setup{} diff --git a/lua/nvim_lsp/flow.lua b/lua/nvim_lsp/flow.lua index 518bd351..ba3f5102 100644 --- a/lua/nvim_lsp/flow.lua +++ b/lua/nvim_lsp/flow.lua @@ -11,6 +11,7 @@ skeleton.flow = { settings = {}; }; docs = { + package_json = "https://raw.githubusercontent.com/flowtype/flow-for-vscode/master/package.json"; description = [[ https://flow.org/ https://github.com/facebook/flow -- cgit v1.2.3-70-g09d2