This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-08
Channels
- # announcements (40)
- # babashka (14)
- # babashka-sci-dev (7)
- # beginners (50)
- # calva (8)
- # cider (25)
- # clj-kondo (7)
- # cljdoc (8)
- # cljs-dev (14)
- # clojars (6)
- # clojure (56)
- # clojure-australia (1)
- # clojure-berlin (2)
- # clojure-dev (16)
- # clojure-europe (18)
- # clojure-nl (1)
- # clojure-norway (5)
- # clojure-uk (7)
- # clojurescript (100)
- # cursive (57)
- # data-science (9)
- # datomic (6)
- # emacs (11)
- # figwheel (2)
- # fulcro (14)
- # helix (2)
- # hyperfiddle (9)
- # introduce-yourself (1)
- # lsp (20)
- # malli (14)
- # meander (34)
- # minecraft (1)
- # missionary (8)
- # off-topic (37)
- # pedestal (4)
- # polylith (18)
- # portal (3)
- # re-frame (5)
- # ring (33)
- # shadow-cljs (32)
- # spacemacs (6)
- # vim (16)
I'm not sure if this is an LSP problem or a vim configuration issue, but I notice that if I have a clj-kondo :lint-as
config such as:
com.wsscode.pathom3.connect.operation/defresolver clojure.core/defn
When I and define a resolver with defresolver
, my editor subsequently does not show me the docstring or arglists for it as it does with a defn
. Is this expected behaviour?it could be a bug on clj-kondo, do you have a sample project where I can give it a try? also, I can see how this config could go on pathom3 project itself to work out of the box for all users of the lib c/c @U066U8JQJ :) (https://github.com/nubank/state-flow/blob/master/resources/clj-kondo.exports/nubank/state-flow/config.edn)
It is in Pathom3's shared clj-kondo config: https://github.com/wilkerlucio/pathom3/blob/main/.clj-kondo/com.wsscode/pathom3/config.edn#L2 As for clj-kondo, it does actually include the information in the analysis data:
#?(:clj
(pco/defresolver fooburr
[{:keys [x]}]
{:foo :bar}))
{:fixed-arities #{1},
:end-row 396,
:name-end-col 28,
:name-end-row 394,
:name-row 394,
:ns foo,
:name fooburr,
:defined-by clojure.core/defn,
:lang :clj,
:filename "./src/foo.cljc",
:col 4,
:name-col 21,
:end-col 18,
:arglist-strs ["[{:keys [x]}]"],
:row 394}
Would you still like a repro repo?that folder is for pathom3 project only, when you are coding on that project, to export that config it need to be inside the classpath, usually in the resources folder
I see. I'll read this part of the docs to remind me how it should work. Maybe I have something misconfigured elsewhere. But it doesn't change the observation since I have it in my project .clj-kondo/config.edn
anyhow, right?
@UPWHQK562 also check if might be a bug in the LSP implementation for vim, I use that config to lint projects with Pathom, but since I use IntelliJ as the editor I'm not going though LSP for editor hints
and as @UKFSJSM38 pointed, this is where the exports go from in Pathom 3: https://github.com/wilkerlucio/pathom3/blob/main/resources/clj-kondo.exports/com.wsscode/pathom3/config.edn
How can I verify that clojure-lsp itself has the data to check whether it's a vim (coc.nvim) issue?
@UPWHQK562 maybe with a sample project I can try at my side and remove any possibility to be a bug on server side
Ah, figured it out. It was an issue with my vim configuration and not with LSP. Sorry to bother and thanks for the help!
Related: if I have a macro in :lint-as
, the unresolved symbol errors go away, but should I expect it to work with lsp-find-definition
, etc?
I.e. if I have (deffoo foo ...)
, and call foo
, lint-as
makes the linter errors go away, but I still can't get to the deffoo
line with lsp-find-references
etc