From dcf117a8a60d887a2c2ff9d5617a9c39c5ee95fb Mon Sep 17 00:00:00 2001 From: William Boman Date: Mon, 5 Apr 2021 14:19:07 +0200 Subject: rename Installer to Server for clarity (#3) --- lua/nvim-lsp-installer/servers/graphql.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lua/nvim-lsp-installer/servers/graphql.lua (limited to 'lua/nvim-lsp-installer/servers/graphql.lua') diff --git a/lua/nvim-lsp-installer/servers/graphql.lua b/lua/nvim-lsp-installer/servers/graphql.lua new file mode 100644 index 00000000..1728e81e --- /dev/null +++ b/lua/nvim-lsp-installer/servers/graphql.lua @@ -0,0 +1,16 @@ +local util = require('lspconfig.util') + +local server = require('nvim-lsp-installer.server') + +local root_dir = server.get_server_root_path('graphql') + +return server.Server:new { + name = "graphql", + root_dir = root_dir, + install_cmd = [[npm install graphql-language-service-cli@latest graphql]], + default_options = { + cmd = { root_dir .. "/node_modules/.bin/graphql-lsp", "server", "-m", "stream" }, + filetypes = { 'typescriptreact', 'javascriptreact', 'graphql' }, + root_dir = util.root_pattern('.git', '.graphqlrc'), + }, +} -- cgit v1.2.3-70-g09d2