[graphql] Revise package and config file

Removed obsolete comments
Replaced wrong header in config.el
Add missing progn and fix wrong parenthesis
This commit is contained in:
Maximilian Wolff 2020-11-12 23:06:43 +01:00
parent dd2217b50e
commit 48b1d2fcf9
No known key found for this signature in database
GPG key ID: 2DD07025BFDBD89A
2 changed files with 10 additions and 29 deletions

View file

@ -1,4 +1,4 @@
;;; config.el --- vue layer config file for Spacemacs. -*- lexical-binding: t -*-
;;; config.el --- graphql layer config file for Spacemacs. -*- lexical-binding: t -*-
;;
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
;;

View file

@ -9,26 +9,6 @@
;;
;;; License: GPLv3
;;; Commentary:
;; See the Spacemacs documentation and FAQs for instructions on how to implement
;; a new layer:
;;
;; SPC h SPC layers RET
;;
;;
;; Briefly, each package to be installed or configured by this layer should be
;; added to `graphql-packages'. Then, for each package PACKAGE:
;;
;; - If PACKAGE is not referenced by any other Spacemacs layer, define a
;; function `graphql/init-PACKAGE' to load and initialize the package.
;; - Otherwise, PACKAGE is already referenced by another Spacemacs layer, so
;; define the functions `graphql/pre-init-PACKAGE' and/or
;; `graphql/post-init-PACKAGE' to customize the package as it is loaded.
;;; Code:
(defconst graphql-packages
'(company
prettier-js
@ -38,14 +18,15 @@
(use-package graphql-mode
:defer t
:init
(add-to-list 'spacemacs-jump-handlers-graphql-mode 'ahs-backward-definition))
(when (configuration-layer/layer-used-p 'prettier)
(spacemacs/declare-prefix-for-mode 'graphql-mode "m=" "format"))
(spacemacs/declare-prefix-for-mode 'graphql-mode "mg" "goto")
(spacemacs/set-leader-keys-for-major-mode 'graphql-mode
"s" 'graphql-send-query
"e" 'graphql-select-endpoint
"h" 'graphql-edit-headers))
(progn
(add-to-list 'spacemacs-jump-handlers-graphql-mode 'ahs-backward-definition)
(when (configuration-layer/layer-used-p 'prettier)
(spacemacs/declare-prefix-for-mode 'graphql-mode "m=" "format"))
(spacemacs/declare-prefix-for-mode 'graphql-mode "mg" "goto")
(spacemacs/set-leader-keys-for-major-mode 'graphql-mode
"s" 'graphql-send-query
"e" 'graphql-select-endpoint
"h" 'graphql-edit-headers))))
(defun graphql/post-init-company ()
(spacemacs|add-company-backends