Observing something new with conjure + clojure-lsp + coc
Opening a file (without a repl reunning), shows this
[coc.nvim] changed 1 buffers, use :wa to save changes to disk and :copen to open quickfix list
In the hud, this shows:
(ns my.funkynamespace.conjure-log-627276)
No changes have been made to the file, it's just on open.
coc thinks there has been changes - perhaps it's refering to the hud window?
yes, it appears that conjure writing into the hud window the log information, causes coc to think there are file changes
😕 oh dear, that sucks
That log is very clearly marked as a scratch buffer and as such isn't marked as modified etc since it's never intended to be written.
It only recently started to happen - only noticed past day (or two?)
It could be coc or conjure?
Could try rolling back Conjure and seeing if it persists I guess :thinking_face: I'm wondering if it's because I'm inserting a sponsor early on in the buffer lifecycle now and there's some race condition in nvim/coc that means I should wait a tick for the buffer to exist then append a line.
Happy to try out a branch for if you wish 🙂
On launch, it fires up, the file is loaded, the hud is displayed, including the sponsor information and connection to localhost refused (as I'm not running a repl)
after about 1-2 seconds the (ns....)
appears at the top of the hud
That ns part is new, I've never seen that before.
then coc then flags the file needs saving
I wonder if the insertion of that ns
thing is from one of your plugins because that shouldn't ever happen... I've never written anything to do that
And maybe that's what's tripping Conjure up
So it's unrelated to the sponsor information
I don't do anything else :thinking_face: other than try to eval your current namespace if you have a connection to ensure it's loaded for future evals.
I wonder which plugin, for it would have to be LISPy aware to create the form?
Apparently coc-conjure is broken with a newer version of coc too due to a breaking API change
oooh
https://github.com/jlesquembre/coc-conjure/issues/6#issuecomment-698079291
But that's probably not your issue.
maybe? If it's fixed afer this is patched in, the problem solved.
Seems plausible
you do write out a conjure-log right?
It is never written to disk
If it is, that's not me
It's an in memory only buffer
then coc is broken then
:thinking_face: can you try an older version of it somehow?
It'd be great to rule things out
(I don't trust anything JavaScript 😬)
[trace - 09:07:18] received request 'workspace/applyedit - (2)'.
params: {
"edit": {
"documentchanges": [
{
"textdocument": {
"version": 0,
"uri": "file:///...../repository/conjure-log-635570.cljc"
},
"edits": [
{
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 0,
"character": 0
}
},
"newtext": "(ns t.....conjure-log-635570)"
}
]
}
]
}
}
it's thinking there is a file changed, and since the hud has the focus it's writing out to there.
Can you configure coc to exclude the log buffer maybe?
I'll have a play
brb
Sure thing, but I can promise you that I'm not writing that ns text... I hope. Nowhere in Conjure does it intentionally edit any buffer of yours by adding a ns or whatever, that's down to you to edit.
🙂
I trust you 🙂