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
52 stars 9 forks source link

feat: NO-ISSUE allow usage of `comment-region` #12

Closed DamienCassou closed 1 year ago

DamienCassou commented 1 year ago

With this, it is now possible to use M-x comment-region to get the region commented (or uncommented).

purcell commented 1 year ago

This is also present in #7, fwiw, which is blocked due to a pending request for additional font-lock tests.

I'd be fine with this getting merged in the meantime, but I'll leave that choice to Rémi.

DamienCassou commented 1 year ago

Unfortunately, M-x uncomment-region doesn't work. I don't understand why but it seems like it is because (looking-at-p comment-start-skip) returns nil instead of non-nil before a comment.

Maybe we should use a syntax table instead?

DamienCassou commented 1 year ago

I'm closing this PR for now to clean up my todo list. Feel free to reopen when ready to do something about it.