Fork me on GitHub
#lsp
<
2022-06-01
>
vemv13:06:06

šŸ‘‹ > Use #re for regex inside the cljfmt configuration file. why is #re needed again? https://clojure-lsp.io/settings/

vemv13:06:54

I'd be interested in honoring this .cljfmt.edn files from other tools, would be useful to know what problem is being solved (vs. vanilla #"regex")

ericdallo13:06:26

IIRC #"regex" doesn't work on edn files

šŸ‘ 1
borkdude13:06:32

.edn files do not support #"regex". But personally I wouldn't have chosen a reader tag for that either.

borkdude13:06:52

clj-kondo just supports :exclude-files ".." and that is interpreted as a regex

ericdallo13:06:04

clojure-lsp is supporting the same cljfmt supports to have the same compatibility

borkdude13:06:13

ah, makes sense

borkdude13:06:30

one should however use fully qualified tag names to not conflict with other libraries

vemv13:06:05

thank you both!

šŸ‘ 2
vemv13:06:50

bonus question, other than this #re transformation, does the file have any extra semantic? or is it passed as-is to cljfmt

bhurlow19:06:27

Does clojure-lsp support either recursive resolution of .clj-kondo config dirs, or the ability to specify it directly? Asking because our team has a project structure which involves sub-projects each with their own deps.edn and we'd like to define our kondo config in a single place "above" the current working dir

borkdude19:06:59

@U0FHWANJK clj-kondo has a different way to solve this. You should configure each sub-project with its own .clj-kondo/config.edn and then use :config-paths ["../shared-config"]to add the shared config.edn into the mix

bhurlow19:06:17

ok will try this thanks!

bhurlow19:06:34

we owe you @U04V15CAJ šŸ™‚

ā¤ļø 1
vemv20:06:46

https://clojure-lsp.io/settings/

{:cljfmt {:indents {#re ".*" ns [[:inner 0] [:inner 1]]}}
 :auto-add-ns-to-new-files? false}
Should that ns be there? Seems a typo

ccann22:06:55

Hi, Iā€™m having a small bit of trouble with Emacs and clojure-lsp. When I use lsp-ui-peek-find-definitions on our clojurescript project it always takes me to the version in target/ instead of src/ Does anyone know what I can configure to stop that from happening?

ericdallo22:06:02

Try the :ignore-classpath-directorie from here : https://clojure-lsp.io/settings/

ccann22:06:04

I just tried that with :ignore-classpath-directories true in my .lsp/config.edn to no avail unfortunately

ericdallo22:06:04

Do you have a repro I can test it later?