\newenvironment for custom definitions

Welcome!

You have been misinformed. At least as far as I know.

What you probably mean is that you can define macros, which uses the \define pragma. See the docs for more info.

With that said, there is currently development going on to extend this functionality, see the announcement. I urge you to check this out and ask further questions about how it can integrate with LaTeX because LaTeX is fairly popular here so your use case may be of value to know about.