Comments (19)
Well that's weird... definitely some strange path things going on here but glad the hunch was essentially correct. I think different functions in nvim are reporting different paths depending on your dir being in a symlink or not π¬
But yay! It's fixed! Thank you for your thanks, there's a lot more to do before I'm relatively happy, I hope you get a lot of value out of my work π
from conjure.
from conjure.
from conjure.
I am informed by the OSX dev to my right that it does have a /tmp
, so it's probably not the /tmp/conjure.cljc
buffer not being created. I would guess it's a setting in Neovim like "new lines at end of empty files" or something so the line count is reporting nil
instead of 0
.
Your logs will prove this though, every RPC call gets written there when it's enabled so we'll see what Conjure asked and what it got back from Neovim π should be an easy fix.
from conjure.
I really appreciate you taking the time to look into this. Yes the /tmp exists and I can see the buffer in the split.
NVIM v0.3.4
Build type: Release
LuaJIT 2.0.5
Here is the log output.
INFO [conjure.dev:17] - Logging initialised
INFO [conjure.rpc:132] - Starting RPC loops
TRACE [conjure.rpc:162] - Received RPC message: {:type :notify, :method :add, :params ["{:tag :dev, :port 40404}"]}
INFO [conjure.prepl:110] - Adding :dev 127.0.0.1 40404
TRACE [conjure.rpc:151] - Sending RPC message: {:type :request, :id 1, :method :nvim-execute-lua, :params ["return require('conjure').upsert_log(...)" ("/tmp/conjure.cljc" 40 false false)]}
TRACE [conjure.rpc:120] - Sent request, awaiting response: {:type :request, :id 1, :method :nvim-execute-lua, :params ["return require('conjure').upsert_log(...)" ("/tmp/conjure.cljc" 40 false false)]}
TRACE [conjure.rpc:154] - Sent!
TRACE [conjure.rpc:162] - Received RPC message: {:type :response, :id 1, :error nil, :result nil}
TRACE [conjure.rpc:26] - Received response: {:type :response, :id 1, :error nil, :result nil}
TRACE [conjure.rpc:120] - Sent request, awaiting response: {:type :request, :id 1, :method :nvim-buf-line-count, :params [nil]}
TRACE [conjure.rpc:151] - Sending RPC message: {:type :request, :id 1, :method :nvim-buf-line-count, :params [nil]}
TRACE [conjure.rpc:154] - Sent!
TRACE [conjure.rpc:162] - Received RPC message: {:type :response, :id 1, :error [0 "Wrong type for argument 1, expecting Buffer"], :result nil}
TRACE [conjure.rpc:26] - Received response: {:type :response, :id 1, :error [0 "Wrong type for argument 1, expecting Buffer"], :result nil}
ERROR [conjure.nvim:12] - Error while making nvim call {:method :nvim-buf-line-count, :params [nil]} -> {:error [0 "Wrong type for argument 1, expecting Buffer"], :result nil}
ERROR [conjure.rpc:?] - Error from thread 'RPC message handler': java.lang.NullPointerException
from conjure.
Not a problem! You're helping me make a better tool by reporting it!
Received RPC message: {:type :response, :id 1, :error [0 "Wrong type for argument 1, expecting Buffer"], :result nil}
Hmm, that'll be the one. So I wonder why the buffer is nil, that should be the reference to the log buffer that comes back from the Lua code. A bit convoluted I know, but I have my reasons π
from conjure.
from conjure.
This means that one of these is returning nil when it should be returning the buffer ID:
Lines 3 to 49 in 68c2dac
And you won't see it in the buffer list, it's a special hidden thing that can't be accidentally written to a file or clutter your buffer list etc. As long as you can see the window with the buffer name set to /tmp/conjure.cljc
that's enough proof for me.
So why the nil... I do wonder if it could be some sort of race condition that isn't present on my machine.
from conjure.
Is there anything else interesting / scaring in :messages
? Like possibly related to these commands?
Lines 34 to 41 in 68c2dac
I wonder if one of those could be failing and causing the Lua function to return nil after mostly creating the buffer.
from conjure.
from conjure.
Just out of interest, swapping your vim-plug call to 'commit': 'ecfb1c09e5e8258036dfb30f3927e33488533e98'
doesn't help, right? I just fixed the requiring of Compliment if you don't have it in your project.
from conjure.
from conjure.
Okay, I'm out of lunch time now but will have a look ASAP. Just need to try and repo which seems hard π¬ I'd be surprised if it was OSX specific but maybe! Do you have other plugins / settings or is it a blank neovim? I might try to repro it in a bare bones neovim environment.
Latest commit is better too, prints out the full stack trace when something goes wrong 063c29b54459a326b5ff244685dd2765bcd19adf
.
from conjure.
from conjure.
I'll try a stripped down neovim soon and see if I can reproduce it there. I would put money on this being some weird setting that most people have set that might not be set by default. It's so odd how the Lua, Clojure and VimL is all up and talking to each other but still manages to get a nil where it shouldn't.
That nil means it couldn't find the Conjure buffer/window. This could be a race condition (ahhhhh) or it could just be a setting on the buffer / neovim instance. I'll work it out π
from conjure.
from conjure.
Ah! OSX's /tmp
is a symlink if I'm not mistaken to /private/tmp
or something of the sort. Could you confirm that the Conjure buffer isn't in the place I expect by running :echo expand("%:p")
? I bet it's not /tmp/conjure.cljc
. I'll start looking for a better solution that should work for you now, if that is indeed the problem.
from conjure.
If my hunch is correct, this commit should fix it! If you get a chance to give it a go let me know how it goes π 3918cbc
from conjure.
from conjure.
Related Issues (20)
- [Feature Request] Add Tangerine support (Fennel)
- Duplicate kondo messages with Lazy and your provided config HOT 7
- Randomly losing keymaps HOT 1
- Clojure: evaluate word misinterprets single-quotes in symbol names HOT 6
- [Clojure]: A way to configure a default namespace HOT 6
- Swap `__name__` to something other than `__main__` in Python REPLs HOT 3
- README Suggestion HOT 2
- Cannot connect to Scheme through socket HOT 2
- Async/await doesn't work with ipython REPL HOT 13
- stdio repl handling of both stderr and stdout for a form can be a problem sometimes HOT 1
- <localleader>ee, <localleader>E evaluate the whole file HOT 9
- Problems with evaluation: wrong returns HOT 3
- Guile over nREPL, guile-ares-rs integration HOT 4
- Clojure Debugger: Evaluation failing on debug reader tags HOT 4
- Local leader key not active when open scm files HOT 7
- Common-Lisp: Only first expression is evaluated using ConjureEvalBuf HOT 19
- Feature request: Re-run last test HOT 2
- Disable ConjureOmnifunc for Janet? HOT 4
- Common Lisp/ros/swank not behaving as expected HOT 15
- No syntax highlighting in log buffer when opening file using telescope. HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conjure.