Funny story, I went searching for a scheme plugin and stumbled on this one https://github.com/Olical/vim-scheme by guess who? Hahaha. And he created it to use while working through SICP. Well played @olical
Haha, I am aiming for conjure to massively deprecate that plugin :) but if it works, yay!
And @chase-lambert @dave you can configure the racket repl startup options, see the racket specific help :D
There's an option for the command it invokes
Cool, I will look into that tomorrow. I don't mind using this old scheme tool of yours either though. It is funny seeing the mix of fireplace shortcuts and what were probably your first ideas of conjure commands mixed together
Yeah I'm sure there's some precursor ideas before Conjure plopped into my head 😄 it's also what made me realise how difficult it is to do that sort of thing in VimL, so probably helped kick me towards Aniseed. It may have been the last VimL plugin I tried to write :thinking_face: wondering how much better I could write https://github.com/Olical/vim-enmasse/ now too!
Does Conjure support some sort of jump-to-var type thing?
Yup, for Clojure at least
<prefix>gd
It's not on gd
(unprefixed) because that can be handy for jumping to files etc and I didn't want to hide core nvim functionality.
Oh, I actually meant more based on a fuzzy search than whats under the cursor
sorry, wasn’t very clear 😅
Like I’d like to use FZF to search for vars in my codebase
Oh :thinking_face: so listing every var in the system
currently I use ripgrep and then just def thing-im-looking-for
but I think it might be nice to just give a fuzzy search across vars
another thing where clj-kondo static analysis could shine
I mean, this wouldn't be core conjure functionality because it assumes a few other plugins, but it could be an extra thing / a recipe we work out that others can paste into their config.
I think we could query the REPL for every var currently loaded
personally I’m more interested in the static analysis approach because I mostly do cljs and am not always connected to a REPL
but fair point with involving other plugins for sure
I’m gonna take a look if I can hack this together
Hmm does LSP support this through clojure-lsp then?
Feels like a great candidate for that
I haven’t tried that. Are you using clojure-lsp with Conjure?
I’m still a bit burned from years ago when all these plugins would conflict in one war or the other
I am still kinda trying to keep Conjure clear cut in that it's all about sending code to a process for evaluation then doing something with the result from your live system. Less about analysing code on disk.
And nope, never have
I only use Conjure
+ fzf + rg
(map second (mapcat ns-interns (all-ns)))
so that's every var in my project
clojure
{:private true,
:arglists ([code line column]),
:line 42,
:column 1,
:file "nrepl/middleware/interruptible_eval.clj",
:name source-logging-pushback-reader,
:ns #namespace[nrepl.middleware.interruptible-eval]}
Each of which is a var, so you can get source metadataSo this could be mapped into a list filtering plugin, 100% 🙂
YMMV in CLJS land, but it may well work. I know var location metadata can be very flaky in CLJS, which is why I relied on nREPL and it's info op.
Oh-oh
Error executing vim.schedule lua callback: /home/david/.vim/bundle/conjure/lua/conjure/log.lua:400: Conjure failed to append to log: String cannot contain newlines
Just updated
Well that's weird... I didn't change anything that would effect that :thinking_face: I'll try and reproduce this tomorrow
One of my require's had a require that didn't compile
thus when that failed (and caused the particular namespace I was evalling a buffer on to fail), caused this
Ah okay! This sounds like something that has been around for a while then!
Thanks, I'll fix this and release it tomorrow
So I need a require to fail in a namespace?
If you can repro it again that'd be amazing
I'll see if I can reproduce this, but in all honesty, this is the first time I've seen this
I'm assuming it's what I said, but needs me to reproduce it again 🙂
Hmm I tried to require a file that required another file that had invalid syntax but it worked (as much as you'd expect it to) :thinking_face: not sure if I can repro, I'll read the code and see if I can spot any place a newline could slip through.
Maybe your Clojure is adding new lines into an error message that I never expected or something.
Oh! Actually! The next line after that error should have been the offending lines that caused the issue! Did you see any? It'd be in :messages
if not I guess.
Unfortunately, no longer exists. I'll keep an eye and report if it happens again.
:thinking_face: I'm considering putting a guard in, but I try to avoid regexing strings and mapping over every line I'm logging wherever possible. I don't want do too much processing to each line so when you print a 10k line data structure it actually displays within a few seconds.
However, this might be good, I'm considering replacing \n
with a ↵
They shouldn't ever get through, but at least the line will still display if it does.
Pushed a patch to develop
that does this. Now if I spot a ↵
I'll know there's a case where a new line can slip through.