File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed
Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -317,6 +317,7 @@ data DisplayInfo
317317 | IntroConstructorUnknown [Text ]
318318 | WhyInScope Text
319319 | NormalForm Text
320+ | Version Text
320321 | UnknownDisplayInfo Value
321322 deriving (Eq , Ord , Show , Generic )
322323
@@ -365,6 +366,7 @@ instance FromJSON DisplayInfo where
365366 InferredType <$> info .: " expr"
366367 (_ :: Text ) ->
367368 pure $ UnknownDisplayInfo v
369+ " Version" -> Version <$> obj .: " version"
368370 (_ :: Text ) -> pure $ UnknownDisplayInfo v
369371
370372instance FromJSON Response where
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ getInteractionPoint b i = gets $ preview $ #cs_buffers . ix b . #bs_ips . ix i
4242
4343respondToHelperFunction :: DisplayInfo -> Neovim env ()
4444respondToHelperFunction (HelperFunction sig) = setreg " \" " sig
45+ respondToHelperFunction (Version ver) = reportInfo ver
4546respondToHelperFunction _ = pure ()
4647
4748
@@ -222,6 +223,7 @@ cornelis = do
222223 , $ (command " CornelisQuestionToMeta" 'doQuestionToMeta) [CmdSync Async ]
223224 , $ (command " CornelisInc" 'doIncNextDigitSeq) [CmdSync Async ]
224225 , $ (command " CornelisDec" 'doDecNextDigitSeq) [CmdSync Async ]
226+ , $ (command " CornelisAgdaVersion" 'doGetVersion) [CmdSync Async ]
225227 , $ (command " CornelisDebug" 'doDebug) [CmdSync Async , debug_complete]
226228 , $ (command " CornelisCloseInfoWindows" 'doCloseInfoWindows) [CmdSync Sync ]
227229 , $ (function " InternalCornelisRewriteModeCompletion" 'rewriteModeCompletion) Sync
Original file line number Diff line number Diff line change @@ -330,6 +330,12 @@ caseSplit thing = withAgda $ void $ withGoalAtCursor $ \b ip -> do
330330 (mkAbsPathRnage fp $ ip_interval' ip)
331331 $ T. unpack thing
332332
333+ getVersion :: Neovim CornelisEnv ()
334+ getVersion = withAgda $ void $ withCurrentBuffer $ getAgda >=> runIOTCM Cmd_show_version
335+
336+ doGetVersion :: CommandArguments -> Neovim CornelisEnv ()
337+ doGetVersion = const getVersion
338+
333339doQuestionToMeta :: CommandArguments -> Neovim CornelisEnv ()
334340doQuestionToMeta _ = withCurrentBuffer questionToMeta
335341
You can’t perform that action at this time.
0 commit comments