This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (13)
- # beginners (51)
- # boot (3)
- # calva (10)
- # cider (20)
- # clj-kondo (55)
- # cljs-dev (60)
- # clojure (99)
- # clojure-europe (6)
- # clojure-gamedev (9)
- # clojure-italy (19)
- # clojure-nl (7)
- # clojure-spec (20)
- # clojure-uk (42)
- # clojurescript (96)
- # clojurex (37)
- # clojutre (1)
- # cursive (37)
- # data-science (2)
- # datomic (15)
- # defnpodcast (9)
- # duct (7)
- # emacs (6)
- # events (10)
- # fulcro (124)
- # jackdaw (4)
- # jobs (4)
- # leiningen (9)
- # malli (7)
- # mount (3)
- # off-topic (167)
- # other-languages (8)
- # re-frame (39)
- # reagent (4)
- # reitit (6)
- # remote-jobs (2)
- # rewrite-clj (36)
- # ring (4)
- # shadow-cljs (16)
- # spacemacs (16)
- # tools-deps (91)
- # vim (8)
- # yada (2)
How do I get Cursive to ignore a deftest? Tried commenting it out but it still gets picked up by Cursive when running 'Run all tests in namespace'
I don't know how cursive is doing that but I guess the problem is that you've evaluated the namespace and didn't restart the repl after commeting out the test definition so it's still present.
Just restarted REPL and it worked. But if I uncomment test then comment again I get the same issue.
Yep, as I suspected, it keeps the reference to the old test which is expected - not Cursive related I think, just a usual "gotcha" you get with REPL.
You actually need to explicitly remove the definition from the running system, for which you can, e.g., use
remove-ns (and then "load file" again)
As a workaround, I comment out the
testing forms using
#_s. I guess you could make a repl command that refreshes the ns and bind it to a shortcut.
@U3G3MBL9H Yes, @U06BE1L6T is correct I think, Cursive uses
load-file which doesn’t completely remove the test NS and just loads the new state of the file on top of it. You can use
remove-ns manually to do that. There’s an issue somewhere talking about this I think.
Actually, I can’t find one specific to tests, there’s one talking about using it for “Load file in REPL”.
^ someone following instructions on how to use clj-kondo (a Clojure linter) in Cursive, but he's not able to get it all working. Maybe some of you could help.
his screenshot doesn't show what he has for working directory btw, your screenshot on your editor-integration.md file has a value for scope (All Places) that appears inconsistent with the text description (Current File). Petrus Theron has the value corresponding to the text. in my tests, that value (Current File) works at least on some flavors of linux.
I’m entirely new to Cursive (trying it out, finally!). What do I do with the unresolved typos?
You can alt-enter when your cursor is at the typo, then there will be an option to add the word to the project level dictionary. Another option is to turn the checking off.
So, this dictionary is separate to namespace resolution? I.e., they can be resolved OK, and there’s still a typo because the word itself is unknown?
Yes that's it. I can't remember seeing
defsc as a typo, and I guess ideally it would not be if you have resolved it to the fulcro namespace. But I assume you've already done that, as described http://book.fulcrologic.com/fulcro3/#_ide_integration.
Yeah, indeed, and I’ve verified that the resolutions are set up in preferences. Unfortunately, this doesn’t seem to actually resolve the symbol in question.
Yes, doesn't add it to the dictionary at the same time. But it is a minor thing to add words to the dictionary and only takes a few seconds really. But it is quite powerful to have cursive know the special Fulcro symbols. For instance any defsc component can be searched for by name with ctrl-shift-alt-N, just as you would search for any other symbol.
Yes, there are two types of thing that get marked - one is just spell checking, like:
Those you can just add to IntelliJ’s dictionary assuming you think the spelling is ok.
The fix for those is case-specific, sometimes you can use Resolve as…, sometimes it’s something being misconfigured, and sometimes it’s just something that Cursive doesn’t understand that I still need to fix - CLJS is particularly bad for this last category, I’m planning to work on that soon.
This was fortuitous as it prompted me to set up clj-kondo for Cursive, which works well 🙂 (it goes a bit nuts with all the Fulcro macros, but I love it nonetheless)
@U06B8J0AJ You can configure it to go less nuts with the macros using configuration: https://github.com/borkdude/clj-kondo/blob/master/doc/config.md
Ah, neat. Seeing as more than one person is likely to use Fulcro etc., would you be open to PRs for “templates” of configuration for stuff like Fulcro?
Very much so. If you could post the config that works for fulcro here: https://github.com/borkdude/clj-kondo/issues/559
A question regarding running multiple REPLs. I’ve set it up like follows: start an external REPL, courtesy of shadow-cljs, connect two REPLs to it, one in which I run
(shadow/repl :client) to target CLJS. The other one is for CLJ.
This works well enough, though it requires switching to the correct REPL when jumping between CLJ and CLJS.
Is it possible to set this up to target the correct REPL automatically given the current file type?