Skip to content

Commit

Permalink
fix completion error
Browse files Browse the repository at this point in the history
  • Loading branch information
TimWhiting committed Sep 5, 2023
1 parent 12699b2 commit bf49f1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LanguageServer/Handler/Completion.hs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ makeHandlerCompletionItem curModName conInfo d r line =
-- TODO: Consider adding snippet locations for the body of the handlers as well
if T.isPrefixOf "val" newName then
(i + 1, acc ++ [clauseIndentation <> newName <> " = $" <> T.pack (show (i + 1))])
else (fst (last funArgs) + 1, acc ++ [clauseIndentation <> newName <> "(" <> T.intercalate "," (map snd funArgs) <> ")\n" <> clauseBodyIndentation <> "()"])
else (if not (null funArgs) then fst (last funArgs) + 1 else 1, acc ++ [clauseIndentation <> newName <> "(" <> T.intercalate "," (map snd funArgs) <> ")\n" <> clauseBodyIndentation <> "()"])
where
funArgs = zipWith (\i s -> (i, T.pack $ "$" ++ show (i + 1))) [i..] (handlerArgs newName tp)
newName = T.replace "brk" "final ctl" $ T.replace "-" " " (T.pack (show name))
Expand Down

0 comments on commit bf49f1a

Please sign in to comment.