haskell-language-server-2.11.0.0: LSP server for GHC
Safe HaskellNone
LanguageGHC2021

Ide.Plugin.Cabal.Outline

Synopsis

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 #