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
318
318
c <- curLspConfig <$> get @ SessionState
319
319
case c of
320
320
Object o -> do
321
+ -- check for each requested section whether we have it
321
322
let configsOrErrs = (flip fmap ) requestedSections $ \ section ->
322
323
case o ^. at (fromString $ T. unpack section) of
323
324
Just config -> Right config
324
325
Nothing -> Left section
325
326
326
327
let (errs, configs) = partitionEithers configsOrErrs
327
328
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
328
330
if null errs
329
331
then sendMessage $ TResponseMessage " 2.0" (Just $ r ^. L. id ) (Right configs)
330
332
else sendMessage @ _ @ (TResponseError Method_WorkspaceConfiguration ) $
You can’t perform that action at this time.
0 commit comments