summary refs log tree commit diff
path: root/emacs.d/modes
diff options
context:
space:
mode:
authorFranck Cuny <franckcuny@gmail.com>2016-02-12 20:58:37 -0800
committerFranck Cuny <franckcuny@gmail.com>2016-02-12 20:58:37 -0800
commit5f2b301a8df5410962519d2b7e9a977b03e75977 (patch)
treeda73920a1109c0820cdf3a3e2902087c95f3b3a7 /emacs.d/modes
parent[emacs] Move some packages to a new config file. (diff)
downloademacs.d-5f2b301a8df5410962519d2b7e9a977b03e75977.tar.gz
[emacs] Split the config into 'core' and 'modes'.
Separate the modules that are 'core' (e.g.: related to editing,
manipulating text, and so on) and the 'modes' (e.g.: related to syntax,
langage support, etc).
Diffstat (limited to 'emacs.d/modes')
-rw-r--r--emacs.d/modes/cfg-puppet.el5
-rw-r--r--emacs.d/modes/cfg-thrift.el5
-rw-r--r--emacs.d/modes/cfg-yaml.el5
-rw-r--r--emacs.d/modes/lang-c.el8
-rw-r--r--emacs.d/modes/lang-go.el25
-rw-r--r--emacs.d/modes/lang-markdown.el10
-rw-r--r--emacs.d/modes/lang-python.el7
-rw-r--r--emacs.d/modes/lang-scheme.el6
-rw-r--r--emacs.d/modes/lang-shell.el3
9 files changed, 74 insertions, 0 deletions
diff --git a/emacs.d/modes/cfg-puppet.el b/emacs.d/modes/cfg-puppet.el
new file mode 100644
index 0000000..5c1185a
--- /dev/null
+++ b/emacs.d/modes/cfg-puppet.el
@@ -0,0 +1,5 @@
+(use-package puppet-mode
+  :ensure t
+  :mode ("\\.pp$" . puppet-mode))
+
+(provide 'cfg-puppet)
diff --git a/emacs.d/modes/cfg-thrift.el b/emacs.d/modes/cfg-thrift.el
new file mode 100644
index 0000000..4f491c2
--- /dev/null
+++ b/emacs.d/modes/cfg-thrift.el
@@ -0,0 +1,5 @@
+(use-package thrift
+  :ensure t
+  :defer t)
+
+(provide 'cfg-thrift)
diff --git a/emacs.d/modes/cfg-yaml.el b/emacs.d/modes/cfg-yaml.el
new file mode 100644
index 0000000..7dc74e0
--- /dev/null
+++ b/emacs.d/modes/cfg-yaml.el
@@ -0,0 +1,5 @@
+(use-package yaml-mode
+  :ensure t
+  :defer t)
+
+(provide 'cfg-yaml)
diff --git a/emacs.d/modes/lang-c.el b/emacs.d/modes/lang-c.el
new file mode 100644
index 0000000..9b4f357
--- /dev/null
+++ b/emacs.d/modes/lang-c.el
@@ -0,0 +1,8 @@
+(use-package google-c-style
+  :ensure t
+  :defer t
+  :config
+  (progn
+    (setq c-basic-offset 2)))
+
+(provide 'lang-c)
diff --git a/emacs.d/modes/lang-go.el b/emacs.d/modes/lang-go.el
new file mode 100644
index 0000000..8d81f2c
--- /dev/null
+++ b/emacs.d/modes/lang-go.el
@@ -0,0 +1,25 @@
+(use-package go-mode
+  :ensure t
+  :defer t
+  :config
+  (progn
+    (bind-key "C-c C-f" 'gofmt go-mode-map)
+    (bind-key "C-c h" 'godoc go-mode-map)
+    (bind-key "C-c C-g" 'go-goto-imports go-mode-map)
+    (bind-key "C-c C-r" 'go-remove-unused-imports go-mode-map))
+  :init
+  (progn (add-hook 'go-mode-hook (lambda ()
+                                   (go-eldoc-setup)
+                                   (add-hook 'before-save-hook 'gofmt-before-save)
+                                   (set (make-local-variable 'company-backends) '(company-go))))))
+
+(use-package go-eldoc
+  :ensure t
+  :defer t
+  :init (add-hook 'go-mode-hook 'go-eldoc-setup))
+
+(use-package company-go
+  :ensure t
+  :defer t)
+
+(provide 'lang-go)
diff --git a/emacs.d/modes/lang-markdown.el b/emacs.d/modes/lang-markdown.el
new file mode 100644
index 0000000..f4f544d
--- /dev/null
+++ b/emacs.d/modes/lang-markdown.el
@@ -0,0 +1,10 @@
+(use-package markdown-mode
+  :ensure t
+  :mode ("\\.\\(m\\(ark\\)?down\\|md\\)$" . markdown-mode)
+  :config
+  (progn
+    (let ((preferred-markdown-impl "peg-markdown"))
+      (when (executable-find preferred-markdown-impl)
+        (setq markdown-command preferred-markdown-impl)))))
+
+(provide 'lang-markdown)
diff --git a/emacs.d/modes/lang-python.el b/emacs.d/modes/lang-python.el
new file mode 100644
index 0000000..b22ce16
--- /dev/null
+++ b/emacs.d/modes/lang-python.el
@@ -0,0 +1,7 @@
+(use-package python
+  :mode ("BUILD\\|(\\.\\(py\\|aurora\\))$" . python-mode)
+  :config
+  (progn
+    (setq python-indent-offset 2)))
+
+(provide 'lang-python)
diff --git a/emacs.d/modes/lang-scheme.el b/emacs.d/modes/lang-scheme.el
new file mode 100644
index 0000000..1f0dec3
--- /dev/null
+++ b/emacs.d/modes/lang-scheme.el
@@ -0,0 +1,6 @@
+(use-package geiser
+  :config
+  (setq geiser-active-implementations '(racket))
+  :ensure t)
+
+(provide 'lang-scheme)
diff --git a/emacs.d/modes/lang-shell.el b/emacs.d/modes/lang-shell.el
new file mode 100644
index 0000000..aa3fab5
--- /dev/null
+++ b/emacs.d/modes/lang-shell.el
@@ -0,0 +1,3 @@
+(setq-default
+ sh-basic-offset 2
+ sh-indentation 2)