summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.el1
-rw-r--r--lisp/init-snakemake.el16
2 files changed, 17 insertions, 0 deletions
diff --git a/init.el b/init.el
index 677fd88..36dfccd 100644
--- a/init.el
+++ b/init.el
@@ -48,6 +48,7 @@
(require 'init-git)
(require 'init-projectile)
(require 'init-grep)
+(require 'init-snakemake)
(require 'init-ido)
(require 'init-smex)
diff --git a/lisp/init-snakemake.el b/lisp/init-snakemake.el
new file mode 100644
index 0000000..a5ebd69
--- /dev/null
+++ b/lisp/init-snakemake.el
@@ -0,0 +1,16 @@
+(require 'snakemake-mode-autoloads)
+
+(setq snakemake-compile-command-options '("-p"))
+
+;; Although `compile-command' is set when snakemake-mode is derived from
+;; Python mode, I need to define it again here because I have a Python
+;; mode hook that sets `compile-command', which overides the snakemake
+;; version.
+(add-hook 'snakemake-mode-hook
+ '(lambda ()
+ (set (make-local-variable 'compile-command)
+ (mapconcat 'identity
+ (cons "snakemake" snakemake-compile-command-options)
+ " "))))
+
+(provide 'init-snakemake)