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 python-ts-mode #2015

Merged
merged 2 commits into from
Aug 3, 2023
Merged

Conversation

gmlarumbe
Copy link
Contributor

PR Summary

elpy-mode requires current major-mode be a derived mode of python-mode. Emacs 29 bundles python-mode and python-ts-mode as derived modes of python-base-mode. This PR allows elpy to also be used with python-ts-mode.

PR checklist

  • Commits respect our guidelines
  • Tests are passing properly (could not test it locally)

@gopar
Copy link
Collaborator

gopar commented May 22, 2023

How long have you been testing this? I don't use python-ts-mode so not sure if it breaks anything (highly unlikely though)but want to make sure it'll still be stable.

@gmlarumbe
Copy link
Contributor Author

How long have you been testing this?

Just a couple of days. It seems to work fine but I can test it a bit more.

@gopar
Copy link
Collaborator

gopar commented May 23, 2023

Just a couple of days. It seems to work fine but I can test it a bit more.

Yeah lets test for a ~month, to be on the conservative side.
Appreciate the PR

@gopar
Copy link
Collaborator

gopar commented Jul 19, 2023

Any issues @gmlarumbe ?
If not, i'll merge

@coveralls
Copy link

coveralls commented Jul 21, 2023

Coverage Status

coverage: 90.96%. remained the same when pulling 7826d18 on gmlarumbe:master into 243623c on jorgenschaefer:master.

@gmlarumbe
Copy link
Contributor Author

Hi @gomar,

I did not have much time to test it extensively. However it seems to work fine with both Emacs bundled python-mode and python-ts-mode, both derived from python-base-mode. I have not tried with MELPA python-mode but I assume it will work fine.

I also added a symlink for the yasnippet snippets of python-base-mode so that these could be used with python-ts-mode. I am not sure know how this is handled in Windows environments though.

@gopar
Copy link
Collaborator

gopar commented Jul 21, 2023

I also added a symlink for the yasnippet snippets of python-base-mode so that these could be used with python-ts-mode. I am not sure know how this is handled in Windows environments though.

I believe the correct way is to add .yas-parents and put python-mode in it.

@gmlarumbe
Copy link
Contributor Author

Hi @gopar ,

The .yas-parents for python-ts-mode in last force-push seems to work fine.

I also changed the enabling of elpy for python-ts-mode instead of for python-base-mode which in the end has the same effect.

@gopar
Copy link
Collaborator

gopar commented Aug 3, 2023

Merging. Not sure why the tests are failing there, but it should be unrelated

@gopar gopar merged commit 7ff8ffa into jorgenschaefer:master Aug 3, 2023
8 of 12 checks passed
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.

3 participants