Skip to content

Commit 72b0a60

Browse files
committed
Move the configuration instructions after the installation ones
1 parent 187e512 commit 72b0a60

File tree

1 file changed

+60
-60
lines changed

1 file changed

+60
-60
lines changed

README.md

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -12,66 +12,6 @@ highlighting), indentation, and navigation support for the
1212
[tree-sitter-clojure](https://github.com/sogaiu/tree-sitter-clojure)
1313
[tree-sitter](https://tree-sitter.github.io/tree-sitter/) grammar.
1414

15-
## Configuration
16-
17-
To see a list of available configuration options do `M-x customize-group <RET> clojure-ts`.
18-
19-
Most configuration changes will require reverting any active `clojure-ts-mode` buffers.
20-
21-
### Indentation
22-
23-
`clojure-ts-mode` currently supports 2 different indentation strategies:
24-
25-
- `semantic`, the default, which tries to match the indentation of `clojure-mode` and `cljfmt`
26-
- `fixed`, [a simple indentation strategy outlined by Tonsky in a blog post](https://tonsky.me/blog/clojurefmt/)
27-
28-
Set the var `clojure-ts-indent-style` to change it.
29-
30-
``` emacs-lisp
31-
(setq clojure-ts-indent-style 'fixed)
32-
```
33-
34-
**Note:** You can find [this article](https://metaredux.com/posts/2020/12/06/semantic-clojure-formatting.html) comparing semantic and fixed indentation useful.
35-
36-
### Font Locking
37-
38-
To highlight entire rich `comment` expression with the comment font face, set
39-
40-
``` emacs-lisp
41-
(setq clojure-ts-comment-macro-font-lock-body t)
42-
```
43-
44-
By default this is `nil`, so that anything within a `comment` expression is
45-
highlighted like regular clojure code.
46-
47-
### Highlight markdown syntax in docstrings
48-
49-
By default markdown syntax is highlighted in the docstrings using
50-
`markdown_inline` grammar. To disable this feature set
51-
52-
``` emacs-lisp
53-
(setopt clojure-ts-use-markdown-inline nil)
54-
```
55-
56-
### Navigation and Evaluation
57-
58-
To make forms inside of `(comment ...)` forms appear as top-level forms for evaluation and navigation, set
59-
60-
``` emacs-lisp
61-
(setq clojure-ts-toplevel-inside-comment-form t)
62-
```
63-
64-
### Fill paragraph
65-
66-
To change the maximal line length used by `M-x prog-fill-reindent-defun` (also
67-
bound to `M-q` by default) to reformat docstrings and comments it's possible to
68-
customize `clojure-ts-fill-paragraph` variable (by default set to the value of
69-
Emacs' `fill-paragraph` value).
70-
71-
Every new line in the docstrings is indented by
72-
`clojure-ts-docstring-fill-prefix-width` number of spaces (set to 2 by default
73-
which matches the `clojure-mode` settings).
74-
7515
## Rationale
7616

7717
[clojure-mode](https://github.com/clojure-emacs/clojure-mode) has served us well
@@ -166,6 +106,66 @@ option to install it manually, Please, refer to the installation instructions of
166106
each required grammar and make sure you're install the versions expected. (see
167107
`clojure-ts-grammar-recipes` for details)
168108

109+
## Configuration
110+
111+
To see a list of available configuration options do `M-x customize-group <RET> clojure-ts`.
112+
113+
Most configuration changes will require reverting any active `clojure-ts-mode` buffers.
114+
115+
### Indentation
116+
117+
`clojure-ts-mode` currently supports 2 different indentation strategies:
118+
119+
- `semantic`, the default, which tries to match the indentation of `clojure-mode` and `cljfmt`
120+
- `fixed`, [a simple indentation strategy outlined by Tonsky in a blog post](https://tonsky.me/blog/clojurefmt/)
121+
122+
Set the var `clojure-ts-indent-style` to change it.
123+
124+
``` emacs-lisp
125+
(setq clojure-ts-indent-style 'fixed)
126+
```
127+
128+
**Note:** You can find [this article](https://metaredux.com/posts/2020/12/06/semantic-clojure-formatting.html) comparing semantic and fixed indentation useful.
129+
130+
### Font Locking
131+
132+
To highlight entire rich `comment` expression with the comment font face, set
133+
134+
``` emacs-lisp
135+
(setq clojure-ts-comment-macro-font-lock-body t)
136+
```
137+
138+
By default this is `nil`, so that anything within a `comment` expression is
139+
highlighted like regular clojure code.
140+
141+
### Highlight markdown syntax in docstrings
142+
143+
By default markdown syntax is highlighted in the docstrings using
144+
`markdown_inline` grammar. To disable this feature set
145+
146+
``` emacs-lisp
147+
(setopt clojure-ts-use-markdown-inline nil)
148+
```
149+
150+
### Navigation and Evaluation
151+
152+
To make forms inside of `(comment ...)` forms appear as top-level forms for evaluation and navigation, set
153+
154+
``` emacs-lisp
155+
(setq clojure-ts-toplevel-inside-comment-form t)
156+
```
157+
158+
### Fill paragraph
159+
160+
To change the maximal line length used by `M-x prog-fill-reindent-defun` (also
161+
bound to `M-q` by default) to reformat docstrings and comments it's possible to
162+
customize `clojure-ts-fill-paragraph` variable (by default set to the value of
163+
Emacs' `fill-paragraph` value).
164+
165+
Every new line in the docstrings is indented by
166+
`clojure-ts-docstring-fill-prefix-width` number of spaces (set to 2 by default
167+
which matches the `clojure-mode` settings).
168+
169169
## Migrating to clojure-ts-mode
170170

171171
If you are migrating to `clojure-ts-mode` note that `clojure-mode` is still required for cider and clj-refactor packages to work properly.

0 commit comments

Comments
 (0)