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 support for clojure-ts-mode #1185

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kommen
Copy link

@kommen kommen commented Feb 4, 2024

clojure-ts-mode is developed as a distinct alternative to clojure-mode, as discussed here: clojure-emacs/clojure-mode#640 (comment)

@kommen kommen marked this pull request as draft February 13, 2024 07:03
@kommen
Copy link
Author

kommen commented Feb 13, 2024

Marking as draft until this is resolved: clojure-emacs/clojure-ts-mode#36

@bbatsov
Copy link
Contributor

bbatsov commented Feb 13, 2024

Hmm, do we even need to iterate the derived modes if there's no special smartparens configuration for them? Seems excessive to me. Perhaps the legacy config is from the days before all modes were folded in clojure-mode?

@kommen
Copy link
Author

kommen commented Feb 13, 2024

@bbatsov thanks for the feedback. I can give it a try in the next days without all the derived modes.

@kommen kommen marked this pull request as ready for review February 13, 2024 21:31
@kommen
Copy link
Author

kommen commented Feb 13, 2024

I removed all the derived modes. As far as I can tell, everything works fine in buffers using the derived modes.

@kommen kommen changed the title Add support for clojure-ts-mode (and its derived modes) Add support for clojure-ts-mode Feb 14, 2024
smartparens.el Outdated
Comment on lines 565 to 567
clojurec-mode
clojurescript-mode
clojurex-mode
Copy link
Owner

Choose a reason for hiding this comment

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

This needs to stay there because sp-list-modes is checked literally not taking into account how modes derive from one another.

The question is whether it should, but right now it doesn't, so this will actually remove these modes from being marked as "lisp" modes.

@@ -44,7 +44,7 @@
(defvar sp-clojure-prefix "\\(?:[@`'#~,_?^]+\\)"
"Prefix used in `sp-sexp-prefix' for clojure modes.")

(dolist (mode '(clojure-mode clojurescript-mode clojurec-mode cider-repl-mode))
Copy link
Owner

Choose a reason for hiding this comment

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

This sp-sexp-prefix setting takes the modes literally, not taking into account how modes derive from one another. So removing them here will break things unfortunatelly.

@kommen
Copy link
Author

kommen commented Apr 21, 2024

@Fuco1 I have reverted the commit which removed the modes from the lists. Would you prefer me to force push it out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In review
Development

Successfully merging this pull request may close these issues.

None yet

3 participants