summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franckcuny@gmail.com>2016-11-11 14:07:18 -0800
committerFranck Cuny <franckcuny@gmail.com>2016-11-11 14:07:18 -0800
commitdfcf41bf1c3e86f6a23e7df46123ae97f755e3ec (patch)
treef5a4f623dfec2b593c07c9d175772904ed3cd9b7
parentDon't require 'ivy'. We will support multiple completion systems. (diff)
downloadpants.el-dfcf41bf1c3e86f6a23e7df46123ae97f755e3ec.tar.gz
Add a new `defcustom` to support various completion systems.
We want to be able to support other systems, like `ivy` `helm` or `ido`.
-rw-r--r--pants.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/pants.el b/pants.el
index 88e2537..02ab5b3 100644
--- a/pants.el
+++ b/pants.el
@@ -6,6 +6,14 @@
 (require 'compile)
 (require 'python)
 
+(defcustom pants-completion-system 'ivy
+  "The completion system to be used by pants."
+  :group 'pants
+  :type '(radio
+          (const :tag "ivy" ivy)
+          (const :tag "ido" ido)
+          (const :tag "helm" helm)))
+
 (defcustom pants-source-tree-root nil
   "Path to the repository."
   :group 'pants
@@ -93,7 +101,8 @@
 
 (defun pants--compilation-setup ()
   "Sets the local configuration for the compile buffer"
-  (set (make-local-variable 'compilation-scroll-output) 'first-error)
+  (set (make-local-variable 'compilation-scroll-output) t)
+  (set (make-local-variable 'compilation-disable-input) t)
   (set (make-local-variable 'compilation-exit-message-function)
        (lambda (status code msg)
          (when (and