h*e,      !"#$%&'()*+2.6.0.0 Safe-Inferred" ,hls-code-range-plugina group of imports-hls-code-range-pluginadjacent type signature and value definition are paired under a custom parent node.hls-code-range-pluginExtra arguments for / . It's expected to be used in a 0 context/hls-code-range-pluginBefore converting the HieAST to selection range, we need to run some passes on it. Each pass potentially modifies the AST to handle some special cases./ combines the passes. Refer to 1 or 2 as a concrete example example.Adding another manipulation to the AST is simple, just implement a function of type `HieAST a -> Reader (PreProcessEnv a) (HieAST a)`, and append it to / with 3.If it goes more complex, it may be more appropriate to split different manipulations to different modules.4hls-code-range-pluginCreate a custom node in 5. By "custom", we mean this node doesn't actually exist in the original 5 provided by GHC, but created to suite the needs of hls-code-range-plugin.1hls-code-range-pluginCombines adjacent import declarations under a new parent node, so that the user will have an extra step selecting the whole import area while expanding/shrinking the selection range.2hls-code-range-pluginCombine type signature with variable definition under a new parent node, if the signature is placed right before the definition. This allows the user to have a step selecting both type signature and its accompanying definition.6hls-code-range-pluginMerge adjacent type signature and variable/function definition, if the type signature belongs to that variable or function.The implementation potentially has some corner cases not handled properly.7hls-code-range-pluginGiven the AST node of a type signature, tries to find the identifier of it.8hls-code-range-pluginDetermines if the given occurrence of an identifier is a function/variable definition in the outer span/.9:;<,- Safe-Inferred"'3<> hls-code-range-pluginCodeKind$ represents the kind of a code rangehls-code-range-plugin ordinary codehls-code-range-pluginthe group of importshls-code-range-plugin a commenthls-code-range-pluginA tree representing code ranges in a file. This can be useful for features like selection range and folding rangehls-code-range-pluginRange for current levelhls-code-range-pluginA vector of children, sorted by their ranges in ascending order. Children are guaranteed not to interleave, but some gaps may exist among them.=hls-code-range-plugin Construct a . A valid CodeRange will be returned in any case. If anything go wrong, a list of warnings will be returned as  hls-code-range-plugin#Remove interleaving of the list of s.hls-code-range-pluginRemove redundant nodes in  tree>hls-code-range-pluginHandle error in ? . Returns an @< with no value and no diagnostics on error. (but writes log)hls-code-range-plugin+Maps type CodeRangeKind to FoldingRangeKind   Safe-Inferred "%&1(hls-code-range-pluginFind A in =. This can fail, if the given position is not covered by the .)hls-code-range-pluginTraverses through the code range and it children to a folding ranges.It starts with the root node, converts that into a folding range then moves towards the children. It converts each child of each root node and parses it to folding range and moves to its children.Two cases to that are assumed to be taken care on the client side are: When a folding range starts and ends on the same line, it is upto the client if it wants to fold a single line folding or not.As we are converting nodes of the ast into folding ranges, there are multiple nodes starting from a single line. A single line of code doesn't mean a single node in AST, so this function removes all the nodes that have a duplicate start line, ie. they start from the same line. Eg. A multi-line function that also has a multi-line if statement starting from the same line should have the folding according to the function.We think the client can handle this, if not we could change to remove these in futureDiscussion reference: https://github.com/haskell/haskell-language-server/pull/3058#discussion_r973737211*hls-code-range-plugin"Parses code range to folding rangeBhls-code-range-pluginLikes toCurrentPosition, but works on C'&()*'&()*       !"#$%&'( )*+,-./0123456789:;<=>?/@ABCDEFGHIJKLMNKOP4hls-code-range-plugin-2.6.0.0-8ipbvpuUPpPL7G80SLNISiIde.Plugin.CodeRange.RulesIde.Plugin.CodeRangehls-code-range-plugin"Ide.Plugin.CodeRange.ASTPreProcess CodeRangeKindCodeKindRegionCodeKindImportsCodeKindComment CodeRange_codeRange_range_codeRange_children_codeRange_kindLogLogShakeLogNoASTLogFoundInterleaving $fPrettyLog $fShowLog$fShowCodeRange$fGenericCodeRange$fNFDataCodeRange$fShowCodeRangeKind$fEqCodeRangeKind$fGenericCodeRangeKind$fNFDataCodeRangeKind GetCodeRangecodeRange_childrencodeRange_kindcodeRange_rangeremoveInterleavingsimplify codeRangeRulecrkToFrk$fOrdCodeRange $fEqCodeRange$fNFDataGetCodeRange$fHashableGetCodeRange$fEqGetCodeRange$fShowGetCodeRange$fGenericGetCodeRange descriptor findPositionfindFoldingRangescreateFoldingRangeCustomNodeImportsGroup%CustomNodeAdjacentSignatureDefinition PreProcessEnv preProcessASTtransformers-0.6.1.0Control.Monad.Trans.ReaderReader mergeImportsmergeSignatureWithDefinitionbaseGHC.Base>>=createCustomNodeghcGHC.Iface.Ext.TypesHieASTmergeAdjacentSigDefidentifierForTypeSig isIdentADefpreProcessEnvRefMap isCustomNodeCustomNodeTypebuildCodeRange handleError(hls-graph-2.6.0.0-D4PlQUk8k8Q2y9Gamh3mYY$Development.IDE.Graph.Internal.TypesAction%ghcide-2.6.0.0-EOlVRCKGmUyHjJWgw1EFuW!Development.IDE.Types.Diagnostics IdeResult(lsp-types-2.1.0.0-HJ6wSjt9PFC8E0bkVwmmzs-Language.LSP.Protocol.Internal.Types.PositionPositiontoCurrentSelectionRange3Language.LSP.Protocol.Internal.Types.SelectionRangeSelectionRange