File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
lsp-test/src/Language/LSP
lsp-types/src/Language/LSP/Types
lsp/src/Language/LSP/Server Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -430,7 +430,7 @@ createDoc file languageId contents = do
430430 createHits (WatchKind create _ _) = create
431431
432432 regHits :: Registration WorkspaceDidChangeWatchedFiles -> Bool
433- regHits reg = foldl' (\ acc w -> acc || watchHits w) False (reg ^. registerOptions . watchers)
433+ regHits reg = foldl' (\ acc w -> acc || watchHits w) False (reg ^. registerOptions . _Just . watchers)
434434
435435 clientCapsSupports =
436436 caps ^? workspace . _Just . didChangeWatchedFiles . _Just . dynamicRegistration . _Just
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ data Registration (m :: Method FromClient t) =
111111 , _method :: SClientMethod m
112112 -- | Options necessary for the registration.
113113 -- Make this strict to aid the pattern matching exhaustiveness checker
114- , _registerOptions :: ! (RegistrationOptions m )
114+ , _registerOptions :: ! (Maybe ( RegistrationOptions m ) )
115115 }
116116 deriving Generic
117117
Original file line number Diff line number Diff line change @@ -503,7 +503,7 @@ registerCapability method regOpts f = do
503503 -- First, check to see if the client supports dynamic registration on this method
504504 | dynamicSupported clientCaps = do
505505 uuid <- liftIO $ UUID. toText <$> getStdRandom random
506- let registration = J. Registration uuid method regOpts
506+ let registration = J. Registration uuid method ( Just regOpts)
507507 params = J. RegistrationParams (J. List [J. SomeRegistration registration])
508508 regId = RegistrationId uuid
509509 rio <- askUnliftIO
You can’t perform that action at this time.
0 commit comments