 
 (use-package rjsx-mode
   :mode ("\\.jsx?\\'" "\\.mjs\\'"))
+
+(use-package polymode
+  :after rjsx-mode
+  :config
+  (define-hostmode poly-rjsx-hostmode nil
+    "RJSX hostmode."
+    :mode 'rjsx-mode)
+  (define-innermode poly-rjsx-graphql-innermode nil
+    :mode 'graphql-mode
+    :head-matcher "graphql\`"
+    :tail-matcher "\`"
+    :head-mode 'host
+    :tail-mode 'host)
+  (define-polymode poly-rjsx-mode
+    :hostmode 'poly-rjsx-hostmode
+    :innermodes '(poly-rjsx-graphql-innermode))
+  (add-to-list 'auto-mode-alist '("\\.jsx?\\'" . poly-rjsx-mode)))
 
 ;; TypeScript
 (use-package typescript-mode

              ("<tab>" . nil)
              ("C-c i" . yas-expand-from-trigger-key)))

(use-package yasnippet-snippets
  :quelpa (yasnippet-snippets
           :fetcher github
           :repo "wyuenho/yasnippet-snippets"
           :branch "refresh-js-snippets"
           :files ("*.el" "snippets" ".nosearch")))

;; No sane person will program from right to left, so turn this major perf
;; bottleneck off


(setq eshell-directory-name (expand-file-name ".eshell/" user-emacs-directory))

;; Markup and config languages
(use-package yaml-mode
  :mode "\\.ya?ml\\'")

