File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
lsp-test/src/Language/LSP/Test Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -318,13 +318,15 @@ updateStateC = awaitForever $ \msg -> do
318318 c <- curLspConfig <$> get @ SessionState
319319 case c of
320320 Object o -> do
321+ -- check for each requested section whether we have it
321322 let configsOrErrs = (flip fmap ) requestedSections $ \ section ->
322323 case o ^. at (fromString $ T. unpack section) of
323324 Just config -> Right config
324325 Nothing -> Left section
325326
326327 let (errs, configs) = partitionEithers configsOrErrs
327328
329+ -- we have to return exactly the number of sections requested, so if we can't find all of them then that's an error
328330 if null errs
329331 then sendMessage $ TResponseMessage " 2.0" (Just $ r ^. L. id ) (Right configs)
330332 else sendMessage @ _ @ (TResponseError Method_WorkspaceConfiguration ) $
You can’t perform that action at this time.
0 commit comments