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/starlark | |
| 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/starlark')
| -rw-r--r-- | queries/starlark/highlights.scm | 62 |
1 files changed, 30 insertions, 32 deletions
diff --git a/queries/starlark/highlights.scm b/queries/starlark/highlights.scm index 8d99963d5..9707632a5 100644 --- a/queries/starlark/highlights.scm +++ b/queries/starlark/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")) ((attribute attribute: (identifier) @variable.member) @@ -64,13 +60,14 @@ ;; Builtin functions ((call function: (identifier) @function.builtin) - (#any-of? @function.builtin - "abs" "all" "any" "ascii" "bin" "bool" "breakpoint" "bytearray" "bytes" "callable" "chr" "classmethod" - "compile" "complex" "delattr" "dict" "dir" "divmod" "enumerate" "eval" "exec" "fail" "filter" "float" "format" - "frozenset" "getattr" "globals" "hasattr" "hash" "help" "hex" "id" "input" "int" "isinstance" "issubclass" - "iter" "len" "list" "locals" "map" "max" "memoryview" "min" "next" "object" "oct" "open" "ord" "pow" - "print" "property" "range" "repr" "reversed" "round" "set" "setattr" "slice" "sorted" "staticmethod" "str" - "struct" "sum" "super" "tuple" "type" "vars" "zip" "__import__")) + ; format-ignore + (#any-of? @function.builtin + "abs" "all" "any" "ascii" "bin" "bool" "breakpoint" "bytearray" "bytes" "callable" "chr" "classmethod" + "compile" "complex" "delattr" "dict" "dir" "divmod" "enumerate" "eval" "exec" "fail" "filter" "float" "format" + "frozenset" "getattr" "globals" "hasattr" "hash" "help" "hex" "id" "input" "int" "isinstance" "issubclass" + "iter" "len" "list" "locals" "map" "max" "memoryview" "min" "next" "object" "oct" "open" "ord" "pow" + "print" "property" "range" "repr" "reversed" "round" "set" "setattr" "slice" "sorted" "staticmethod" "str" + "struct" "sum" "super" "tuple" "type" "vars" "zip" "__import__")) ;; Function definitions (function_definition @@ -89,22 +86,23 @@ (#eq? @_isinstance "isinstance")) ((identifier) @type.builtin - (#any-of? @type.builtin - ;; https://docs.python.org/3/library/exceptions.html - "ArithmeticError" "BufferError" "LookupError" "AssertionError" "AttributeError" - "EOFError" "FloatingPointError" "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" "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")) + ; format-ignore + (#any-of? @type.builtin + ; https://docs.python.org/3/library/exceptions.html + "ArithmeticError" "BufferError" "LookupError" "AssertionError" "AttributeError" + "EOFError" "FloatingPointError" "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" "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")) ;; Normal parameters (parameters |
