diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,5 +1,10 @@
 # Revision history for haskell-lsp-types
 
+## 0.6.0.0  -- 2018-08-06
+
+* Add new DocumentSymbol type and hierarchal support
+* Rename CommandOrCodeAction to CAResult
+
 ## 0.5.0.0  -- 2018-08-03
 
 * Update Command.arguments to match specification
diff --git a/haskell-lsp-types.cabal b/haskell-lsp-types.cabal
--- a/haskell-lsp-types.cabal
+++ b/haskell-lsp-types.cabal
@@ -1,5 +1,5 @@
 name:                haskell-lsp-types
-version:             0.5.0.0
+version:             0.6.0.0
 synopsis:            Haskell library for the Microsoft Language Server Protocol, data types
 
 description:         An implementation of the types to allow language implementors to
@@ -46,6 +46,7 @@
                      , hashable
                      , lens >= 4.15.2
                      , network-uri
+                     , scientific
                      , text
                      , unordered-containers
   hs-source-dirs:      src
diff --git a/src/Language/Haskell/LSP/TH/ClientCapabilities.hs b/src/Language/Haskell/LSP/TH/ClientCapabilities.hs
--- a/src/Language/Haskell/LSP/TH/ClientCapabilities.hs
+++ b/src/Language/Haskell/LSP/TH/ClientCapabilities.hs
@@ -13,6 +13,8 @@
 import Language.Haskell.LSP.TH.Symbol
 import Data.Default
 
