Skip to content

Commit

Permalink
feat(Zig): Add more Zig folding rules
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Mar 4, 2024
1 parent b19f6f5 commit de40384
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions ts-fold-parsers.el
Original file line number Diff line number Diff line change
Expand Up @@ -660,8 +660,15 @@

(defun ts-fold-parsers-zig ()
"Rule set for Zig."
'((Block . ts-fold-range-seq)
(line_comment . ts-fold-range-c-like-comment)))
'((ErrorSetDecl . (lambda (node offset)
(ts-fold-range-markers node offset "{")))
(ContainerDecl . (lambda (node offset)
(ts-fold-range-markers node offset "{")))
(SwitchExpr . (lambda (node offset)
(ts-fold-range-markers node offset "{")))
(Block . ts-fold-range-seq)
(InitList . ts-fold-range-seq)
(line_comment . ts-fold-range-c-like-comment)))

(provide 'ts-fold-parsers)
;;; ts-fold-parsers.el ends here

0 comments on commit de40384

Please sign in to comment.