nushell-mode icon indicating copy to clipboard operation
nushell-mode copied to clipboard

How about add indentation?

Open semenInRussia opened this issue 1 year ago • 3 comments

semenInRussia avatar Jun 20 '23 15:06 semenInRussia

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!

mrkkrp avatar Jun 20 '23 16:06 mrkkrp

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.

herbertjones avatar Aug 05 '23 15:08 herbertjones

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).

mrkkrp avatar Aug 06 '23 19:08 mrkkrp