Fork me on GitHub
#vim
<
2020-05-02
>
dharrigan13:05:57

Is there a way to subtly change the background colour of the form block that the cursor is in? To visually show the scope, if you know what I mean, of the block. As you move the cursor up and down, between forms, the subtle background highlight would change shape. I know, presently, that I rest my cursor on an opening, or closing, parens, it shows it's counterpart, but I'm after showing the entire block.

dominicm13:05:54

I've seen something for this, but I don't recall the name

dominicm13:05:03

Might be starred, I'll have a look

Chase16:05:55

I've been exploring clojurescript again and was curious if fireplace is able to show documentation for cljs functions and whatnot.

Chase16:05:06

I keep getting error messages like:

Chase16:05:07

Error in phase :compilation Unable to resolve var: special-doc in this context at line 1 cljs/us er.cljs Error detected while processing function <SNR>80_Doc[5]..fireplace#i nfo[39]..fireplace#query[10]..<SNR>80_PlatformDelegate[7]..<SNR>80_E valQuery:

Chase16:05:26

Not sure if I have to do something different or if it's just not an available feature.

dominicm16:05:01

It is available

Chase18:05:11

I wonder if it is because I'm starting my nrepl through shadow-cljs? I do have cider/cider-nrepl in my dependencies.

dominicm18:05:17

It should work with shadow.

dominicm18:05:33

Do you have a cljs/user.cljs file maybe?

dominicm18:05:40

does it work in a fresh shadow project?

Chase18:05:31

It was a pretty vanilla shadow cljs project starter. I'm doing a tutorial

Chase18:05:22

when I run the shadow-cljs watch app command it starts the nrepl but now I am realizing there is no repl prompt.

Chase18:05:33

No user.cljs file either

Chase19:05:52

My workflow so far is start up the nrepl with that command (according to the tutorial guide) and then use :Connect 3333 to connect fireplace and then use :Piggieback to connect the cljs. It connects because I'm able to evaluate things and (js/alert "test") works. But just no docs. Not a huge deal but I was curious

Tim Smart00:05:58

If cider/cider-nrepl is in your dependencies, then this should work: • Run shadow-cljs watch app • Make sure the build is running in your browser / node-script is running before moving any further • Then run :CljEval (shadow/repl :app) to start the ClojureScript REPL Fireplace mappings like K should work now. No need to run Piggieback.

Chase15:05:36

That is good to hear about no piggieback needed! Thank you.

Chase15:05:49

Unfortunately K still doesn't work.

Chase15:05:54

Here is the full error message I am seeing

Chase15:05:59

Error detected while processing function <SNR>80_Doc[5]..fireplace#info[39]..firepla ce#query[10]..<SNR>80_PlatformDelegate[7]..<SNR>80_EvalQuery: line 27: E605: Exception not caught: fireplace.vim: No value in {'status': ['done'], 'id': 'b 4cec1fd-4210-4f20-4d97-5043618cdd92', 'session': ['cfa62d63-19c3-48bd-bafa-09368991a d4a'], 'err': 'Error in phase :compilation^@Unable to resolve var: special-doc in th is context at line 1 cljs/user.cljs'}

tpope06:05:09

i can tell from the stacktrace cider-nrepl isn't active

tpope07:05:27

i don't remember what contortions were needed to get it to load off the top of my head, but I'm pretty sure it was more than just "add it to the dependencies"

dominicm07:05:59

Shadow automatically loads it if it's on the classpath

tpope07:05:10

i mean i don't doubt you but does it also require a full moon or something? I recall it being sooooo fiddly

Tim Smart07:05:49

Oh right, it just worked ™️ for me :man-shrugging:

Tim Smart07:05:49

Compared to getting figwheel working with my vim setup it was surprisingly easy. Maybe I was battle hardened by that stage lol.

tpope07:05:04

figwheel ... might have been worse lol

dominicm07:05:44

https://shadow-cljs.github.io/docs/UsersGuide.html#_dependencies_3 > Shadow-CLJS will inject the required CIDER-nREPL middleware once it sees this dependency.