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" }, + }, + }, + }, + }, +}