[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/graphql-mode 16c3d63521 002/122: First commit
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/graphql-mode 16c3d63521 002/122: First commit |
Date: |
Sat, 29 Jan 2022 08:03:25 -0500 (EST) |
branch: elpa/graphql-mode
commit 16c3d635215f0d0542b0cf130c95d418c67c3c39
Author: David Vazquez Pua <davazp@gmail.com>
Commit: David Vazquez Pua <davazp@gmail.com>
First commit
---
README.md | 4 ++++
graphql.el | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 62 insertions(+)
diff --git a/README.md b/README.md
new file mode 100644
index 0000000000..83dd721479
--- /dev/null
+++ b/README.md
@@ -0,0 +1,4 @@
+graphql-mode
+============
+
+`graphql-mode` is an emacs mode to edit GraphQL schema and queries.
diff --git a/graphql.el b/graphql.el
new file mode 100644
index 0000000000..d3ace6f844
--- /dev/null
+++ b/graphql.el
@@ -0,0 +1,58 @@
+;;; graphql.el --- An Emacs mode for GraphQL -*- lexical-binding: t;
-*-
+
+;; Copyright (C) 2016 David Vazquez Pua
+
+;; Author: David Vazquez Pua <davazp@gmail.com>
+;; Keywords: languages
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;
+
+;;; Code:
+
+(require 'newcomment)
+
+(defvar graphql-mode-syntax-table
+ (let ((st (make-syntax-table)))
+ (modify-syntax-entry ?\" "\"" st)
+ (modify-syntax-entry ?\# "<" st)
+ (modify-syntax-entry ?\n ">" st)
+ st))
+
+(defvar graphql-font-lock-keywords
+ (list (regexp-opt (list "type" "fragment"))
+
+ (cons (regexp-opt (list "true" "false" "null"))
+ 'font-lock-constant-face)
+
+ '("\\$\\w+" . font-lock-variable-name-face)))
+
+(define-derived-mode graphql-mode prog-mode "GraphQL"
+ ""
+ (setq-local comment-start "# ")
+ (setq-local comment-start-skip "#+[\t ]*")
+ (setq font-lock-defaults
+ (list 'graphql-font-lock-keywords
+ nil
+ nil
+ nil)))
+
+(add-to-list 'auto-mode-alist '("\\.graphql\\'" . graphql-mode))
+
+
+(provide 'graphql)
+;;; graphql.el ends here
- [nongnu] elpa/graphql-mode de4b2e8117 039/122: Remember graphql-url value only if the query is successful, (continued)
- [nongnu] elpa/graphql-mode de4b2e8117 039/122: Remember graphql-url value only if the query is successful, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode ead2f85e12 047/122: add error handling, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 22cb9d4594 071/122: Support customizing the headers sent with the request, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 1210279ff4 063/122: Add keywords only completion, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 4bb868832f 078/122: Avoid double-encoding variables in JSON, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode a665c9514a 054/122: fix docstring, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 4c87cdab57 018/122: Fix: make the graphql-url buffer-local before the mode is enabled, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 319dfd97d7 011/122: Define graphql-send-query, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode eed3c6ca1c 036/122: Create sample GraphQL server, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 404aa31258 104/122: Save json to graphql-edit-headers, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 16c3d63521 002/122: First commit,
ELPA Syncer <=
- [nongnu] elpa/graphql-mode 5bd8b6273e 003/122: fontify more graphql constructions, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode bf0412def0 006/122: Better fontification of type [implements X]?, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 1f3bd34b18 064/122: Merge pull request #14 from davazp/next, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode b1aea740ac 052/122: Some fixes to the support of variables, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode e254c7405d 037/122: graphql-send-query uses the whole buffer, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 03312c9f1c 045/122: add variables file support, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 09669d4343 089/122: Merge pull request #28 from charles-boyd/enhancement/add-missing-graphql-keywords, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode a20eb1a7cb 100/122: Move code to bottom, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode ed589f3cd1 102/122: Simplify buffer killing, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 0596c4ff84 114/122: Use json-encode instead of json-serialize, ELPA Syncer, 2022/01/29