This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-02
Channels
- # adventofcode (153)
- # announcements (29)
- # architecture (6)
- # babashka (5)
- # beginners (197)
- # calva (71)
- # clj-kondo (27)
- # cljfx (4)
- # cljs-dev (33)
- # cljsrn (1)
- # clojure (52)
- # clojure-australia (5)
- # clojure-boston (1)
- # clojure-europe (38)
- # clojure-france (1)
- # clojure-hungary (5)
- # clojure-italy (1)
- # clojure-nl (19)
- # clojure-uk (5)
- # clojurescript (12)
- # conjure (4)
- # core-async (3)
- # cursive (22)
- # datalog (70)
- # datomic (32)
- # deps-new (8)
- # emacs (79)
- # events (2)
- # fulcro (15)
- # graalvm (15)
- # leiningen (2)
- # lsp (5)
- # minecraft (1)
- # nbb (1)
- # off-topic (37)
- # polylith (11)
- # re-frame (9)
- # reagent (1)
- # reitit (3)
- # releases (1)
- # reveal (2)
- # shadow-cljs (42)
- # spacemacs (1)
- # tools-build (4)
- # tools-deps (55)
- # vim (11)
- # xtdb (6)
Is curisve using clojure-lsp at all?
As I understand it, cursive static analysis features are based on the years of work that JetBrains put into Intellij static analysis. clojure-lsp is written from scratch and is used as a core component in Clava for VS Code and can be use with any editors that support the fairly recently published Language Server protocol standard (Emacs, Neovim, etc) Intellij was built way before that standard came out. I wonder if JetBraint Fleet editor will support the LSP standard (I assume it will have to support LSP if it's trying to compete with VS Code). If fleet does support LSP, then in theory cursive could be modified to use that approt, but as fleet hasn't even been properly release yet, there seem a lot of unknowns.
There is a intellij LSP plugin to to use clojure-lsp, but it's not actively maintained AFAIK
Fleet provides a polyglot experience, offering smart support for many languages and technologies out of the box, with support for even more planned via dedicated plugins. With the help of LSPs you will also be able to use other language services in Fleet.
so we’ll see what happens there, I guess
Cursive doesn’t use LSP at all, no. There are a couple of LSP plugins but I see a lot of complaints about them, and JetBrains have made it clear that they’re not going to support it natively in IntelliJ. Fleet should use it out of the box, though.
I think I found a bug in symbol resolution through an if-let or if-some. In this screenshot, it thinks bug
in the “else” branch references the one bound by if-let
, but actually it’s from the outer let
Actually the identity
function calls are not needed, I was just reducing from a more complex case.
"the scope should be restricted to the true arm"
Really? bug
will be falsey in the false arm, but it will still be bound (and in scope). No?
"If test is not nil, evaluates then with binding-form bound to the value of test..." That is evil. 🙂
(clojure.walk/macroexpand-all
'(if-let [b 1]
b
b))
(let* [temp__5455__auto__ 1]
(if temp__5455__auto__
(let* [b temp__5455__auto__]
b)
b))
just hit it myself.
btw I don't see any upside in temp binding instead of using user-specified one
if anything, it might mislead you in cases where sym is shadowing existing one, like test
or
(let [b 2]
(if-let [b 1]
b ;; b=1
b))) ;; b=2