From aeb989151ef047b1b937d5835921956c05fb0ba4 Mon Sep 17 00:00:00 2001 From: Josh Medeski Date: Fri, 1 Sep 2023 10:51:41 -0500 Subject: [PATCH] feat: add graphql lang package --- lua/lazyvim/plugins/extras/lang/graphql.lua | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/lang/graphql.lua diff --git a/lua/lazyvim/plugins/extras/lang/graphql.lua b/lua/lazyvim/plugins/extras/lang/graphql.lua new file mode 100644 index 00000000..11744efc --- /dev/null +++ b/lua/lazyvim/plugins/extras/lang/graphql.lua @@ -0,0 +1,25 @@ +return { + -- add graphql to treesitter + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "graphql" }) + end + end, + }, + + -- correctly setup lspconfig + { + "neovim/nvim-lspconfig", + dependencies = {}, + opts = { + -- make sure mason installs the server + servers = { + graphql = { + filetypes = { "graphql", "typescript", "typescriptreact" }, + }, + }, + }, + }, +}