@@ -8,6 +8,8 @@ import qualified Data.Aeson as A
8
8
import Data.Aeson.TH
9
9
import Data.Text (Text )
10
10
import Language.LSP.Types.Utils
11
+ import Language.LSP.Types.Uri
12
+ import Language.LSP.Types.Location
11
13
12
14
-- ---------------------------------------------------------------------
13
15
@@ -62,6 +64,47 @@ deriveJSON lspOptions ''ShowMessageRequestParams
62
64
63
65
-- ---------------------------------------------------------------------
64
66
67
+ -- | Params to show a document.
68
+ --
69
+ -- @since 3.16.0
70
+ data ShowDocumentParams =
71
+ ShowDocumentParams {
72
+ -- | The document uri to show.
73
+ _uri :: Uri
74
+
75
+ -- | Indicates to show the resource in an external program.
76
+ -- To show for example `https://code.visualstudio.com/`
77
+ -- in the default WEB browser set `external` to `true`.
78
+ , _external :: Maybe Bool
79
+
80
+ -- | An optional property to indicate whether the editor
81
+ -- showing the document should take focus or not.
82
+ -- Clients might ignore this property if an external
83
+ -- program is started.
84
+ , _takeFocus :: Maybe Bool
85
+
86
+ -- | An optional selection range if the document is a text
87
+ -- document. Clients might ignore the property if an
88
+ -- external program is started or the file is not a text
89
+ -- file.
90
+ , _selection :: Maybe Range
91
+ } deriving (Show , Read , Eq )
92
+
93
+ deriveJSON lspOptions ''ShowDocumentParams
94
+
95
+ -- | The result of an show document request.
96
+ --
97
+ -- @since 3.16.0
98
+ data ShowDocumentResult =
99
+ ShowDocumentResult {
100
+ -- | A boolean indicating if the show was successful.
101
+ _success :: Bool
102
+ } deriving (Show , Read , Eq )
103
+
104
+ deriveJSON lspOptions ''ShowDocumentResult
105
+
106
+ -- ---------------------------------------------------------------------
107
+
65
108
data LogMessageParams =
66
109
LogMessageParams {
67
110
_xtype :: MessageType
0 commit comments