This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-28
Channels
- # aleph (4)
- # announcements (5)
- # babashka (28)
- # babashka-sci-dev (13)
- # beginners (63)
- # calva (76)
- # cider (113)
- # clara (7)
- # clj-kondo (42)
- # cljdoc (1)
- # clojure (170)
- # clojure-europe (20)
- # clojure-nl (17)
- # clojure-norway (3)
- # clojure-spec (12)
- # clojure-sweden (1)
- # clojure-uk (6)
- # clojurescript (55)
- # clojureverse-ops (1)
- # consulting (1)
- # core-async (9)
- # cursive (16)
- # data-science (1)
- # datascript (8)
- # datomic (27)
- # emacs (14)
- # events (1)
- # fulcro (10)
- # graphql (9)
- # gratitude (1)
- # jobs (6)
- # jobs-discuss (5)
- # leiningen (10)
- # lsp (35)
- # missionary (4)
- # nextjournal (9)
- # off-topic (46)
- # pathom (15)
- # pedestal (5)
- # polylith (37)
- # portal (15)
- # re-frame (22)
- # reagent (4)
- # reitit (5)
- # reveal (18)
- # shadow-cljs (20)
- # tools-deps (7)
- # xtdb (10)
How do we use the add missing require
feature in NeoVIM?
clojure-lsp will return a Add missing require
code action when it knows it can require that ns/alias
I just found it!
What kind of logic clojure-lsp
uses to guess it can require that alias?
• if it's common known require like string/
io/
edn/
• it's the alias already exists on another namespace of the project
• (not available on latest release yet, done last week) it tries to infer the namespace name via alias, check https://github.com/clojure-lsp/clojure-lsp/issues/614
Is it possible to tell clojure-lsp to resolve with :refer
instead of :as
?
nope, refers are harder to find since we need to check all vars on the project, but I have some ideas in mind in the future to offer that as well
I think I am asking something simpler than what you have in mind.
Let's say I am typing clojure.walk/prewalk
and instead of having clojure-lsp generate a (require clojure.walk :as [walk])
I want to generate (require clojure.walk :refer [prewalk]
Will do!
By the way, I really liked your talk at London Clojurians
https://github.com/clojure-lsp/clojure-lsp/issues/627 I thought you meant you would like a code action to add the require with :refer instead of :as, not a code action to change a :as to :refer 😅
I'm seeing the error locally (void-variable lsp-ada-project-file)
doing a M-x load-file
and loading the lsp-ada file directly fixes it, but it's weird that I get that error
I never used ada either
mm weird
I just recompiled it today
well removed and reinstalled
to get the native JSON support
I can try to remove the .elc maybe
yeah removing the elc did the trick