Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: font lock updates #111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 32 additions & 18 deletions hy-font-lock.el
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@
"max"
"memoryview"
"min"
"match"
"next"
"object"
"oct"
Expand Down Expand Up @@ -219,17 +220,25 @@

(defconst hy-font-lock--exceptions
'("ArithmeticError" "AssertionError" "AttributeError" "BaseException"
"DeprecationWarning" "EOFError" "EnvironmentError" "Exception"
"FloatingPointError" "FutureWarning" "GeneratorExit" "IOError" "ImportError"
"ImportWarning" "IndexError" "KeyError" "KeyboardInterrupt" "LookupError"
"MemoryError" "NameError" "NotImplementedError" "OSError" "OverflowError"
"PendingDeprecationWarning" "ReferenceError" "RuntimeError" "RuntimeWarning"
"StopIteration" "SyntaxError" "SyntaxWarning" "SystemError" "SystemExit"
"TypeError" "UnboundLocalError" "UnicodeDecodeError" "UnicodeEncodeError"
"UnicodeError" "UnicodeTranslateError" "UnicodeWarning" "UserWarning"
"VMSError" "ValueError" "Warning" "WindowsError" "ZeroDivisionError"
"BufferError" "BytesWarning" "IndentationError" "ResourceWarning"
"TabError")
"BufferError" "BytesWarning" "DeprecationWarning" "EOFError"
"EnvironmentError" "Exception" "FloatingPointError" "FutureWarning"
"GeneratorExit" "IOError" "ImportError" "ImportWarning"
"IndentationError" "IndexError" "KeyError" "KeyboardInterrupt"
"LookupError" "MemoryError" "NameError" "NotImplementedError"
"OSError" "OverflowError" "PendingDeprecationWarning"
"ReferenceError" "RuntimeError" "RuntimeWarning" "StopIteration"
"SyntaxError" "SyntaxWarning" "SystemError" "SystemExit" "TabError"
"TypeError" "UnboundLocalError" "UnicodeDecodeError"
"UnicodeEncodeError" "UnicodeError" "UnicodeTranslateError"
"UnicodeWarning" "UserWarning" "ValueError" "Warning"
"ZeroDivisionError"
"BlockingIOError" "BrokenPipeError" "ChildProcessError"
"ConnectionAbortedError" "ConnectionError" "ConnectionRefusedError"
"ConnectionResetError" "FileExistsError" "FileNotFoundError"
"InterruptedError" "IsADirectoryError" "NotADirectoryError"
"PermissionError" "ProcessLookupError" "RecursionError"
"ResourceWarning" "StopAsyncIteration" "TimeoutError"
"VMSError" "WindowsError")
"Exception and error names.")

;;;; Definitions
Expand All @@ -240,15 +249,16 @@

;; Macros
"defmacro" "defmacro/g!" "defmacro!"
"delmacro"

;; Tag Macros
"deftag"
;; Reader Macros
"defreader"

;; Defining __main__
"defmain"

;; Multi-methods
"defmulti" "defmethod")
;; Defining lazy sequences
"defseq")
"Names in Hy that define functions, macros, etc.")

;;;; Operators
Expand All @@ -264,7 +274,7 @@
(defconst hy-font-lock--special-names
'(;; Looping
"for" "for/a"
"dfor" "lfor" "sfor" ; comprehensions
"dfor" "lfor" "sfor" "gfor" "cfor" ; comprehensions
"loop" "recur" ; hy.contrib.loop

;; Threading
Expand All @@ -277,6 +287,8 @@
"break" "continue" "while"
"cond"
"do"
"case" "branch"
"ecase" "ebranch"

;; Functional
"fn" "fn/a"
Expand All @@ -286,7 +298,7 @@
"with-gensyms"

;; Error Handling
"except" "try" "throw" "raise" "catch" "finally" "assert"
"except" "try" "throw" "raise" "finally" "assert"

;; Python builtins (and shadowed calls to builtins)
"print"
Expand All @@ -313,7 +325,9 @@
"ap-map"
"ap-map-when"
"ap-reduce"
"ap-reject")
"ap-reject"
"ap-when"
"ap-with")
"Hy anaphoric contrib keywords.")

;;; Keywords
Expand Down