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 =
253
253
| otherwise = Nothing
254
254
255
255
clientSupportsCodeActionKinds = isJust $
256
- clientCaps ^? L. textDocument . _Just . L. codeAction . _Just . L. codeActionLiteralSupport
256
+ clientCaps ^? L. textDocument . _Just . L. codeAction . _Just . L. codeActionLiteralSupport . _Just
257
257
258
258
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
+ }
264
265
| otherwise = Just (InL False )
265
266
267
+ codeActionKinds (Just ks)
268
+ | clientSupportsCodeActionKinds = Just ks
269
+ codeActionKinds _ = Nothing
270
+
266
271
signatureHelpProvider
267
272
| supported_b SMethod_TextDocumentSignatureHelp = Just $
268
273
SignatureHelpOptions
You can’t perform that action at this time.
0 commit comments