diff options
| author | Pham Huy Hoang <hoangtun0810@gmail.com> | 2024-01-05 03:19:54 +0900 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2024-01-19 16:58:37 +0100 |
| commit | edee83272efe9b597bc27e8060539cdffa3b12a8 (patch) | |
| tree | 0ee5a346d619b55c932eb87f0a4578d03d4f0116 /queries/python | |
| parent | feat: query formatting script (diff) | |
| download | nvim-treesitter-edee83272efe9b597bc27e8060539cdffa3b12a8.tar nvim-treesitter-edee83272efe9b597bc27e8060539cdffa3b12a8.tar.gz nvim-treesitter-edee83272efe9b597bc27e8060539cdffa3b12a8.tar.bz2 nvim-treesitter-edee83272efe9b597bc27e8060539cdffa3b12a8.tar.lz nvim-treesitter-edee83272efe9b597bc27e8060539cdffa3b12a8.tar.xz nvim-treesitter-edee83272efe9b597bc27e8060539cdffa3b12a8.tar.zst nvim-treesitter-edee83272efe9b597bc27e8060539cdffa3b12a8.zip | |
refactor: manual pre-cleanup
Moving comments, adding `format-ignore` to lines that will be better
with it
Diffstat (limited to 'queries/python')
| -rw-r--r-- | queries/python/highlights.scm | 47 |
1 files changed, 22 insertions, 25 deletions
diff --git a/queries/python/highlights.scm b/queries/python/highlights.scm index 9ba1fcf14..8d272185c 100644 --- a/queries/python/highlights.scm +++ b/queries/python/highlights.scm @@ -17,15 +17,11 @@ (#lua-match? @constant.builtin "^__[a-zA-Z0-9_]*__$")) ((identifier) @constant.builtin - (#any-of? @constant.builtin - ;; https://docs.python.org/3/library/constants.html - "NotImplemented" - "Ellipsis" - "quit" - "exit" - "copyright" - "credits" - "license")) + ; format-ignore + (#any-of? @constant.builtin + ; https://docs.python.org/3/library/constants.html + "NotImplemented" "Ellipsis" + "quit" "exit" "copyright" "credits" "license")) "_" @constant.builtin ; match wildcard @@ -336,22 +332,23 @@ (#any-of? @constructor "__new__" "__init__")) ((identifier) @type.builtin - (#any-of? @type.builtin - ;; https://docs.python.org/3/library/exceptions.html - "BaseException" "Exception" "ArithmeticError" "BufferError" "LookupError" "AssertionError" "AttributeError" - "EOFError" "FloatingPointError" "GeneratorExit" "ImportError" "ModuleNotFoundError" "IndexError" "KeyError" - "KeyboardInterrupt" "MemoryError" "NameError" "NotImplementedError" "OSError" "OverflowError" "RecursionError" - "ReferenceError" "RuntimeError" "StopIteration" "StopAsyncIteration" "SyntaxError" "IndentationError" "TabError" - "SystemError" "SystemExit" "TypeError" "UnboundLocalError" "UnicodeError" "UnicodeEncodeError" "UnicodeDecodeError" - "UnicodeTranslateError" "ValueError" "ZeroDivisionError" "EnvironmentError" "IOError" "WindowsError" - "BlockingIOError" "ChildProcessError" "ConnectionError" "BrokenPipeError" "ConnectionAbortedError" - "ConnectionRefusedError" "ConnectionResetError" "FileExistsError" "FileNotFoundError" "InterruptedError" - "IsADirectoryError" "NotADirectoryError" "PermissionError" "ProcessLookupError" "TimeoutError" "Warning" - "UserWarning" "DeprecationWarning" "PendingDeprecationWarning" "SyntaxWarning" "RuntimeWarning" - "FutureWarning" "ImportWarning" "UnicodeWarning" "BytesWarning" "ResourceWarning" - ;; https://docs.python.org/3/library/stdtypes.html - "bool" "int" "float" "complex" "list" "tuple" "range" "str" - "bytes" "bytearray" "memoryview" "set" "frozenset" "dict" "type" "object")) + ; format-ignore + (#any-of? @type.builtin + ; https://docs.python.org/3/library/exceptions.html + "BaseException" "Exception" "ArithmeticError" "BufferError" "LookupError" "AssertionError" "AttributeError" + "EOFError" "FloatingPointError" "GeneratorExit" "ImportError" "ModuleNotFoundError" "IndexError" "KeyError" + "KeyboardInterrupt" "MemoryError" "NameError" "NotImplementedError" "OSError" "OverflowError" "RecursionError" + "ReferenceError" "RuntimeError" "StopIteration" "StopAsyncIteration" "SyntaxError" "IndentationError" "TabError" + "SystemError" "SystemExit" "TypeError" "UnboundLocalError" "UnicodeError" "UnicodeEncodeError" "UnicodeDecodeError" + "UnicodeTranslateError" "ValueError" "ZeroDivisionError" "EnvironmentError" "IOError" "WindowsError" + "BlockingIOError" "ChildProcessError" "ConnectionError" "BrokenPipeError" "ConnectionAbortedError" + "ConnectionRefusedError" "ConnectionResetError" "FileExistsError" "FileNotFoundError" "InterruptedError" + "IsADirectoryError" "NotADirectoryError" "PermissionError" "ProcessLookupError" "TimeoutError" "Warning" + "UserWarning" "DeprecationWarning" "PendingDeprecationWarning" "SyntaxWarning" "RuntimeWarning" + "FutureWarning" "ImportWarning" "UnicodeWarning" "BytesWarning" "ResourceWarning" + ; https://docs.python.org/3/library/stdtypes.html + "bool" "int" "float" "complex" "list" "tuple" "range" "str" + "bytes" "bytearray" "memoryview" "set" "frozenset" "dict" "type" "object")) ;; Regex from the `re` module |
