nvim-hs 0.0.7 → 0.0.8
raw patch · 5 files changed
+28/−10 lines, 5 filesdep ~cereal-conduitdep ~messagepackPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: cereal-conduit, messagepack
API changes (from Hackage documentation)
+ Neovim.API.String: buffer_add_highlight :: Buffer -> Int64 -> String -> Int64 -> Int64 -> Int64 -> forall r st. Neovim r st (Either Object Int64)
+ Neovim.API.String: buffer_clear_highlight :: Buffer -> Int64 -> Int64 -> Int64 -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: buffer_del_var :: Buffer -> String -> forall r st. Neovim r st (Either Object Object)
+ Neovim.API.String: buffer_get_lines :: Buffer -> Int64 -> Int64 -> Bool -> forall r st. Neovim r st (Either Object [String])
+ Neovim.API.String: buffer_set_lines :: Buffer -> Int64 -> Int64 -> Bool -> [String] -> forall r st. Neovim r st (Either Object ())
+ Neovim.API.String: tabpage_del_var :: Tabpage -> String -> forall r st. Neovim r st (Either Object Object)
+ Neovim.API.String: vim_del_var :: String -> forall r st. Neovim r st (Either Object Object)
+ Neovim.API.String: window_del_var :: Window -> String -> forall r st. Neovim r st (Either Object Object)
Files
- CHANGELOG.md +5/−0
- library/Neovim.hs +5/−5
- library/Neovim/Classes.hs +13/−0
- library/Neovim/RPC/SocketReader.hs +1/−1
- nvim-hs.cabal +4/−4
CHANGELOG.md view
@@ -1,3 +1,8 @@+# 0.0.8++* Adjust version range for messagepack rpc library and adjust implementation to+ the changes in that library+ # 0.0.7 * Adjust handling of string sent by neovim in API generation.
library/Neovim.hs view
@@ -277,7 +277,7 @@ -- | Default configuration options for /nvim-hs/. If you want to keep the--- default plugins enabled, you can define you rconfig like this:+-- default plugins enabled, you can define your config like this: -- -- @ -- main = 'neovim' 'defaultConfig'@@ -329,10 +329,10 @@ -- Creating a plugin {{{2 {- $creatingplugins Creating plugins isn't difficult either. You just have to follow and survive the-the compile time errors of seemingly valid code. This may-sound scary, but it is not so bad. We will cover most pitfalls in the following-paragraphs and if there isn't a solution for your error, you can always ask any-friendly Haskeller in \#haskell on @irc.freenode.net@!+compile time errors of seemingly valid code. This may sound scary, but it is not+so bad. We will cover most pitfalls in the following paragraphs and if there+isn't a solution for your error, you can always ask any friendly Haskeller in+\#haskell on @irc.freenode.net@! Enough scary stuff said for now, let's write a plugin! Due to a stage restriction in GHC when using Template Haskell, we must define
library/Neovim/Classes.hs view
@@ -90,6 +90,7 @@ fromObject (ObjectBool o) = return o fromObject (ObjectInt 0) = return False+ fromObject (ObjectUInt 0) = return False fromObject ObjectNil = return False fromObject (ObjectBinary "0") = return False fromObject (ObjectBinary "") = return False@@ -104,6 +105,7 @@ fromObject (ObjectDouble o) = return o fromObject (ObjectFloat o) = return $ realToFrac o fromObject (ObjectInt o) = return $ fromIntegral o+ fromObject (ObjectUInt o) = return $ fromIntegral o fromObject o = throwError . text $ "Expected ObjectDouble, but got " <> show o @@ -111,6 +113,7 @@ toObject = ObjectInt . fromIntegral fromObject (ObjectInt o) = return $ toInteger o+ fromObject (ObjectUInt o) = return $ toInteger o fromObject (ObjectDouble o) = return $ round o fromObject (ObjectFloat o) = return $ round o fromObject o = throwError . text $ "Expected ObjectInt, but got " <> show o@@ -120,6 +123,7 @@ toObject = ObjectInt fromObject (ObjectInt i) = return i+ fromObject (ObjectUInt o) = return $ fromIntegral o fromObject (ObjectDouble o) = return $ round o fromObject (ObjectFloat o) = return $ round o fromObject o = throwError . text $ "Expected any Integer value, but got " <> show o@@ -129,6 +133,7 @@ toObject = ObjectInt . fromIntegral fromObject (ObjectInt i) = return $ fromIntegral i+ fromObject (ObjectUInt i) = return $ fromIntegral i fromObject (ObjectDouble o) = return $ round o fromObject (ObjectFloat o) = return $ round o fromObject o = throwError . text $ "Expected any Integer value, but got " <> show o@@ -138,6 +143,7 @@ toObject = ObjectInt . fromIntegral fromObject (ObjectInt i) = return $ fromIntegral i+ fromObject (ObjectUInt i) = return $ fromIntegral i fromObject (ObjectDouble o) = return $ round o fromObject (ObjectFloat o) = return $ round o fromObject o = throwError . text $ "Expected any Integer value, but got " <> show o@@ -147,6 +153,7 @@ toObject = ObjectInt . fromIntegral fromObject (ObjectInt i) = return $ fromIntegral i+ fromObject (ObjectUInt i) = return $ fromIntegral i fromObject (ObjectDouble o) = return $ round o fromObject (ObjectFloat o) = return $ round o fromObject o = throwError . text $ "Expected any Integer value, but got " <> show o@@ -156,6 +163,7 @@ toObject = ObjectInt . fromIntegral fromObject (ObjectInt i) = return $ fromIntegral i+ fromObject (ObjectUInt i) = return $ fromIntegral i fromObject (ObjectDouble o) = return $ round o fromObject (ObjectFloat o) = return $ round o fromObject o = throwError . text $ "Expected any Integer value, but got " <> show o@@ -165,6 +173,7 @@ toObject = ObjectInt . fromIntegral fromObject (ObjectInt i) = return $ fromIntegral i+ fromObject (ObjectUInt i) = return $ fromIntegral i fromObject (ObjectDouble o) = return $ round o fromObject (ObjectFloat o) = return $ round o fromObject o = throwError . text $ "Expected any Integer value, but got " <> show o@@ -174,6 +183,7 @@ toObject = ObjectInt . fromIntegral fromObject (ObjectInt i) = return $ fromIntegral i+ fromObject (ObjectUInt i) = return $ fromIntegral i fromObject (ObjectDouble o) = return $ round o fromObject (ObjectFloat o) = return $ round o fromObject o = throwError . text $ "Expected any Integer value, but got " <> show o@@ -183,6 +193,7 @@ toObject = ObjectInt . fromIntegral fromObject (ObjectInt i) = return $ fromIntegral i+ fromObject (ObjectUInt i) = return $ fromIntegral i fromObject (ObjectDouble o) = return $ round o fromObject (ObjectFloat o) = return $ round o fromObject o = throwError . text $ "Expected any Integer value, but got " <> show o@@ -192,6 +203,7 @@ toObject = ObjectInt . fromIntegral fromObject (ObjectInt i) = return $ fromIntegral i+ fromObject (ObjectUInt i) = return $ fromIntegral i fromObject (ObjectDouble o) = return $ round o fromObject (ObjectFloat o) = return $ round o fromObject o = throwError . text $ "Expected any Integer value, but got " <> show o@@ -201,6 +213,7 @@ toObject = ObjectInt . fromIntegral fromObject (ObjectInt i) = return $ fromIntegral i+ fromObject (ObjectUInt i) = return $ fromIntegral i fromObject (ObjectDouble o) = return $ round o fromObject (ObjectFloat o) = return $ round o fromObject o = throwError . text $ "Expected any Integer value, but got " <> show o
library/Neovim/RPC/SocketReader.hs view
@@ -71,7 +71,7 @@ -- closed since that would cause neovim to stop the plugin provider (I -- think). sourceHandle readableHandle- $= conduitGet Data.Serialize.get+ $= conduitGet2 Data.Serialize.get $$ messageHandlerSink
nvim-hs.cabal view
@@ -1,5 +1,5 @@ name: nvim-hs-version: 0.0.7+version: 0.0.8 synopsis: Haskell plugin backend for neovim description: This package provides a plugin provider for neovim. It allows you to write@@ -96,7 +96,7 @@ , ansi-wl-pprint , bytestring , cereal- , cereal-conduit+ , cereal-conduit >= 0.7.3 , conduit , conduit-extra , containers@@ -107,7 +107,7 @@ , filepath , foreign-store , hslogger- , messagepack >= 0.4+ , messagepack >= 0.5 , monad-control , network , lifted-base@@ -159,7 +159,7 @@ , hslogger , lifted-base , mtl >= 2.2.1 && < 2.3- , messagepack >= 0.4+ , messagepack >= 0.5 , time-locale-compat , network , optparse-applicative