| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ide.Plugin.Cabal.Outline
Synopsis
- moduleOutline :: PluginMethodHandler IdeState 'Method_TextDocumentDocumentSymbol
- documentSymbolForField :: Field Position -> Maybe DocumentSymbol
- cabalPositionToLSPRange :: Position -> Range
- addNameLengthToLSPRange :: Range -> Text -> Range
- defDocumentSymbol :: Range -> DocumentSymbol
Documentation
moduleOutline :: PluginMethodHandler IdeState 'Method_TextDocumentDocumentSymbol Source #
documentSymbolForField :: Field Position -> Maybe DocumentSymbol Source #
Creates a DocumentSymbol object for the
cabal AST, without displaying fieldLines and
displaying Section Name and SectionArgs in one line.
fieldLines are leaves of a cabal AST, so they are omitted
in the outline. Sections have to be displayed in one line, because
the AST representation looks unnatural. See examples:
- part of a cabal file:
if impl(ghc >= 9.8)
ghc-options: -Wall- AST representation:
if
impl
(
ghc >= 9.8
)
ghc-options:
-Wall- resulting
DocumentSymbol:
if impl(ghc >= 9.8)
ghc-options:
cabalPositionToLSPRange :: Position -> Range Source #
Creates a single point LSP range using cabal position
defDocumentSymbol :: Range -> DocumentSymbol Source #