-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Labels
Description
I'm trying to debug why plugins don't work. I added lots of logging prints and apparently we're not getting any messages at all. While trying to debug, I found this:
> e <- attach' "/tmp/nvimHeJ6f9/0"
> runNeovim e () (vim_get_buffers)
^CInterrupted.
> e <- attach "/tmp/nvimHeJ6f9/0"
> runNeovim e () (vim_get_buffers)
(Right [Buffer "\STX"],())
Here are attach' and attach:
attach :: FilePath -> IO (ConfigWrapper RPCConfig)
attach sockPath = do
h <- createHandle ReadWriteMode (UnixSocket sockPath)
q <- newTQueueIO
e <- ConfigWrapper q <$> newRPCConfig
_ <- forkIO $ runSocketReader' h e
_ <- forkIO $ runEventHandler' h e
return e
-- | FIXME: This doesn't work!! Use attach!
attach' :: FilePath -> IO (ConfigWrapper RPCConfig)
attach' sockPath = do
q <- newTQueueIO
e <- ConfigWrapper q <$> newRPCConfig
_ <- forkIO $ runSocketReader (UnixSocket sockPath) e
_ <- forkIO $ runEventHandler (UnixSocket sockPath) e
return eHowever, fixing this doesn't solve the issue. I'm still trying to debug and will close this issue with my PR that fixes plugins.