tonini / alchemist.el

Elixir Tooling Integration Into Emacs
http://www.alchemist-elixir.org
906 stars 102 forks source link

Go to definition, path to sources #71

Closed zarkone closed 9 years ago

zarkone commented 9 years ago

Hello! Thanks for awesome mode, looks great! I've got completion working out of the box, just after installing company-mode, but I can't M-. to the sources of e.g. List.flatten

For that purpose there're two variables you can set:

(setq alchemist-goto-erlang-source-dir "/path/to/erlang/source/") (setq alchemist-goto-elixir-source-dir "/path/to/elixir/source/")

So, I git clone <github elixir repo> to /usr/local/src/. What value should I set to this vars?

Same question for Erlang, I've installed erlang-src in Debian and found:

 tree /usr/lib/erlang/lib -L 1

├── asn1-3.0.4
├── common_test-1.10
├── compiler-5.0.4
├── cosEvent-2.1.15
├── cosEventDomain-1.1.14
├── cosFileTransfer-1.1.16
├── cosNotification-1.1.21
├── cosProperty-1.1.17
├── cosTime-1.1.14
├── cosTransactions-1.2.14
├── crypto-3.5
├── debugger-4.0.3
├── dialyzer-2.7.4
├── diameter-1.9
├── edoc-0.7.16
├── eldap-1.1.1
├── erl_docgen-0.3.7
├── erl_interface-3.7.20
├── erts-6.4
├── et-1.5
├── eunit-2.2.9
├── gs-1.5.16
├── hipe-3.11.3
├── ic-4.3.6
├── inets-5.10.6
├── jinterface-1.5.12
├── kernel-3.2
├── megaco-3.17.3
├── mnesia-4.12.5
├── observer-2.0.4
├── odbc-2.10.22
├── orber-3.7.1
├── ose-1.0.2
├── os_mon-2.3.1
├── otp_mibs-1.0.10
├── parsetools-2.0.12
├── percept-0.8.10
├── public_key-0.23
├── reltool-0.6.6
├── runtime_tools-1.8.16
├── sasl-2.4.1
├── snmp-5.1.1
├── ssh-3.2
├── ssl-6.0
├── stdlib-2.4
├── syntax_tools-1.6.18
├── test_server-3.8
├── tools-2.7.2
├── typer-0.9.8
├── webtool-0.8.10
├── wx-1.3.3
└── xmerl-1.3.7

Looks like a little bit dump question, but i've tried different values with no result, always getting Don't know how to find: List.flatten

tonini commented 9 years ago

Hi @zarkone

The alchemist-goto-elixir-source-dir variable should contain a path like the following which holds the elixir src:

Path to Elixir Source

The alchemist-goto-erlang-source-dir variable should contain a path like the following which holds the erlang src:

Path to Erlang Source

zarkone commented 9 years ago

Thanks!

ritwick5ghosh commented 7 years ago

Hi @tonini / @zarkone, Is this any different for Spacemacs? I have the elixir repo 1.4 cloned under "/usr/local/elixir-src" and have this setting in my .spacemacs file:

(setq alchemist-goto-elixir-source-dir "/usr/local/elixir-src/")

However, even with this configuration, when I place my cursor on top of "map" in Enum.map in an Elixir file, and hit m h h and then select Enum.map/2, I still keep getting: No documentation for [Enum.map/2] found.

Any idea where I am going wrong here? Thanks in advance.