reddit / emacs

Where have I gone wrong in installing a package?

CowboyBoats · 2022-11-17 18:02
I'm an emacs noob using Doom. I'd like to install [elpy](https://elpy.readthedocs.io/en/latest/introduction.html). So the documentation says to add to `~/.emacs`: (use-package elpy :ensure t :init (elpy-enable)) I haven't figured out where to put this that doesn't throw an error on `doom sync`. Because I'm using doom, I have an `~/.emacs.d/` and a `~/.doom.d`, which each contain various `init.el` and `packages.el` files. The packages file in `.doom.d` indicates packages are installable via: ;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror: ;; (package! some-package) (package! elpy) So I've done that, and run `doom sync` and reloaded Doom. It seems now that elpy is installed in a half state. There are many elpy commands available in `M-x` such as `elpy-doc`, `elpy-menu`, `elpy-test`, but the reason I installed this package is that I want to be able to navigate to e.g. `Widgets(foo=bar, baz=qux)` in a Python file and [jump to definition](https://elpy.readthedocs.io/en/latest/ide.html#command-elpy-goto-definition), which isn't working - `M-.` instead outputs an error, "Previous command was not evil-repeat".
graduale · 2022-11-17 18:26
Is `elpy-enable` among the commands available to you through `M-x`? If so, try that and see what happens. In general just installing a package won’t load it. You need to Los the package somehow, either through `load-library` or through something in your config or through one of the packages autoloads. (I don’t use Elpy nor Doom, so take this with a grain of salt.)
CowboyBoats · 2022-11-17 18:31
It is among those commands, and running it from emacs seems to succeed, but even after `doom/reload` there is no change in behavior. Edit: ah, wait, no, now its other functions are available; it requires jedi to be installed... Thanks, looks like that helped.
doolio_ · 2022-11-17 22:09
I may be mistaken but I think elpy is no longer maintained. I'd suggest using either eglot or lsp-mode instead which are also language agnostic.