kevinlin1021 / edts Goto Github PK
View Code? Open in Web Editor NEWThis project forked from sebastiw/edts
Erlang Development Tool Suite
License: GNU Lesser General Public License v3.0
This project forked from sebastiw/edts
Erlang Development Tool Suite
License: GNU Lesser General Public License v3.0
__ __ | \ | \ ______ ____| $$ _| $$_ _______ / \ / $$| $$ \ / \ | $$$$$$\| $$$$$$$ \$$$$$$ | $$$$$$$ | $$ $$| $$ | $$ | $$ __ \$$ \ | $$$$$$$$| $$__| $$ | $$| \ _\$$$$$$\ \$$ \ \$$ $$ \$$ $$| $$ \$$$$$$$ \$$$$$$$ \$$$$ \$$$$$$$ -- The Erlang Development Tool Suite -- ## License ## Copyright (C) 2012 by Thomas Järvstrand EDTS is licensed under the Lesser Gnu General Public License. See COPYING.LESSER for details. ## Introduction ## The Erlang Development Tool Suite (EDTS) is meant to be a package of useful development tools for working with the Erlang programming language in Emacs. It bundles a number of useful external packages, together with specialized Erlang plugins for them, and its own features to create an efficient development environment that is easy to set up. Currently EDTS provides: - In-buffer flymake-like compilation - In-buffer xref checks - Rudimentary project support - Code navigation. - Auto-completion, using auto-complete-mode - Auto-highlighting, using auto-highlight-mode - Convenient access to Erlang documentation Planned features in the short term are: - Better support for imported functions - In-buffer running of unit tests - yasnippets - A nice interface to the erlang debugger ## Getting started ## - First of all, make sure your ensure your environment is setup correctly: - If you're not using Linux, setup Erlang mode according to the instructions here: http://www.erlang.org/doc/apps/tools/erlang_mode_chapter.html. - Make sure your code is compiled with the debug_info option set. - If you're running multiple versions of Erlang, make sure that the version you use to compile edts is also the first version in your emacs exec-path. For example, if you're running Debian/Ubuntu and have installed Erlang through aptitude, that will add a file /etc/emacs/site-start.d that will always put the system Erlang at the head of the code path. - If you want to be able automatically navigate to OTP sources from your code using eg. edts-find-source-under-point, you must build your OTP-release from source since the beam-files of the versions most commonly installed point to paths that will most likely not be correct or even exist on your system. - At the moment it is possible to navigate from project-code to OTP-code, but to be able to automatically navigate between OTP modules, you need to set up a separate edts-project for your OTP repo. - Get the Erlang documentation (optional). The Erlang man-pages are assumed to be located in the man-directory of your erlang installation's root-directory. If you don't know where this is, you can find out by entering something like "readlink -f `which erl`" in a terminal. You'll see something like "/usr/lib/erlang/bin/erl" in which case "/usr/lib/erlang" would be your erlang root-dir. This is the usual place to install documentation when using tools like eg. aptitude. Alternatively, you can download your distribution's man-pages from: http://www.erlang.org/download.html Unpack and point edts' doc-root to the man-directory inside by adapting the following example and putting it in your .emacs: (edts-man-set-root "/home/my-user/doc/otp_doc_man_R15B02") - Get EDTS: $git clone [email protected]:tjarvstrand/edts.git $cd edts $make - Make sure EDTS is loaded and started in your .emacs: (add-to-list 'load-path "<path-to-edts-repo>") (require 'edts-start) - Byte-compile EDTS elisp files (optional): M-x edts-make RET - Configure your projects. EDTS projects are stored in the variable `edts-projects'. `edts-projects' is a list of projects, where each project is an association list. The properties that can be set for each project are: name - The name of the project. Required. root - The top level directory of where you have your project contents. Required. node-sname - The erlang sname that the project's erlang node should have. Defaults to same name as the project. lib-dirs - A list of paths (relative to the project's root) where the project's code is located. All subdirectories of lib-dirs are assumed to be otp-applications. Defaults to '("lib"). If start-command is set, that is assumed to properly set up the code-path and lib-dirs will be ignored. start-command - A custom command that EDTS should execute to start the project's Erlang node. If this is set, the command must set the node's sname to be the same as the value specified in the project's node-sname. The command must also not set the erlang cookie to anything other than the default ~/.erlang.cookie. Example: (setq edts-projects '(( ;; My awesome project. (name . "awesome_stuff") (root . "~/src/awesome_stuff") (node-sname . "awesome") (start-command . "./start-being-awesome.sh")) ( ;; My other project. (name . "other_stuff") (root . "~/src/other_stuff") (node-sname . "not_as_awesome") (lib-dirs . ("lib" "test"))))) That should be all it takes. If it's not, I've failed. Please send a bugreport. ## How it works ## Once set up, EDTS will automatically fire up it's own Erlang node when you start your Emacs. Once you open the first file that is located inside one of your projects, then EDTS will automatically fire up the corresponding project node and initiate communication between the EDTS-node and the project-node. If a node with the same name as the project's node is already registered with the Erlang port mapper daemon (epmd), then EDTS will initiate communication with that node instead. The EDTS node exposes a REST-interface (using webmachine) through which emacs can then communicate with the project node. ## EDTS and Distel ## EDTS is meant to be a able to replace Distel but only provides a subset of the most commonly used of Distel's features, specifically the equivalents of erl-find-module, erl-find-source-under-point and erl-who-calls. As far as I know, those are the only Distel features that 95% of people use, but if there is anything from Distel that you are missing in EDTS, please let me know. If you are using EDTS, please remove Distel from your configuration, since running both can create some confusion. ## Known Issues ## Some users are experiencing serious performance issues with the auto-completion during the first use after startup. This is usually solved by typing C-g a couple (two or three, it seems to vary) of times when Emacs "hangs" the first time. This is most likely caused by a defect in the emacs c-code that affects the auto-complete package. If you experience these issues, it's recommended to switch to emacs 24.2 where the problem is fixed [1], but if the problems persist, any help in debugging the issue would be appreciated since I have never myself been able to reproduce it. [1] auto-complete/auto-complete#153
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.