gcv / julia-snail

An Emacs development environment for Julia
GNU General Public License v3.0
235 stars 23 forks source link

Automatic extension loading #135

Closed mstenek closed 9 months ago

mstenek commented 9 months ago

Hello,

I activated the extensions repl-history and formatter and can't get them to automatically load when the julia-snail repl starts; I got to manually enable them with M-x julia-snail/.... I tried hooks and advices without luck.

It seems a pretty basic procedure that I just cant figure out.

Thanks for the help.

gcv commented 9 months ago

When you open a Julia source file, what is the value of julia-snail-extensions? You can evaluate it using M-:.

mstenek commented 9 months ago

When you open a Julia source file, what is the value of julia-snail-extensions?

(repl-history formatter).

I fixed it by using use-package. I'm trying to get back to basics by setting it up manually (ie no use-package) but emacs sometimes doesn't cooperate (most likely is my [highly] imperfect understanding of elisp).

I think it comes down to the order of when code gets loaded and gets evaluated -- but life is too short!

Thanks.

gcv commented 9 months ago

Since use-package was merged into Emacs, it counts as basics IMO. It’s a bit weird, but easier than getting with-eval-after-load ordering right.

In any case, you can set julia-snail-extensions per-project in a .dir-locals.el file. Unless you want them enabled globally, in which case use-packageis the way to go.