diff options
author | franck cuny <franck.cuny@gmail.com> | 2019-02-16 18:09:34 -0800 |
---|---|---|
committer | franck cuny <franck.cuny@gmail.com> | 2019-02-16 18:09:34 -0800 |
commit | ea700cbf750a98327f525e0a5a4934efdf2c9885 (patch) | |
tree | a61ee41d001643a820201deb5778ed750e7a0062 | |
parent | Create a group for pants settings. (diff) | |
download | pants.el-ea700cbf750a98327f525e0a5a4934efdf2c9885.tar.gz |
Add a mode for setting the indentation.
For BUILD file, the indentation is set to 4.
-rw-r--r-- | pants.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pants.el b/pants.el index 1809966..4deabe4 100644 --- a/pants.el +++ b/pants.el @@ -64,6 +64,13 @@ (defvar *pants-compilation-buffer* "*pants-compilation-buffer*") +(define-derived-mode pants-build-mode python-mode "Pants" + "Major mode for editing Pants build files." + :group 'pants + + (setq-local python-indent-guess-indent-offset nil) + (setq-local python-indent-offset 4)) + (defun pants--find-directory-containing-build-file (file) "Finds the directory containing the build file next to a give file." (let ((root nil) |