-
Notifications
You must be signed in to change notification settings - Fork 46
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 instructions for use with Emacs #19
Comments
I can open an issue in https://github.com/emacs-lsp/lsp-mode so that people interested in contributing a client for emacs will be able to do so. |
I was able to get
After evaluating the expression, you should be able to run I basically just took these instructions from https://joaotavora.github.io/eglot/#Setting-Up-LSP-Servers My system: |
I tried it with Emacs 27 and wasn't able to get it run. Emacs itself isn't easy but using eglot, lsp-servers and all the other tools and layers involed in an IDE-like Emacs setup gives me a headake. I will gently wait for a docu how to setup ruff-lsp/ruf for Emacs. When creating the docu please keep in mind to make it understandable for none-hackers, too. ;) Does ruff-lsp do more then linting? Or can emacs/eglot handle more then one server running? |
Any updates on the subject? Have been trying to integrate ruff with my eglot server, but I cannot seem to get it working. Would appreciate it if someone who got it working with eglot can share their setup with me. For |
(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs
'(python-mode . ("ruff-lsp"))))
(add-hook 'python-mode-hook #'eglot-ensure) |
For me to get it working on a Mac I had to install it with I also changed the code to be
|
On macOS (14.4.1) with GNU Emacs 29.3, all I have to do was: |
## Summary The purpose of this change is to explain how to use ruff as a language server in Eglot with automatic formatting because I've struggle to use it with Eglot. I've search it online and found that there are some people also struggle too. (See [this reddit post](https://www.reddit.com/r/emacs/comments/118mo6w/eglot_automatic_formatting/) and astral-sh/ruff-lsp#19 (comment)) ## Test Plan I've use this setting myself. And I will continue maintain this part as long as I use it. --------- Co-authored-by: Dhruv Manilawala <[email protected]>
See: astral-sh/ruff#271.
The text was updated successfully, but these errors were encountered: