-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add elisp support * update queries for some constants
- Loading branch information
Showing
4 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
;; Special forms | ||
[ | ||
"and" | ||
"catch" | ||
"cond" | ||
"condition-case" | ||
"defconst" | ||
"defvar" | ||
"function" | ||
"if" | ||
"interactive" | ||
"lambda" | ||
"let" | ||
"let*" | ||
"or" | ||
"prog1" | ||
"prog2" | ||
"progn" | ||
"quote" | ||
"save-current-buffer" | ||
"save-excursion" | ||
"save-restriction" | ||
"setq" | ||
"setq-default" | ||
"unwind-protect" | ||
"while" | ||
] @keyword | ||
|
||
;; Function definitions | ||
[ | ||
"defun" | ||
"defsubst" | ||
] @keyword | ||
(function_definition name: (symbol) @function) | ||
(function_definition parameters: (list (symbol) @variable.parameter)) | ||
(function_definition docstring: (string) @comment) | ||
|
||
;; Highlight macro definitions the same way as function definitions. | ||
"defmacro" @keyword | ||
(macro_definition name: (symbol) @function) | ||
(macro_definition parameters: (list (symbol) @variable.parameter)) | ||
(macro_definition docstring: (string) @comment) | ||
|
||
(comment) @comment | ||
|
||
(integer) @constant.numeric.integer | ||
(float) @constant.numeric.float | ||
(char) @constant.character | ||
|
||
(string) @string | ||
|
||
[ | ||
"(" | ||
")" | ||
"#[" | ||
"[" | ||
"]" | ||
] @punctuation.bracket | ||
|
||
[ | ||
"`" | ||
"#'" | ||
"'" | ||
"," | ||
",@" | ||
] @operator | ||
|
||
;; Highlight nil and t as constants, unlike other symbols | ||
[ | ||
"nil" | ||
"t" | ||
] @constant.builtin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
;; defun/defsubst | ||
(function_definition name: (symbol) @name) @definition.function | ||
|
||
;; Treat macros as function definitions for the sake of TAGS. | ||
(macro_definition name: (symbol) @name) @definition.function |