18

I'm a developer for a package (ycmd) used by spacemacs, and I'd like to try using spacemacs as well. I'd like spacemacs to use the "development version" of my package, i.e. the one I'm hacking on locally. What's the best/proper way to tell spacemacs to use that version of the package rather than the one from melpa?

Right now I'm using the :load-path argument to use-package, but this seems to go against the grain a bit. Does spacemacs let me specify a load directory for specific packages in the layer configuration somewhere?

14

Local packages are put in extensions.el instead of packages.el. There are two lists in an extensions.el file:

  • <layer>-pre-extensions which are loaded before packages.el
  • <layer>-post-extensions which are loaded after packages.el

Local packages are put in the folder extensions within a sub-folder whose name is the name you put in one of the two lists. The load-path variable is handled automatically.

You can look at some examples in the python layer.

  • Excellent, thanks! I figured there was a canonical way, but I wasn't connecting all of the dots. – abingham Jun 15 '15 at 12:56
  • I edited the answer to mention the load-path variable which is automatically set. – syl20bnr Jun 15 '15 at 13:06
  • @syl20bnr do you also need to add the package to `<layer>-excluded-packages, if you're working on a package already used elsewhere? – mkaito Oct 18 '15 at 1:49
  • 5
    extensions.el is being deprecated in favour of local packages. See github.com/syl20bnr/spacemacs/blob/develop/doc/… – tony day Nov 14 '15 at 22:50
  • @tonyday indeed, the python layer that @syl20bnr mentions in this answer now follows those guidelines too, which had me confuddled until I saw your comment :) – mike Jan 24 '17 at 22:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.