From 8e6b3313d4b98897bc0a0333f443b1d2d009a476 Mon Sep 17 00:00:00 2001 From: Ati Sharma Date: Thu, 14 May 2026 10:45:51 +0100 Subject: [PATCH] feat: Add syntax highlighting for functools functools is a commonly-imported standard library module in Hy, especially for partial application and decorators. Adds highlighting for common functools names in kebab-case: - partial, lru-cache, cache, cached-property, total-ordering - wraps, update-wrapper, cmp-to-key - singledispatch, singledispatchmethod - partialmethod, recursive-repr Names use kebab-case to match idiomatic Hy style. --- syntax/hy.vim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/syntax/hy.vim b/syntax/hy.vim index fe701d0..a54e55e 100644 --- a/syntax/hy.vim +++ b/syntax/hy.vim @@ -46,6 +46,12 @@ syntax keyword hyPythonBuiltin \ --import-- __import__ --all-- __all__ --doc-- __doc__ --name-- \ __name__ +" Common functools (https://docs.python.org/3/library/functools.html) +syntax keyword hyFunctoolsBuiltin + \ partial lru-cache cache cached-property total-ordering wraps + \ update-wrapper cmp-to-key singledispatch singledispatchmethod + \ partialmethod recursive-repr + syntax keyword hyAsync await syntax keyword hyBoolean True False @@ -226,6 +232,7 @@ highlight default link hyException Type highlight default link hyBuiltin Function highlight default link hyHyruleBuiltin Function highlight default link hyPythonBuiltin Function +highlight default link hyFunctoolsBuiltin Function highlight default link hyAnaphoric Macro highlight default link hyReaderMacro Macro highlight default link hyKeywordMacro Macro