origami 如何自定义代码折叠?

对 elisp 不是特别熟悉 https://github.com/gregsexton/origami.el
虽然他提供了一个实例,但我还是不知道怎么做,不知道有没有大佬能做个示范

 (defun my-amazing-parser (create)
   (lambda (content)
     (list (funcall create beginning-of-the-fold-node-point-position ; inclusive
                           end-of-the-fold-node-point-position ; exclusive
                           offset  ; this allows you to show some of the start of the folded text
                           child-nodes))))

我这里需要缩进 Julia 代码,缩进的块有

  1. function
function name(args ...)
# body
end
  1. begin … end
begin
# body
end
  1. let … end
let
#body
end
  1. if , end
if condition
#body
end
  1. while … end
while condition
# body
end
  1. macro
macro name(args...)
# body
end