File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
lsp/src/Language/LSP/Server Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -253,16 +253,21 @@ inferServerCapabilities clientCaps o h =
253253 | otherwise = Nothing
254254
255255 clientSupportsCodeActionKinds = isJust $
256- clientCaps ^? L. textDocument . _Just . L. codeAction . _Just . L. codeActionLiteralSupport
256+ clientCaps ^? L. textDocument . _Just . L. codeAction . _Just . L. codeActionLiteralSupport . _Just
257257
258258 codeActionProvider
259- | clientSupportsCodeActionKinds
260- , supported_b SMethod_TextDocumentCodeAction = Just $ case optCodeActionKinds o of
261- Just ks -> InR $ CodeActionOptions Nothing (Just ks) (supported SMethod_CodeLensResolve )
262- Nothing -> InL True
263- | supported_b SMethod_TextDocumentCodeAction = Just (InL True )
259+ | supported_b SMethod_TextDocumentCodeAction = Just $ InR $
260+ CodeActionOptions {
261+ _workDoneProgress = Nothing
262+ , _codeActionKinds = codeActionKinds (optCodeActionKinds o)
263+ , _resolveProvider = supported SMethod_CodeActionResolve
264+ }
264265 | otherwise = Just (InL False )
265266
267+ codeActionKinds (Just ks)
268+ | clientSupportsCodeActionKinds = Just ks
269+ codeActionKinds _ = Nothing
270+
266271 signatureHelpProvider
267272 | supported_b SMethod_TextDocumentSignatureHelp = Just $
268273 SignatureHelpOptions
You can’t perform that action at this time.
0 commit comments