[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/graphql-mode 66efefd508 027/122: Add customization group a
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/graphql-mode 66efefd508 027/122: Add customization group and variable to customize indentation level |
Date: |
Sat, 29 Jan 2022 08:03:30 -0500 (EST) |
branch: elpa/graphql-mode
commit 66efefd508a4e479715ea486ca46e1e3a6318b5d
Author: David Vazquez Pua <dvazquezpua@deloitte.nl>
Commit: David Vazquez Pua <dvazquezpua@deloitte.nl>
Add customization group and variable to customize indentation level
The user now can customize `graphql-indent-level' to change the
indentation level for GraphQL code.
---
graphql-mode.el | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/graphql-mode.el b/graphql-mode.el
index 6b787d956a..c3a281d304 100644
--- a/graphql-mode.el
+++ b/graphql-mode.el
@@ -41,6 +41,20 @@
(require 'url)
(require 'cl-lib)
+
+;;; User Customizations:
+
+(defgroup graphql nil
+ "Major mode for editing GraphQL schemas and queries."
+ :tag "GraphQL"
+ :group 'languages)
+
+(defcustom graphql-indent-level 2
+ "Number of spaces for each indentation step in `graphql-mode'."
+ :type 'integer
+ :safe 'integerp)
+
+
(defvar graphql-url
nil)
(make-variable-buffer-local 'graphql-url)
@@ -121,7 +135,7 @@ response from the server."
(when (looking-at "\\s-*\\s)")
(setq level (1- level)))
- (indent-line-to (* 2 level))
+ (indent-line-to (* graphql-indent-level level))
(setq indent-pos (point))))
(when (< position indent-pos)
- [nongnu] elpa/graphql-mode a20eb1a7cb 100/122: Move code to bottom, (continued)
- [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, 2022/01/29
- [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 <=
- [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
- [nongnu] elpa/graphql-mode 36dc6e6c9d 042/122: Update with David feedback, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode dec32e6441 021/122: Fix package dependencies, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 3ddf204de7 031/122: Add mailmap to merge author lines, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode a37919f2ab 065/122: graphql--query: Remove unused lexical variable, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode cf2622cb21 049/122: Update feedback from David, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode d3aa4d66e0 013/122: Extract constants and values into separate variables, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 1bff11f21c 056/122: fix the line-boundary issue to enhance {} sexp, ELPA Syncer, 2022/01/29