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

Request: Support for python-ts-mode #81

Closed
Walheimat opened this issue Feb 5, 2023 · 1 comment
Closed

Request: Support for python-ts-mode #81

Walheimat opened this issue Feb 5, 2023 · 1 comment

Comments

@Walheimat
Copy link

Walheimat commented Feb 5, 2023

I noticed this package sets :major-modes (python-mode) when registering the client. This prevents it from being an option when you're using python-ts-mode (the new tree-sitter-enabled alternative mode in Emacs 29).

I currently just do the following but it's clunky:

(let ((struct (gethash 'pyright lsp-clients)))
    (setf (cl-struct-slot-value 'lsp--client 'major-modes struct) '(python-mode python-ts-mode)))

A better way could be using :activation-fn (lsp-activate-on "python") instead, but I haven't tried that yet.

@Walheimat
Copy link
Author

Walheimat commented Feb 5, 2023

Never mind, you already added the other solution.

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

No branches or pull requests

1 participant