This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-10
Channels
- # beginners (15)
- # boot (15)
- # cider (6)
- # cljs-dev (231)
- # cljsjs (1)
- # cljsrn (26)
- # clojure (147)
- # clojure-argentina (1)
- # clojure-dev (8)
- # clojure-germany (1)
- # clojure-italy (26)
- # clojure-russia (2)
- # clojure-spec (83)
- # clojure-uk (154)
- # clojurescript (123)
- # conf-proposals (3)
- # core-async (5)
- # cursive (26)
- # datascript (21)
- # datomic (120)
- # emacs (2)
- # graphql (9)
- # hoplon (195)
- # instaparse (16)
- # jobs-discuss (1)
- # leiningen (8)
- # luminus (8)
- # lumo (7)
- # off-topic (17)
- # om (7)
- # om-next (3)
- # parinfer (121)
- # pedestal (5)
- # planck (13)
- # re-frame (11)
- # reagent (21)
- # ring-swagger (2)
- # spacemacs (28)
- # uncomplicate (3)
- # unrepl (7)
- # untangled (34)
- # vim (5)
like, I want to be able to scroll up and down, build up forms piece by piece, edit etc, but I want option+enter to send a require to the repl, not add stuff to an ns form
Quick sanity check. Is there a way to get the core.match/match macro to syntax highlight correctly? The binding variables in particular don't get picked up.
I see this related issue https://github.com/cursive-ide/cursive/issues/1683
Just checking that there isn't a workaround
@olivergeorge No, no workaround sorry.
cfleming: No worries. Thanks for confirming.
I'm using Intellij with cursive, but it seems to be unable to resolve some of my code (like (db/add-message)
. I have been watching a video by @yogthos and it seems he has the same problem in the screen cast. So I'm assuming it is normal?
I started a new projcet with lein new luminus guestbook +sqlite +swagger +cljs
and import the db namespace as require guestbook.db.core :as db
If you look in that namespace (you can Ctrl/Cmd-click on the ns name), what does the definition of add-message
look like?
(ns guestbook.db.core
(:require
[conman.core :as conman]
[mount.core :refer [defstate]]
[guestbook.config :refer [env]]))
(defstate ^:dynamic *db*
:start (conman/connect!
{:datasource
(doto (org.sqlite.SQLiteDataSource.)
(.setUrl (env :database-url)))})
:stop (conman/disconnect! *db*))
(conman/bind-connection *db* "sql/queries.sql")
Sometimes its a bit hard to know if I'm doing something wrong or if its part of the tool chain
@shidima_ would u mind sharing which video were u watching. pls? btw, what's the goal with combining mount and dynamic vars? sounds a bit odd to me
@shidima_ i've tracked down where did this (defstate ^:dynamic *db* ...)
come from.
it was introduced when mount
was integrated into the luminus template:
https://clojars.org/luminus/lein-template/versions/2.9.8.64
at that time (2015-11-18) it used mount:0.1.2
(https://clojars.org/mount/versions/0.1.2)
which came from this commit: https://github.com/tolitius/mount/commit/a7770968dbfa4d010ed3827ce0108db5d0e27741
if you check that out, it does not mention ^:dynamic
anywhere in the source code,
so i think the luminus template just carried it around with itself in the hope of maintaining some kind of a backward compatibility, however i think it was simply a breaking change, since they fundamentally changed how *db*
should work and what should it mean.
current luminus docs doesn't show any ^:dynamic *db*
stuff either:
http://www.luminusweb.net/docs/components.md
intrestingly there is an article from 2015-12-05 from yoghtos where he says:
> Conclusion
> ...
> While it's possible to formalize the handling of stateful resources, using libraries such as component, I personally have not found this to be necessary in my applications.
— https://yogthos.net/posts/2015-12-05-LuminusComponents.html