[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/graphql-mode 7eec227135 098/122: Add header edit buffer UI
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/graphql-mode 7eec227135 098/122: Add header edit buffer UI & stubs |
Date: |
Sat, 29 Jan 2022 08:03:38 -0500 (EST) |
branch: elpa/graphql-mode
commit 7eec227135e97968c5edfbc472602259de1e1642
Author: Aleksandar Dimitrov <git@aleks.bg>
Commit: Aleksandar Dimitrov <git@aleks.bg>
Add header edit buffer UI & stubs
---
graphql-mode.el | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/graphql-mode.el b/graphql-mode.el
index 68f0364be2..211ee37255 100644
--- a/graphql-mode.el
+++ b/graphql-mode.el
@@ -153,6 +153,43 @@ Please install it and try again."))
(format "%s?operationName=%s"
url operation)))))))
+(defun graphql-edit-headers ()
+ "Edit graphql request headers interactively in a dedicated buffer.
+
+Open a buffer to edit `graphql-extra-headers'. The contents of this
+buffer take precedence over the setting in `graphql-extra-headers'
+when sending a request."
+ (interactive)
+ (let* ((extra-headers-buffer
+ (concat "*Graphql Headers for " (buffer-file-name
(buffer-base-buffer)) "*")))
+ (pop-to-buffer extra-headers-buffer)
+ (graphql-edit-headers-mode)
+ (when (fboundp 'json-mode)
+ (json-mode))))
+
+(defun graphql-edit-headers-save ()
+ "TODO."
+ (interactive)
+ (message "TODO"))
+
+(defun graphql-edit-headers-abort ()
+ "TODO."
+ (interactive)
+ (message "TODO"))
+
+(define-minor-mode graphql-edit-headers-mode
+ "Minor mode for editing graphql extra headers.
+\\<graphql-mode-map>
+This minor mode is turned on when you edit GraphQL headers
+interactively with `\\[graphql-edit-headers]'."
+ :lighter " GQL Hdr"
+ :keymap (let ((map (make-sparse-keymap)))
+ (define-key map (kbd "C-c C-c") 'graphql-edit-headers-save)
+ (define-key map (kbd "C-c C-k") 'graphql-edit-headers-abort)
+ map)
+ (setq header-line-format (substitute-command-keys "Edit GraphQL query
headers. Save with \
+`\\[graphql-edit-headers-save]' or abort with
`\\[graphql-edit-headers-abort]'")))
+
(defun graphql-beginning-of-query ()
"Move the point to the beginning of the current query."
(interactive)
- [nongnu] elpa/graphql-mode 5bd8b6273e 003/122: fontify more graphql constructions, (continued)
- [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
- [nongnu] elpa/graphql-mode 7eec227135 098/122: Add header edit buffer UI & stubs,
ELPA Syncer <=
- [nongnu] elpa/graphql-mode c3f7b9d827 105/122: Use unique buffer name, not full path, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 1912bd08f5 118/122: Merge pull request #43 from phikal/patch-1, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 80e9ac8020 119/122: Provide a link to what a graphqlconfig file is., ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 5e294e8160 120/122: Fix parameters defined on the same line not always fontified, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode ec3c72cd28 016/122: Support enum definitions, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode ad54fdb48a 022/122: Improve package description, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 66efefd508 027/122: Add customization group and variable to customize indentation level, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode ef2933eb92 020/122: Add autoload cookie to auto-mode-alist setting, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 7d954d0045 035/122: Fix font lock to highlight whole symbols, not just words, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 3c25bf5cbd 040/122: Adapt more regexs to understand _ as part f symbols, ELPA Syncer, 2022/01/29