mrkkrp / nushell-mode

Emacs major mode for Nushell scripts
GNU General Public License v3.0
42 stars 8 forks source link

How about add indentation? #11

Open semenInRussia opened 1 year ago

mrkkrp commented 1 year ago

It is certainly something that will come at some point, depending on how much time I will have in the coming months. PRs are also welcome!

herbertjones commented 1 year ago

I took the opportunity to attempt adding this feature today. After attempting to use SMIE and indent function, I decided that utilizing the new tree-sitter feature from Emacs 29 would be.. much less work.

In imitation of how the new "*-ts-mode" Emacs 29 packages are handling this, I created a new repository. Apologies for this.

You can find the repository here. I just threw it together today, so it's not well tested yet, but could be a good start if you want to integrate into this package or combine them.

mrkkrp commented 1 year ago

Hey @herbertjones, thanks for the link! Using tree-sitter does indeed seem very promising. I did not know that support for it was added to Emacs. My reservation about using this approach for now would be the fact that Emacs 29.1 is still very new and not everyone has switched to it. But in year or so I frankly don't see a reason not to switch to the tree-sitter-based approach completely (or even deprecating this package in favor of yours).