2022-03-31 08:28:43 +01:00
|
|
|
;;; lang/graphql/config.el -*- lexical-binding: t; -*-
|
|
|
|
|
|
|
|
(after! graphql-mode
|
2023-09-14 00:03:55 +01:00
|
|
|
(defface nerd-icons-rhodamine
|
2022-03-31 08:28:43 +01:00
|
|
|
'((t (:foreground "#E10098")))
|
|
|
|
"Face for GraphQL icon."
|
2023-09-14 00:03:55 +01:00
|
|
|
:group 'nerd-icons-faces)
|
2022-08-12 20:29:19 +02:00
|
|
|
(if (modulep! +lsp)
|
2022-03-31 08:28:43 +01:00
|
|
|
(add-hook 'graphql-mode-local-vars-hook #'lsp! 'append)
|
|
|
|
(set-company-backend! 'graphql-mode 'company-graphql))
|
|
|
|
|
|
|
|
(add-hook 'graphql-mode-hook #'rainbow-delimiters-mode)
|
|
|
|
(set-docsets! 'graphql-mode :add "GraphQL Specification")
|
|
|
|
|
|
|
|
(set-electric! 'graphql-mode
|
|
|
|
:chars '(?\} ?\))
|
|
|
|
:words '("or" "and"))
|
|
|
|
|
|
|
|
(set-ligatures! 'graphql-mode
|
|
|
|
:null "null"
|
|
|
|
:true "true" :false "false"
|
|
|
|
:int "Int" :str "String"
|
|
|
|
:float "Float"
|
|
|
|
:bool "Bool"
|
|
|
|
|
|
|
|
:not "not"
|
|
|
|
:and "and" :or "or"))
|
|
|
|
|
|
|
|
(use-package! graphql-doc
|
|
|
|
:after graphql-mode)
|