[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/graphql-mode 7d954d0045 035/122: Fix font lock to highligh
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/graphql-mode 7d954d0045 035/122: Fix font lock to highlight whole symbols, not just words |
Date: |
Sat, 29 Jan 2022 08:03:31 -0500 (EST) |
branch: elpa/graphql-mode
commit 7d954d00450d7573c5c42f2ef452a01913dc1cd5
Author: David Vazquez Pua <dvazquezpua@deloitte.nl>
Commit: David Vazquez Pua <dvazquezpua@deloitte.nl>
Fix font lock to highlight whole symbols, not just words
The \w+ regex matches word constituents, but for example, _ is a
symbol consistuent but not word constituent.
Replace it with the regex (\_<.*?\_>)
Fix #8
---
graphql-mode.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/graphql-mode.el b/graphql-mode.el
index e56a7bf16e..15da3620af 100644
--- a/graphql-mode.el
+++ b/graphql-mode.el
@@ -122,6 +122,7 @@ response from the server."
(let ((st (make-syntax-table)))
(modify-syntax-entry ?\# "<" st)
(modify-syntax-entry ?\n ">" st)
+ (modify-syntax-entry ?\$ "'" st)
st))
@@ -144,7 +145,7 @@ response from the server."
(defvar graphql-definition-regex
(concat "\\(" (regexp-opt '("type" "input" "interface" "fragment" "query"
"enum")) "\\)"
- "[[:space:]]+\\(\\w+\\)"))
+ "[[:space:]]+\\(\\_<.+?\\_>\\)"))
(defvar graphql-builtin-types
'("Int" "Float" "String" "Boolean" "ID"))
@@ -186,10 +187,10 @@ response from the server."
(defvar graphql-font-lock-keywords
`(
;; Type definition
- ("\\(type\\)[[:space:]]+\\(\\w+\\)"
+ ("\\(type\\)[[:space:]]+\\(\\_<.+?\\_>\\)"
(1 font-lock-keyword-face)
(2 font-lock-function-name-face)
- ("[[:space:]]+\\(implements\\)\\(?:[[:space:]]+\\(\\w+\\)\\)?"
+ ("[[:space:]]+\\(implements\\)\\(?:[[:space:]]+\\(\\_<.+?\\_>\\)\\)?"
nil nil
(1 font-lock-keyword-face)
(2 font-lock-function-name-face)))
- [nongnu] elpa/graphql-mode 0596c4ff84 114/122: Use json-encode instead of json-serialize, (continued)
- [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, 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 <=
- [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
- [nongnu] elpa/graphql-mode ba5952590c 079/122: Merge pull request #22 from cbowdon/master, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 061d6d0b34 001/122: Initial commit, ELPA Syncer, 2022/01/29