rksm / emacs-rust-config

emacs.d files for making Emacs a Rust development environment
MIT License
92 stars 28 forks source link

[help] Is it possible to apply `emacs-rust-config` for python? #1

Closed avatar-lavventura closed 3 years ago

avatar-lavventura commented 3 years ago

I was trying to apply emacs-rust-config for Python, please see comments under https://emacs.stackexchange.com/q/63647/18414.

Clone [github.com/rksm/emacs-rust-config] this package to check/play with lsp , it does not interfere with your emacs configuration - while this is written for rust, before installing it, just edit the file init.el and comment out the lines 9..35 and 48 and add the following (use-package python :ensure nil), save and install packages. Then open a python file, and M-x lsp to start lsp, M-x lsp-find-definiton of a function and M-x xref-pop-marker-stack to return to source file. Or use the already binded keys s-l g g and M-

I have done emacs -q -nw --load /home/alper/.emacs.d/emacs-rust-config/standalone.el run.py , and doM-x lsp and M-x lsp-find-definition.

which says:

The connected server(s) does not support method textDocument/implementation. To find out what capabilities support your server use ‘M-x lsp-describe-session’ and expand the capabilities section

I am not sure am I in right or wrong path. I would be grateful if you could help me out to apply your script into Python if possible.

rksm commented 3 years ago

Sorry, this repo only deals with the a rust lsp integration. No idea how to make a python lsp setup. FYI I'm a very happy elpy user.

avatar-lavventura commented 3 years ago

I am very happy that I manage to make your repo work with python lsp. init.el file has ony (use-package python :ensure nil) line and my .emacs (https://github.com/avatar-lavventura/dotfiles/blob/main/.emacs) beginning part is taken from yours.

I had to make some changes for personal setup. I am using elpy as basic hope I will explore it more