Repository navigation
Commit e201ed6
Make it possible to get uniform indentation
While Emacs and clojure-mode have good support for "lisp-style" indentation, and
provided fine-grained customization via indent-specs, some prefer "dumb"
indentation where every single form gets the same level of indent, regardless of
whether it's a macro, whether there are arguments on the same line as the
function name, etc.
Currently this is not possible without redefining certain functions because of
hard-coded values that handle specific cases, namely the indent-spec case, and
the keyword invocation case (`(:require ...)`).
This introduces two new defcustoms, one allows completely disabling the
indent-spec handling, so the first hard-coded case is skipped, the second allows
specifically customizing the second case.
This should allow "tonsky style" formatting with
```
(setq clojure-indent-style 'always-indent
clojure-indent-keyword-style 'always-indent
clojure-enable-indent-specs nil)
```1 parent c66ada8 commit e201ed6
1 file changed
Lines changed: 58 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
| |||
147 | 149 | | |
148 | 150 | | |
149 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
150 | 197 | | |
151 | 198 | | |
152 | 199 | | |
| |||
1686 | 1733 | | |
1687 | 1734 | | |
1688 | 1735 | | |
1689 | | - | |
| 1736 | + | |
| 1737 | + | |
1690 | 1738 | | |
1691 | 1739 | | |
1692 | 1740 | | |
| |||
1723 | 1771 | | |
1724 | 1772 | | |
1725 | 1773 | | |
1726 | | - | |
| 1774 | + | |
1727 | 1775 | | |
1728 | 1776 | | |
1729 | 1777 | | |
| |||
1802 | 1850 | | |
1803 | 1851 | | |
1804 | 1852 | | |
| 1853 | + | |
| 1854 | + | |
| 1855 | + | |
| 1856 | + | |
| 1857 | + | |
| 1858 | + | |
| 1859 | + | |
| 1860 | + | |
1805 | 1861 | | |
1806 | 1862 | | |
1807 | 1863 | | |
| |||
0 commit comments