For example, ruby-mode used smie-setup that sets buffer-local show-paren-data-function. This patch does the same for ts-modes: when point at the start/end of the sexp list, then both "def" and "end" are highlighted as opening and closing nodes: def method puts "This is method definition" end-!- This also indicates that implementing 'down-list' to move after the opening node will be the right thing to do (currently in progress).