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 js-ts-mode and typescript-ts-mode #1174

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

akreisher
Copy link
Contributor

Adds the new Emacs 29+ js-ts-mode and typescript/tsx-ts-mode to the configs for smartparent-javascript.

I also added tsx-ts-mode to sp--html-modes which should address #1168.

@@ -148,7 +148,7 @@ ID, ACTION, CONTEXT."
(eval-after-load 'tuareg '(require 'smartparens-ml))
(eval-after-load 'fsharp-mode '(require 'smartparens-ml))
(eval-after-load 'unisonlang-mode '(require 'smartparens-unison))
(--each '(js js2-mode)
(--each '(js js2-mode typescript-ts-mode)
Copy link
Owner

Choose a reason for hiding this comment

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

we should probably add js-ts-mode here as well then? Since you added it to the config.

Copy link
Contributor Author

@akreisher akreisher Oct 23, 2023

Choose a reason for hiding this comment

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

js-ts-mode is provided in js.el, so I believe just including js here should be sufficient for both js-mode and js-ts-mode (since I believe this form expects package names for eval-after-load, not mode symbols). typescript-ts-mode on the other hand is in its own package (typescript-ts-mode.el) and so needs its own entry here.

I believe the same applies for python. This line:
https://github.com/fuco1/smartparens/blob/96fccc0816093aaad4b904a20802ec306c6da420/smartparens-config.el#L135-L136

could probably just be:

(eval-after-load 'python                   '(require 'smartparens-python))

since both python-mode and python-ts-mode are defined in python.el.

Copy link
Owner

Choose a reason for hiding this comment

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

right, good catch!

@Fuco1 Fuco1 merged commit 0778a8a into Fuco1:master Oct 24, 2023
@Fuco1
Copy link
Owner

Fuco1 commented Oct 24, 2023

Thanks!

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.

2 participants