+{-# ANN module "HLint: ignore Use newtype instead of data" #-}
+
 -- ---------------------------------------------------------------------
 {-
 New in 3.0
@@ -731,6 +733,7 @@
       _dynamicRegistration :: Maybe Bool
       -- | Specific capabilities for the `SymbolKind`.
     , _symbolKind :: Maybe DocumentSymbolKindClientCapabilities
+    , _hierarchicalDocumentSymbolSupport :: Maybe Bool
     } deriving (Show, Read, Eq)
 
 $(deriveJSON lspOptions ''DocumentSymbolClientCapabilities)
diff --git a/src/Language/Haskell/LSP/TH/CodeAction.hs b/src/Language/Haskell/LSP/TH/CodeAction.hs
--- a/src/Language/Haskell/LSP/TH/CodeAction.hs
+++ b/src/Language/Haskell/LSP/TH/CodeAction.hs
@@ -278,17 +278,16 @@
 
 deriveJSON lspOptions ''CodeAction
 
-data CommandOrCodeAction = CommandOrCodeActionCommand Command
-                         | CommandOrCodeActionCodeAction CodeAction
+data CAResult = CACommand Command
+              | CACodeAction CodeAction
   deriving (Read,Show,Eq)
 
-instance FromJSON CommandOrCodeAction where
-  parseJSON x = CommandOrCodeActionCommand <$> parseJSON x
-              <|> CommandOrCodeActionCodeAction <$> parseJSON x
+instance FromJSON CAResult where
+  parseJSON x = CACommand <$> parseJSON x <|> CACodeAction <$> parseJSON x
 
-instance ToJSON CommandOrCodeAction where
-  toJSON (CommandOrCodeActionCommand x) = toJSON x
-  toJSON (CommandOrCodeActionCodeAction x) = toJSON x
+instance ToJSON CAResult where
+  toJSON (CACommand x) = toJSON x
+  toJSON (CACodeAction x) = toJSON x
 
-type CodeActionRequest  = RequestMessage ClientMethod CodeActionParams (List CommandOrCodeAction)
-type CodeActionResponse = ResponseMessage (List CommandOrCodeAction)
+type CodeActionRequest  = RequestMessage ClientMethod CodeActionParams (List CAResult)
+type CodeActionResponse = ResponseMessage (List CAResult)
diff --git a/src/Language/Haskell/LSP/TH/DataTypesJSON.hs b/src/Language/Haskell/LSP/TH/DataTypesJSON.hs
--- a/src/Language/Haskell/LSP/TH/DataTypesJSON.hs
+++ b/src/Language/Haskell/LSP/TH/DataTypesJSON.hs
@@ -48,7 +48,6 @@
 import           Language.Haskell.LSP.TH.Message
 import           Language.Haskell.LSP.TH.Symbol
 import           Language.Haskell.LSP.TH.TextDocument
-import           Language.Haskell.LSP.TH.Utils
 import           Language.Haskell.LSP.TH.Uri
 import           Language.Haskell.LSP.TH.WorkspaceEdit
 
@@ -2729,4 +2728,5 @@
 
 -- Symbol
 makeFieldsNoPrefix ''DocumentSymbolParams
+makeFieldsNoPrefix ''DocumentSymbol
 makeFieldsNoPrefix ''SymbolInformation
diff --git a/src/Language/Haskell/LSP/TH/Message.hs b/src/Language/Haskell/LSP/TH/Message.hs
--- a/src/Language/Haskell/LSP/TH/Message.hs
+++ b/src/Language/Haskell/LSP/TH/Message.hs
@@ -62,7 +62,7 @@
 responseId (IdInt    i) = IdRspInt i
 responseId (IdString s) = IdRspString s
 
--- | Converts an LspIdRsp to its LspId counterpart. 
+-- | Converts an LspIdRsp to its LspId counterpart.
 requestId :: LspIdRsp -> LspId
 requestId (IdRspInt    i) = IdInt i
 requestId (IdRspString s) = IdString s
@@ -208,7 +208,7 @@
   -- Document
   | TextDocumentPublishDiagnostics
   -- Cancelling
-  | CancelRequestServer  
+  | CancelRequestServer
    deriving (Eq,Ord,Read,Show)
 
 instance A.FromJSON ServerMethod where
diff --git a/src/Language/Haskell/LSP/TH/Symbol.hs b/src/Language/Haskell/LSP/TH/Symbol.hs
--- a/src/Language/Haskell/LSP/TH/Symbol.hs
+++ b/src/Language/Haskell/LSP/TH/Symbol.hs
@@ -1,8 +1,11 @@
 {-# LANGUAGE TemplateHaskell            #-}
+{-# LANGUAGE DuplicateRecordFields      #-}
 module Language.Haskell.LSP.TH.Symbol where
 
+import           Control.Applicative
 import           Data.Aeson
 import           Data.Aeson.TH
+import           Data.Scientific
 import           Data.Text                                      (Text)
 import           Language.Haskell.LSP.TH.Constants
 import           Language.Haskell.LSP.TH.TextDocument
@@ -132,6 +135,7 @@
     | SkEvent
     | SkOperator
     | SkTypeParameter
+    | SkUnknown Scientific
     deriving (Read,Show,Eq)
 
 instance ToJSON SymbolKind where
@@ -161,7 +165,7 @@
   toJSON SkEvent         = Number 24
   toJSON SkOperator      = Number 25
   toJSON SkTypeParameter = Number 26
-
+  toJSON (SkUnknown x)   = Number x
 
 instance FromJSON SymbolKind where
   parseJSON (Number  1) = pure SkFile
@@ -190,23 +194,78 @@
   parseJSON (Number 24) = pure SkEvent
   parseJSON (Number 25) = pure SkOperator
   parseJSON (Number 26) = pure SkTypeParameter
-  parseJSON _             = mempty
+  parseJSON (Number x)  = pure (SkUnknown x)
+  parseJSON _           = mempty
 
+-- ---------------------------------------------------------------------
 
+-- | Represents programming constructs like variables, classes, interfaces etc.
+-- that appear in a document. Document symbols can be hierarchical and they
+-- have two ranges: one that encloses its definition and one that points to its
+-- most interesting range, e.g. the range of an identifier.
+data DocumentSymbol =
+  DocumentSymbol
+    { _name           :: Text -- ^ The name of this symbol.
+    -- | More detail for this symbol, e.g the signature of a function. If not
+    -- provided the name is used.
+    , _detail         :: Maybe Text
+    , _kind           :: SymbolKind -- ^ The kind of this symbol.
+    , _deprecated     :: Maybe Bool -- ^ Indicates if this symbol is deprecated.
+    -- | The range enclosing this symbol not including leading/trailing
+    -- whitespace but everything else like comments. This information is
+    -- typically used to determine if the the clients cursor is inside the symbol
+    -- to reveal in the symbol in the UI.
+    , _range          :: Range
+    -- | The range that should be selected and revealed when this symbol is being
+    -- picked, e.g the name of a function. Must be contained by the the '_range'.
+    , _selectionRange :: Range
+    -- | Children of this symbol, e.g. properties of a class.
+    , _children       :: Maybe (List DocumentSymbol)
+    } deriving (Read,Show,Eq)
+
+deriveJSON lspOptions ''DocumentSymbol
+
 -- ---------------------------------------------------------------------
 
+-- | Represents information about programming constructs like variables, classes,
+-- interfaces etc.
 data SymbolInformation =
   SymbolInformation
-    { _name          :: Text
-    , _kind          :: SymbolKind
+    { _name          :: Text -- ^ The name of this symbol.
+    , _kind          :: SymbolKind -- ^ The kind of this symbol.
+    , _deprecated    :: Maybe Bool -- ^ Indicates if this symbol is deprecated.
+    -- | The location of this symbol. The location's range is used by a tool
+    -- to reveal the location in the editor. If the symbol is selected in the
+    -- tool the range's start information is used to position the cursor. So
+    -- the range usually spans more then the actual symbol's name and does
+    -- normally include things like visibility modifiers.
+    --
+    -- The range doesn't have to denote a node range in the sense of a abstract
+    -- syntax tree. It can therefore not be used to re-construct a hierarchy of
+    -- the symbols.
     , _location      :: Location
-    , _containerName :: Maybe Text -- ^The name of the symbol containing this
-                                     -- symbol.
+    -- | The name of the symbol containing this symbol. This information is for
+    -- user interface purposes (e.g. to render a qualifier in the user interface
+    -- if necessary). It can't be used to re-infer a hierarchy for the document
+    -- symbols.
+    , _containerName :: Maybe Text
     } deriving (Read,Show,Eq)
 
 deriveJSON lspOptions ''SymbolInformation
 
 -- -------------------------------------
 
-type DocumentSymbolRequest = RequestMessage ClientMethod DocumentSymbolParams (List SymbolInformation)
-type DocumentSymbolsResponse = ResponseMessage (List SymbolInformation)
+data DSResult = DSDocumentSymbols (List DocumentSymbol)
+              | DSSymbolInformation (List SymbolInformation)
+  deriving (Read,Show,Eq)
+
+instance FromJSON DSResult where
+  parseJSON x = DSDocumentSymbols <$> parseJSON x <|> DSSymbolInformation <$> parseJSON x
+
+instance ToJSON DSResult where
+  toJSON (DSDocumentSymbols x) = toJSON x
+  toJSON (DSSymbolInformation x) = toJSON x
+
+
+type DocumentSymbolRequest = RequestMessage ClientMethod DocumentSymbolParams DSResult
+type DocumentSymbolsResponse = ResponseMessage DSResult
