You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can specify the maximum line length for sorting :refer [...] forms in the config (:max-line-length). However, if there are a lot of referred symbols, it seems like this limit only applies to the first few lines of code.
To Reproduce
Sample file:
(nsmock
(:require [clojure.core :refer [abs accessor aclone add-classpath add-tap add-watch agent agent-error aget alength alias all-ns alter alter-meta! alter-var-root amap ancestors and any? apply areduce array-map as-> aset aset-boolean aset-byte aset-long aset-short assert assoc assoc! assoc-in associative? atom await await-for await1 bases bean bigdec bigint biginteger]]))
(defmy-functions"refer to vars so that cleanup won't remove them"
[abs accessor aclone add-classpath add-tap
add-watch agent agent-error aget alength alias
all-ns alter alter-meta! alter-var-root amap ancestors and any? apply areduce
array-map as-> aset aset-boolean aset-byte aset-long aset-short assert assoc
assoc! assoc-in associative? atom await await-for await1 bases bean bigdec bigint biginteger])
With :max-line-length 50 I get the following (| represents the limit), where the first two lines respect the line limit.
(nsmock
(:require [clojure.core :refer [abs accessor |
aclone |
add-classpath add-tap add-watch agent agent-error aget
alength alias all-ns alter alter-meta! alter-var-root
amap ancestors and any? apply areduce array-map
as-> aset aset-boolean aset-byte aset-long
aset-short assert assoc assoc! assoc-in associative? atom
await await-for await1 bases bean bigdec bigint
biginteger]])) |
With :max-line-length 80 we get similar results, only the first two rows respect the limit:
Describe the bug
I can specify the maximum line length for sorting
:refer [...]
forms in the config (:max-line-length
). However, if there are a lot of referred symbols, it seems like this limit only applies to the first few lines of code.To Reproduce
Sample file:
With
:max-line-length 50
I get the following (|
represents the limit), where the first two lines respect the line limit.With
:max-line-length 80
we get similar results, only the first two rows respect the limit:And finally with 120 limit:
Expected behavior
The
:max-line-length
limit should be applied to all lines.User details (please complete the following information):
clojure-lsp 2023.10.30-21.15.51-nightly clj-kondo 2023.10.21-SNAPSHOT
The text was updated successfully, but these errors were encountered: