Safe Haskell | None |
---|---|
Language | GHC2021 |
Ide.Plugin.CodeRange.Rules
Contents
Synopsis
- data CodeRange = CodeRange {
- _codeRange_range :: !Range
- _codeRange_children :: !(Vector CodeRange)
- _codeRange_kind :: !CodeRangeKind
- codeRange_range :: Lens' CodeRange Range
- codeRange_children :: Lens' CodeRange (Vector CodeRange)
- codeRange_kind :: Lens' CodeRange CodeRangeKind
- data CodeRangeKind
- data GetCodeRange = GetCodeRange
- codeRangeRule :: Recorder (WithPriority Log) -> Rules ()
- data Log
- removeInterleaving :: [CodeRange] -> Writer [Log] [CodeRange]
- simplify :: CodeRange -> CodeRange
- crkToFrk :: CodeRangeKind -> FoldingRangeKind
Documentation
A tree representing code ranges in a file. This can be useful for features like selection range and folding range
Constructors
CodeRange | |
Fields
|
Instances
codeRange_children :: Lens' CodeRange (Vector CodeRange) #
data CodeRangeKind #
CodeKind
represents the kind of a code range
Constructors
CodeKindRegion | ordinary code |
CodeKindImports | the group of imports |
CodeKindComment | a comment |
Instances
NFData CodeRangeKind # | |||||
Defined in Ide.Plugin.CodeRange.Rules Methods rnf :: CodeRangeKind -> () # | |||||
Generic CodeRangeKind # | |||||
Defined in Ide.Plugin.CodeRange.Rules Associated Types
| |||||
Show CodeRangeKind # | |||||
Defined in Ide.Plugin.CodeRange.Rules Methods showsPrec :: Int -> CodeRangeKind -> ShowS # show :: CodeRangeKind -> String # showList :: [CodeRangeKind] -> ShowS # | |||||
Eq CodeRangeKind # | |||||
Defined in Ide.Plugin.CodeRange.Rules Methods (==) :: CodeRangeKind -> CodeRangeKind -> Bool # (/=) :: CodeRangeKind -> CodeRangeKind -> Bool # | |||||
type Rep CodeRangeKind # | |||||
Defined in Ide.Plugin.CodeRange.Rules type Rep CodeRangeKind = D1 ('MetaData "CodeRangeKind" "Ide.Plugin.CodeRange.Rules" "haskell-language-server-2.9.0.0-7KkJNSYIcTsGEsKYGe9LR8-hls-code-range-plugin" 'False) (C1 ('MetaCons "CodeKindRegion" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CodeKindImports" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CodeKindComment" 'PrefixI 'False) (U1 :: Type -> Type))) |
data GetCodeRange #
Constructors
GetCodeRange |
Instances
NFData GetCodeRange # | |||||
Defined in Ide.Plugin.CodeRange.Rules Methods rnf :: GetCodeRange -> () # | |||||
Generic GetCodeRange # | |||||
Defined in Ide.Plugin.CodeRange.Rules Associated Types
| |||||
Show GetCodeRange # | |||||
Defined in Ide.Plugin.CodeRange.Rules Methods showsPrec :: Int -> GetCodeRange -> ShowS # show :: GetCodeRange -> String # showList :: [GetCodeRange] -> ShowS # | |||||
Eq GetCodeRange # | |||||
Defined in Ide.Plugin.CodeRange.Rules | |||||
Hashable GetCodeRange # | |||||
Defined in Ide.Plugin.CodeRange.Rules | |||||
type Rep GetCodeRange # | |||||
type RuleResult GetCodeRange # | |||||
Defined in Ide.Plugin.CodeRange.Rules |
codeRangeRule :: Recorder (WithPriority Log) -> Rules () #
Internal
removeInterleaving :: [CodeRange] -> Writer [Log] [CodeRange] #
Remove interleaving of the list of CodeRange
s.
crkToFrk :: CodeRangeKind -> FoldingRangeKind #
Maps type CodeRangeKind to FoldingRangeKind