This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-01-05
Channels
- # announcements (2)
- # babashka (23)
- # beginners (67)
- # biff (4)
- # calva (19)
- # cider (6)
- # clj-kondo (40)
- # clj-yaml (14)
- # clojure (3)
- # clojure-austin (13)
- # clojure-europe (18)
- # clojure-nl (1)
- # clojure-norway (26)
- # clojure-uk (5)
- # clojurescript (42)
- # datascript (2)
- # datomic (6)
- # emacs (32)
- # graalvm (8)
- # humbleui (12)
- # hyperfiddle (13)
- # jobs (5)
- # lambdaisland (1)
- # lsp (18)
- # malli (15)
- # off-topic (20)
- # overtone (1)
- # pathom (5)
- # pedestal (15)
- # portal (3)
- # reitit (13)
- # releases (1)
- # remote-jobs (1)
- # yamlscript (4)
I have this configured in the cljfmt.clj
file,
{:indents {sql/select [[:inner 2]]
sql/insert [[:inner 2]]
sql/update [[:inner 2]]
sql/delete [[:inner 2]]
sql/on-conflict [[:inner 2]]}}
I am currently using the 2.0.375
and the formatting works as expected. I tried updating to the latest version and change the cljfmt.clj
file to use :extra-indents
instead of :indents
which looks like,
{:extra-indents {sql/select [[:inner 2]]
sql/insert [[:inner 2]]
sql/update [[:inner 2]]
sql/delete [[:inner 2]]
sql/on-conflict [[:inner 2]]}}
But for some reason, the formatting is not working now. Any idea what can be going wrong here or what else do I need to change?It looks right. I don’t think 375 supported :extra-indents
though. Can you try with latest Calva?
Yes. In 2.0.375
, the :indents
configuration is working. But when I updated Calva to latest version and tried using :extra-indents
it is not working.
Ah, I’m sorry, missed that you had indeed tried with latest Calva. Is it indenting (what happens when you hit return) or formatting (what happens when you hit tab) that is not working, or both?
Not working for either.
I have a file called alternate-strings.clj
in src/leetcode_clojure
in the merge-strings-alternately
folder. When the namespace is set to (ns leetcode-clojure.merge-strings-alternately.alternate-strings)
I am getting an error - "Namespace does not match file name: leetcode-clojure.merge-strings-alternately.alternate-strings". This is a lein project. Any ideas on this?
can you put the full path of alternate-strings
namespace and the classpath roots from your project.clj file?
but my guess is that you put merge-strings-alternately
with hyphens but those should be underscores in the filesystem
leetcode-clojure.merge-strings-alternately.alternate-strings
would expect to find this at src/leetcode_clojure/merge_strings_alternately/alternate_strings.clj
Sorry I am new to Clojure. Is "classpath root" what immediately follows "defproject" in my project.clj file? In that case, it is "leetcode-clojure".
Are you saying I should replace hyphens with underscore?
I don't see any :src-paths
key in my project.cli file.