summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2020-02-14 11:43:26 +0100
committerJonas Bernoulli <jonas@bernoul.li>2021-04-12 15:55:53 +0200
commitded65cce7c96114ad5edb6afdc20977d539257b5 (patch)
treee6090dc993e7868857030fbec43fb2ee8acd873d
parent4aa2c1826a4c8c077dd03becb072496660cf7c00 (diff)
For Emacs users, set outline-regexp for some file types.jonas/dir-locals
Do this in ".dir-locals.el", which was previously ignored by Git. That file should not have been ignored as it is intended for settings that the maintainers want to share with contributors. For settings that are NOT intended for sharing one should use ".dir-locals-2.el". We tell Git to ignore the latter file instead of the former. `outline-regexp` is a good example of a setting that should be shared, with others. It specifies the syntax used for section headings used for certain files within this project. Setting that value by itself does not change how Emacs behaves. Turing on `outline-minor-mode` on the other hand changes how the user interacts with those headings. Not everyone is going to like that, so the mode should be enabled in ".dir-locals-2.el" instead. `rustic-mode` is a fork of `rust-mode`, so we theme that too.
-rw-r--r--.dir-locals.el2
-rw-r--r--.gitignore2
2 files changed, 3 insertions, 1 deletions
diff --git a/.dir-locals.el b/.dir-locals.el
new file mode 100644
index 00000000..830e134a
--- /dev/null
+++ b/.dir-locals.el
@@ -0,0 +1,2 @@
+((makefile-mode
+ (outline-regexp . "#")))
diff --git a/.gitignore b/.gitignore
index 317f9995..f4db9248 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,4 @@
**/*.rs.bk
*~
.gdb_history
-.dir-locals.el
+.dir-locals-2.el