summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-09-17 13:54:21 -0700
committerFranck Cuny <franck@fcuny.net>2022-09-17 13:54:21 -0700
commit59d6953e0ef53a11d737779ad90d628851a493eb (patch)
tree6b256476587e8981c26ee1779af88aca03acfac9 /emacs
parentfeat(packages): install all required packages via straight (diff)
downloademacs.d-59d6953e0ef53a11d737779ad90d628851a493eb.tar.gz
feat(lang/python): configure Emacs for python
Change-Id: I4f1ae59be8c10f344bec93b86c70a893123e92de
Diffstat (limited to 'emacs')
-rw-r--r--emacs/custom/my-lang-python.el16
-rw-r--r--emacs/init.el2
2 files changed, 18 insertions, 0 deletions
diff --git a/emacs/custom/my-lang-python.el b/emacs/custom/my-lang-python.el
new file mode 100644
index 0000000..74da80b
--- /dev/null
+++ b/emacs/custom/my-lang-python.el
@@ -0,0 +1,16 @@
+;;; my-lang-python.el --- Configures emacs for python -*- lexical-binding: t -*-
+;; Author: Franck Cuny <franck@fcuny.net>
+
+;;; Commentary:
+
+;;; Code:
+
+(require 'python-mode)
+(require 'blacken)
+
+;; enable black when we are in python-mode
+(add-hook 'python-mode-hook 'blacken-mode)
+
+(provide 'my-lang-python)
+
+;;; my-lang-python.el ends here
diff --git a/emacs/init.el b/emacs/init.el
index 174f5e8..d23dc2d 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -50,6 +50,8 @@
 (require 'my-notmuch)
 (require 'my-elfeed)
 
+(require 'my-lang-python)
+
 (require 'my-buffers)
 (require 'my-git-extra)
 (require 'my-gerrit)