aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers/graphql/init.lua
blob: d11f77ef71b39918dd7bc5cf51b6abf9dbf8a609 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
local server = require "nvim-lsp-installer.server"
local npm = require "nvim-lsp-installer.installers.npm"

return function(name, root_dir)
    return server.Server:new {
        name = name,
        root_dir = root_dir,
        installer = npm.packages { "graphql-language-service-cli", "graphql" },
        default_options = {
            cmd = { npm.executable(root_dir, "graphql-lsp"), "server", "-m", "stream" },
            filetypes = { "typescriptreact", "javascriptreact", "graphql" },
        },
    }
end