From ddcd9e6aae50d6397e43e4fc9ba0cf7a82cc79de Mon Sep 17 00:00:00 2001 From: Hirokazu Hata Date: Sun, 6 Sep 2020 17:49:21 +0900 Subject: Rename nvim_lsp to lspconfig --- lua/lspconfig/flow.lua | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 lua/lspconfig/flow.lua (limited to 'lua/lspconfig/flow.lua') diff --git a/lua/lspconfig/flow.lua b/lua/lspconfig/flow.lua new file mode 100644 index 00000000..5e0abab3 --- /dev/null +++ b/lua/lspconfig/flow.lua @@ -0,0 +1,30 @@ +local configs = require 'lspconfig/configs' +local util = require 'lspconfig/util' + +configs.flow = { + default_config = { + cmd = {"npx", "--no-install", "flow","lsp"}; + filetypes = {"javascript", "javascriptreact", "javascript.jsx"}; + root_dir = util.root_pattern(".flowconfig"); + }; + docs = { + package_json = "https://raw.githubusercontent.com/flowtype/flow-for-vscode/master/package.json"; + description = [[ +https://flow.org/ +https://github.com/facebook/flow + +See below for how to setup Flow itself. +https://flow.org/en/docs/install/ + +See below for lsp command options. + +```sh +npx flow lsp --help +``` + ]]; + default_config = { + root_dir = [[root_pattern(".flowconfig")]]; + }; + }; +}; +-- vim:et ts=2 sw=2 -- cgit v1.2.3-70-g09d2