A tree-sitter grammar supporting Python docstrings.
Inspired by tree-sitter/tree-sitter-python#251
Configure your editor using injections, required for Python and Pydoc.
; ~/.config/helix/runtime/queries/python/injections.scm
(expression_statement
(string
(string_start)
(string_content) @injection.content
(string_end))
(#set! injection.language "pydoc"))
; ~/.config/helix/runtime/queries/pydoc/injections.scm
(docstring
(statement
(statement_content) @injection.content)
(#set! injection.language "python"))
(docstring
(statement
(statement_result) @injection.content)
(#set! injection.language "python"))