Files
sukr/queries/python/injections.scm
Timothy DeHerrera 136be19533 feat(highlight): migrate to tree-house with Helix queries
Replace tree-sitter-highlight dep with tree-house crate from Helix
editor. Add ropey dependency required by tree-house.

Reorganize query files from Helix's runtime/queries/ for all 14
supported languages:
- bash, c, css, go, html, javascript, json, markdown, nix, python,
  rust, toml, typescript, yaml
- Include ecma, _javascript, _typescript base dirs for JS/TS inheritance
- Copy highlights.scm, injections.scm, locals.scm where available

This commit establishes the foundation; highlight.rs implementation
will follow in subsequent commits.
2026-02-04 16:49:04 -07:00

15 lines
599 B
Scheme

((comment) @injection.content
(#set! injection.language "comment"))
; Match all 9 functions in the `re` module from the standard library that
; that takes a regex pattern as first argument.
; https://docs.python.org/3/library/re.html#functions
(call
function: (attribute
object: (identifier) @_module (#eq? @_module "re")
attribute: (identifier) @_function (#any-of? @_function "compile" "search" "match" "fullmatch" "sub" "subn" "findall" "finditer" "split"))
arguments: (argument_list
. (string
(string_content) @injection.content))
(#set! injection.language "regex"))