@@ -145,7 +145,7 @@ codeActionProvider ideState _ (CodeActionParams _ _ docId range _) = do
145
145
let actions = map (mkCodeAction enabledExtensions) (RangeMap. filterByRange range crCodeActions)
146
146
pure $ InL actions
147
147
where
148
- mkCodeAction :: [Extension ] -> Int -> Command |? CodeAction
148
+ mkCodeAction :: [Extension ] -> Int -> Command |? CodeAction
149
149
mkCodeAction exts uid = InR CodeAction
150
150
{ _title = mkTitle exts
151
151
, _kind = Just CodeActionKind_RefactorRewrite
@@ -186,14 +186,14 @@ inlayHintProvider _ state pId InlayHintParams {_textDocument = TextDocumentIdent
186
186
, uid <- RangeMap. elementsInRange range crCodeActions
187
187
, Just record <- [IntMap. lookup uid crCodeActionResolve] ]
188
188
-- Get the definition of each dotdot of record
189
- locations = [ getDefinition nfp pos
189
+ locations = [ fmap (,record) ( getDefinition nfp pos)
190
190
| record <- records
191
191
, pos <- maybeToList $ fmap _start $ recordInfoToDotDotRange record ]
192
192
defnLocsList <- lift $ sequence locations
193
- pure $ InL $ mapMaybe (mkInlayHints crr pragma) ( zip defnLocsList records)
193
+ pure $ InL $ mapMaybe (mkInlayHint crr pragma) defnLocsList
194
194
where
195
- mkInlayHints :: CollectRecordsResult -> NextPragmaInfo -> (Maybe [(Location , Identifier )], RecordInfo ) -> Maybe InlayHint
196
- mkInlayHints CRR {enabledExtensions, nameMap} pragma (defnLocs, record) =
195
+ mkInlayHint :: CollectRecordsResult -> NextPragmaInfo -> (Maybe [(Location , Identifier )], RecordInfo ) -> Maybe InlayHint
196
+ mkInlayHint CRR {enabledExtensions, nameMap} pragma (defnLocs, record) =
197
197
let range = recordInfoToDotDotRange record
198
198
textEdits = maybeToList (renderRecordInfoAsTextEdit nameMap record)
199
199
<> maybeToList (pragmaEdit enabledExtensions pragma)
0 commit comments