Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clojure-ts-toplevel-inside-comment-form #31

Merged
merged 2 commits into from
Feb 7, 2024

Conversation

kommen
Copy link
Contributor

@kommen kommen commented Feb 3, 2024

Fixes #30

clojure-ts-toplevel-inside-comment-form is the equivalent to clojure-toplevel-inside-comment-form in clojure-mode. Defaults to nil so no change in behavior by default.

This change makes use of treesit-defun-type-regexps ability to use (REGEXP . PRED) cons cells to reject comment as a defun if clojure-ts-toplevel-inside-comment-form is enabled.

Fixes clojure-emacs#30

This is the equivalent to clojure-toplevel-inside-comment-form in clojure-mode
@bbatsov
Copy link
Member

bbatsov commented Feb 7, 2024

I like the proposed change. I'd suggest mentioning in the README as well, so it'd be easier for users to discover it.

"Eval top level forms inside comment forms instead of the comment form itself."
:type 'boolean
:safe #'booleanp
:package-version '(clojure-ts-mode . "0.3.0"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're too fast. After I wrote my remark I remembered that this package used a different versioning from what I normally do. :D "0.2.1" would be better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, reverted :)

@kommen kommen force-pushed the defun-inside-comment-form branch from 5d71824 to 090867e Compare February 7, 2024 18:54
@bbatsov
Copy link
Member

bbatsov commented Feb 7, 2024

@kommen
Copy link
Contributor Author

kommen commented Feb 7, 2024

@bbatsov is ddc6696 enough?

@bbatsov bbatsov merged commit 5c52695 into clojure-emacs:main Feb 7, 2024
@bbatsov
Copy link
Member

bbatsov commented Feb 7, 2024

Yeah, that's enough. Thanks!

@kommen kommen deleted the defun-inside-comment-form branch February 7, 2024 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support equivalent of clojure-toplevel-inside-comment-form
2 participants