Skip to content

Commit 8a6c9cd

Browse files
readme: summaries configuration changes from the defaults
1 parent 09a68dd commit 8a6c9cd

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,52 @@ Custom snippets in Clojure LSP format (EDN). Practicalli designed snippets to e
77
Clone the repository to the user level configuration location for Clojure LSP, either `$XDG_CONFIG_HOME/clojure-lsp` or if `XDG_CONFIG_HOME` is not set, `$HOME/.config/clojure-lsp`
88

99

10+
## Clojure LSP configuration
11+
12+
Include `:extra-paths` and `:extra-deps` from project & user level aliases in LSP classpath. e.g. support a custom `user` namespace in `dev/user.clj`
13+
14+
```clojure
15+
:source-aliases #{:dev :test :env/dev :env/test :lib/reloaded}
16+
```
17+
18+
Include Java Sources installed via Debian / Ubuntu package `openjdk-17-source` to support calls to Java Objects and Methods.
19+
20+
```clojure
21+
:java
22+
{:jdk-source-uri "file:///usr/lib/jvm/openjdk-17/lib/src.zip" ;;
23+
:home-path nil ;; jdk-source-uri takes precedence
24+
:download-jdk-source? false}
25+
```
26+
27+
Clean namespace `ns` forms but do not sort require names
28+
29+
```clojure
30+
:clean {:automatically-after-ns-refactor true
31+
:ns-inner-blocks-indentation :next-line
32+
:ns-import-classes-indentation :next-line
33+
:sort {:ns false
34+
:require false
35+
:import false
36+
:import-classes {:classes-per-line 3} ;; -1 for all in single line
37+
:refer {:max-line-length 80}}}
38+
```
39+
40+
41+
Use `^private` metadata for private function definitions rather than `defn-`
42+
43+
```clojure
44+
:use-metadata-for-privacy? true
45+
```
46+
47+
Location of [cljfmt configuration](cljfmt.edn) for formatting, path relative to project root. The defaults for cljfmt are used, except `:remove-consecutive-blank-lines?` which is set to false to enable more readable code.
48+
49+
```clojure
50+
:cljfmt-config-path "cljfmt.edn"
51+
```
52+
53+
> [cljfmt configuration](cljfmt.edn) included example `:indents` rules for clojure.core, compojure, fuzzy rules and examples used by the Clojure LSP maintainer.
54+
55+
1056
## Custom snippets
1157

1258
[Snippets created by Practicalli](https://practical.li/spacemacs/snippets/clojure-lsp/practicalli-snippets.html) are documents in [Practicalli Spacemacs](https://practical.li/spacemacs/snippets/clojure-lsp/practicalli-snippets.html)

0 commit comments

Comments
 (0)