Fork me on GitHub
#calva
<
2019-08-19
>
borkdude09:08:21

@pez An idea: clj-kondo could emit calls to an LSP-server that collects information about defn locations, arities etc, which could then be used for editor tooling. Not sure if that would be somehow useful for Calva, or what the state of LSP in Clojure is. I'm not using LSP myself, but if this information that clj-kondo has could somehow be useful to anyone, I guess it could make sense

borkdude09:08:07

There is already an LSP project for Clojure which might already do all of this

borkdude09:08:47

if that sounds useful, let me know, else you can ignore this 🙂

pez10:08:05

@borkdude, we've been discussing this LSP business some in various fora lately. And how to distribute it with Calva, and what clojure-lsp and clj-kondo brings to the table, and which library/tool should be responsible for what, and ... Well, let's just say this is material for many discussions. 😃 I'd like it if the work with this is Orchard first, so that we can enrich many tools and editors with the same base framework. Even if LSP as such is particularly interesting for Calva.

Cas Shun16:08:55

Hello, I'm trying to figure out if it's possible (or how to) use Calva Paredit with other languages. I've become very used to the bindings, and it'd be nice to use it when having to jump to a json tab or whatever.

pez16:08:20

@auroraminor, hello, and welcome! I spent some time with that a while ago, for the same reasons as you. My conclusion was that with the current paredit.js engine, it is not really doable. And I think that also goes for the new paredit engine we're using for the REPL window.

pez16:08:19

The assumption of LISP is too strong.

Cas Shun16:08:54

so this is a limitation of paredit.js?

Cas Shun16:08:20

I'm coming from emacs relatively recently, where I used paredit everywhere pretty happily for quite a while.

Cas Shun16:08:42

I tried the various paredit-y things like smartparens, lispy, cleverparens etc... not a fan 🙂

pez16:08:38

I have never used smartparens, so I don't know if I am a fan. 😃 But it sure looks nice at the README level.

Cas Shun16:08:40

I have calva setup with emacsy paredit bindings, and that works for me in vscode. Just wish I could get the outside my clj/cljs tabs

pez16:08:58

Yeah, I agree. My experiments with it weren't successful though. Doesn't mean it is not within reach, just that I didn't find the path then. I also once started to port paredit.clj to cljc, but stopped that quite quickly because I realized I wanted to use my time to other things. No idea if paredit.clj is easier to use on non-lispy languages though.

Cas Shun16:08:49

I think I should be clear that my main concern is for the navigational capabilities. The refactoring abilities are clearly not so useful.

pez17:08:56

My main focus when I was looking into it was slurp and barf. Maybe navigation is easier to achieve.

gerred18:08:11

@pez is there a setting (even a general VSCode one) for setting the font size in the REPL? it's a lot larger than my normal editor size

Matthew Davidson (kingmob)19:08:06

I did that, but it involves installing a VSCode plugin to allow you inject custom CSS, and then creating a stylesheet to alter it. Calva tries to pull some basic style info from VSCode, but the REPL is effectively a separate webview, and will probably look different for a long time to come.

pez19:08:30

What he said.

pez18:08:08

@gerred No, there isn't. But there might be some way to add it that I have missed. Most REPL window styling is done via css variables, because vscode injects those into the webview. This in order to let the webview use the theme styling. There is even a variable for the font size. But I haven't found a way to use that because it is given as a number and my css fu can't convert that to a size property.