blob: 0a66dd93bc7459ed443a8a79e92f0c02f0fe2802 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
* pants.el
** Description
This library provides an interface to [[http://www.pantsbuild.org/][pants]], a fast, scalable build system.
** Install
Get a copy of the repository:
#+BEGIN_SRC sh
git clone git@github.com:fcuny/pants.el.git
#+END_SRC
Then update your Emacs configuration:
#+BEGIN_EXAMPLE
(load-file "~/src/pants.el/pants.el")
(use-package pants
:bind (("C-c b" . pants-find-build-file)
("C-c r" . pants-run-binary)
("C-c t" . pants-run-test))
:config
(progn
(setq pants-source-tree-root "/Users/fcuny/src/source"
pants-bury-compilation-buffer t
pants-extra-args "-q")))
#+END_EXAMPLE
** Configuration
There's a few variables that you can set:
- *pants-completion-system*: Which completion system to use. The possible values are Ivy, Ido and Helm. Ivy is the default one.
- *pants-source-tree-root*: Path to the repository.
- *pants-ini*: Name of the pants.ini file to use (default is =pants.ini=).
- *pants-exec-name*: Path to the pants executable in the repository (default is =pants=)
- *pants-build-file*: Name of the BUILD file to look for
- *pants-bury-compilation-buffer*: Set to true if you want to bury the compilation buffer after running successfully a command
- *pants-extra-args*: Optional arguments to use with every call to =pants= (for example: "-q")
- *pants-exec-args*: Optional arguments to the pants executable. The default is =--no-color=
** Usage
*** Go to the closest BUILD file
Do =m-x pants-find-build-file=.
*** Run a binary target
Do =m-x pants-run-binary=. It will present a list of targets and let you select which one to run.
*** Run a test target
Do =m-x pants-run-test=. It will present a list of targets and let you select which one to run.
*** Jump to a REPL
Do =m-x pants-run-python-repl=. It will present a list of targets and create a REPL.
|