This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-28
Channels
- # babashka (28)
- # beginners (252)
- # bristol-clojurians (2)
- # calva (28)
- # cider (11)
- # clj-kondo (15)
- # cljs-dev (7)
- # clojure (378)
- # clojure-europe (4)
- # clojure-italy (4)
- # clojure-nl (3)
- # clojure-norway (4)
- # clojure-uk (32)
- # clojurescript (128)
- # cursive (39)
- # data-science (18)
- # docker (37)
- # figwheel-main (10)
- # fulcro (45)
- # ghostwheel (7)
- # graalvm (2)
- # hugsql (1)
- # jobs (2)
- # joker (5)
- # kaocha (5)
- # luminus (12)
- # off-topic (37)
- # onyx (4)
- # pathom (22)
- # pedestal (70)
- # re-frame (7)
- # reagent (30)
- # ring (4)
- # shadow-cljs (12)
- # spacemacs (1)
- # sql (26)
- # tools-deps (7)
- # vrac (2)
- # vscode (7)
- # xtdb (27)
Hello @borkdude, thank your for the great tool first and foremost :) I'm trying to get LSP server working with clj-kondo-lsp-server-2020.01.13-standalone.jar
and IntelliJ IDEA 2019.3.1 + LSP Support 1.6.0 (+ Cursive) as per https://github.com/borkdude/clj-kondo/blob/master/doc/editor-integration.md#lsp-server-1. For reason or another, when trying to set {:lint-as {nedap.speced.def/defn clojure.core/defn}}
in .clj-kondo/config.edn
to resolve speced defn as defn it does not seem to work. Simple things like linting (inc "a")
work as expected.
Is there something I'm missing in the configuration/misconfiguration or is there a way to debug this in someway?
> thank your for the great tool thanks! > it does not seem to work can you try to reproduce this using a command line invocation, as that excludes issues with other tooling can you also give a bit more information than "it does not work"? :)
Here's how it shows up on idea when I have LSP running. Normal defn just shows the "typo" green, but for speced/defn I'm getting red underlining which does not happen without clj-kondo. When LSP server raw command is removed, both show without red underlining. Not working might be overstatement, but it's visually less appealing this way.
e.g.:
$ clj-kondo --lint - --config '{:lint-as {nedap.speced.def/defn clojure.core/defn}}' <<< "(ns foo (:require [nedap.speced.def :as speced])) (speced/defn destructuring-example [{:keys [^string? a] :as ^::thing all}])"
<stdin>:1:104: warning: unused binding a
<stdin>:1:120: warning: unused binding all
Maybe you do not have the alias speced
since that's also underlined in your screenshot
It's just for the "typo warning", but I will try with the cli option to see what's-what
This is my lint-as option map btw:
:lint-as '{nedap.speced.def/def-with-doc clojure.core/defonce
nedap.speced.def/defn clojure.core/defn
nedap.speced.def/defprotocol clojure.core/defprotocol
nedap.speced.def/doc clojure.repl/doc
nedap.speced.def/fn clojure.core/fn
nedap.speced.def/let clojure.core/let
nedap.speced.def/letfn clojure.core/letfn}
@UHJH8MG6S and I assume that works for you?
@borkdude it does, but i run the formatter using the clj-kondo.core/run!
api, no LSP setup here.
Maybe the editor is not picking up your config because of the current working directory your in @USR9PTXHB
Works now, it must be that my IDEA setup was different for this project. It works on a different project as expected. Thank you all for the input & help 🙂