Fork me on GitHub
#lsp
<
2022-03-10
>
snoe04:03:07

@ericdallo heads up make is broken on the cli because of this line: https://github.com/ericdallo/deps-bin/blob/master/deps.edn#L3 due to the log4j vulnerability, I overrode to 2.17.2 and that seemed to work (you might have to rm log4j from your .m2 dir to reproduce

ericdallo14:03:49

good to know, thank you! will take a look soon

ericdallo15:03:54

I couldn't repro after removing log4j from .m2, but I released deps-bin 0.1.2 bumping most libs and bumped on clojure-lsp to avoid any issues

robert-stuttaford14:03:12

i would love a tool that allowed me to, in the source code on disk, move vars between namespaces, and have it automatically update all the relevant namespaces correctly - adding new requires, removing old (but only if they're not already correct). is there such a thing? how close are we to being able to do this? what's the next step?

5
ericdallo15:03:24

It's a valid idea, and possible but not easy to implement it though, already mapped on this issue: https://github.com/clojure-lsp/clojure-lsp/issues/566

👀 1
dharrigan15:03:22

I can't recall, but doesn't clojure-lsp, when "new`ing" a new file (in vim, emacs?), have the ability to pre-populate the file form a template?

ericdallo15:03:47

If template you mean only the ns form, yes

dharrigan15:03:57

where does it pick up that template from?

ericdallo15:03:37

It's hard coded on clojure-lsp, it just add the ns form

dharrigan16:03:03

ah, just the top level form name, i.e., (ns foo.bar) for example?

dharrigan16:03:14

Ah okay. then I've spotted something then. I have a .projections.json file which is used by vim-projectionist that reads in a template (in effect, overwriting the (ns foo.bar). It works, but I've noticed that if the template has meta data in it, i.e:

dharrigan16:03:31

(ns foo.bar
  {:author "Who me?"}
(:require ......)

dharrigan16:03:35

Then the meta data is removed

dharrigan16:03:41

(the require and all is kept)

ericdallo16:03:22

Clojure-lsp doesn't change or touch that, could you test without LSP enabled?

dharrigan16:03:15

Certainly, a moment...

dharrigan16:03:16

ahhh,it's me 😄

dharrigan16:03:51

fwiw, for anyone using projectionist and vim (woot), you have to use the literal {open} and {close} for the curlies 🙂

👍 1
dharrigan16:03:15

i.e., {open}:author "Who me?"{close}

dharrigan15:03:32

or, am I imagining things?