Open isovector opened 2 years ago
This is a bug upstream https://github.com/neovim/neovim/issues/21239
Is it something we can work around in nvim-hs in the meantime?
You can use the swiss army knife of api functions: nvim_call_function
getExtmarkIntervalById :: Int64 -> Buffer -> Int64 -> Neovim env Object
getExtmarkIntervalById ns b x = do
!z <- nvim_call_function "nvim_buf_get_extmark_by_id" (b +: ns +: x +: Map.singleton "details" True +: [])
pure z
Amazing, thanks @saep ! And thanks for being so responsive always!
Thank you for your kinds words!
I wonder if I had known to work round this issue in this way if I hadn't added nvim_call_function
to the neovim codebase myself. ^_^
When
nvim_buf_get_extmark_by_id
is called with a map containing{"details ": true}
, it also returns the details object. But nvim-hs is expecting to parse the result asVector Int64
, which isn't true :)The following snippet crashes nvim-hs:
with the error
A better type here I think would be: