nix-community / nix-ts-mode

An Emacs major mode for editing Nix expressions, powered by tree-sitter [maintainer=@remi-gelinas]
https://github.com/nix-community/nix-ts-mode
Other
50 stars 9 forks source link

feat: NO-ISSUE improve indentation #7

Closed marsam closed 10 months ago

marsam commented 1 year ago

Hi, I added a few rules for indentation and imenu support

purcell commented 1 year ago

Oh, I can't do that myself. :)

remi-gelinas commented 1 year ago

Yes, I have to revisit properly setting up this repo for contributors now that others are taking an interest in its improvement. I'll apply those suggestions and merge it in, here's hoping my new release workflows correctly version bump and release as expected.

remi-gelinas commented 1 year ago

Actually, of course I forgot the most crucial part of this - @marsam , can you add unit tests for the new font-locking you've added here? Just to ensure we have full feature coverage. Assuming you get that in, I'll get this merged.

jsoo1 commented 11 months ago

I'm trying out this mode and I would really like these changes. Though it seems like a few suggested changes are not yet in and the indentation for multiline strings does need to be fixed (indented, not 0).

purcell commented 10 months ago

Hey @marsam, I took the liberty of adding a couple of extra fontification tests in your branch, on your behalf.

@remi-gelinas I think you indicated you'd be happy to merge if those were done? IMO we should get this PR merged so everyone can at least get some basic indentation support.

purcell commented 10 months ago

(Tests passed locally for me, I'll take a look and see why they're failing in CI)

purcell commented 10 months ago

Think I got there. (For some reason the test runs weren't applying the modified treesit-font-lock-level, so the expected fontification wasn't found by the test assertions.)

purcell commented 10 months ago

Taking the liberty of merging this now that the review points have been addressed, so we can move forward with incremental fixes.

remi-gelinas commented 10 months ago

@purcell Yes, thank you for keeping an eye on things! Been a busy work week. I'll keep a closer eye on these now that we have contribution moving forward!