How to get lsp-mode capabilities on elisp itself? #3624
-
I wish my emacs config were setup to provide better autocompletion and intelligence for writing elisp. What's the best way to get some |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
To enhance autocompletion and intelligence for writing Emacs Lisp (elisp), you can indeed set up your Emacs configuration to work with lsp-mode (Language Server Protocol mode). lsp-mode provides language-specific features, including autocompletion, syntax checking, and more, by leveraging language servers specific to the programming language you're using. To set up lsp-mode for Emacs Lisp, you can follow these steps: Install lsp-mode:
Install lsp-mode for Emacs Lisp: You can install emacs-lsp from the package manager:
Configure lsp-mode for Emacs Lisp:
This will enable lsp-mode automatically when you open an Emacs Lisp file. Optionally, you may want to enable company-mode for better autocompletion support:
Now, when you open an Emacs Lisp file, lsp-mode will activate, providing you with autocompletion, intelligent code suggestions, and other features specific to Emacs Lisp development. Regarding your question about org-mode source blocks: Yes, lsp-mode should work within org-mode source blocks as well. If you have lsp-mode enabled for Emacs Lisp as described above, it should automatically be available when you are editing Emacs Lisp code within an org-mode source block. Remember to restart Emacs or evaluate the changes in your configuration file (init.el) for the changes to take effect. Keep in mind that the availability of specific language features may depend on the maturity of the language server implementation for Emacs Lisp (emacs-lsp). Therefore, some features may be more robust and complete for popular languages like Python or JavaScript, where language servers are more commonly used. I hope this helps improve your Emacs Lisp development experience! If you encounter any issues or have further questions, feel free to ask. |
Beta Was this translation helpful? Give feedback.
Maybe https://github.com/emacs-elsa/Elsa