automatically run ormolu

This commit is contained in:
ChrisPenner 2024-07-02 22:50:40 +00:00 committed by github-actions[bot]
parent 1d5ae816de
commit 92a74df8f8

View File

@ -81,9 +81,11 @@ identifierSplitAtPosition uri pos = do
vf <- getVirtualFile uri
PosPrefixInfo {fullLine, cursorPos} <- MaybeT (VFS.getCompletionPrefix pos vf)
let (before, after) = Text.splitAt (cursorPos ^. character . to fromIntegral) fullLine
pure (Text.takeWhileEnd isIdentifierChar before,
-- names can end with '!', and it's not a force, so we include it in the identifier if it's at the end.
Text.takeWhile (\c -> isIdentifierChar c || c == '!') after)
pure
( Text.takeWhileEnd isIdentifierChar before,
-- names can end with '!', and it's not a force, so we include it in the identifier if it's at the end.
Text.takeWhile (\c -> isIdentifierChar c || c == '!') after
)
where
isIdentifierChar c =
-- Manually exclude '!' and apostrophe, since those are usually just forces and