File tree Expand file tree Collapse file tree 4 files changed +4
-16
lines changed Expand file tree Collapse file tree 4 files changed +4
-16
lines changed Original file line number Diff line number Diff line change 4
4
{-# LANGUAGE LambdaCase #-}
5
5
{-# LANGUAGE OverloadedStrings #-}
6
6
{-# LANGUAGE TypeInType #-}
7
- -- So we can keep using the old prettyprinter modules (which have a better
8
- -- compatibility range) for now.
9
- {-# OPTIONS_GHC -Wno-deprecations #-}
10
7
11
8
{- |
12
9
This is an example language server built with haskell-lsp using a 'Reactor'
@@ -36,7 +33,6 @@ import Control.Monad.STM
36
33
import Data.Aeson qualified as J
37
34
import Data.Int (Int32 )
38
35
import Data.Text qualified as T
39
- import Data.Text.Prettyprint.Doc
40
36
import GHC.Generics (Generic )
41
37
import Language.LSP.Diagnostics
42
38
import Language.LSP.Logging (defaultClientLogger )
@@ -45,6 +41,7 @@ import Language.LSP.Protocol.Message qualified as LSP
45
41
import Language.LSP.Protocol.Types qualified as LSP
46
42
import Language.LSP.Server
47
43
import Language.LSP.VFS
44
+ import Prettyprinter
48
45
import System.Exit
49
46
import System.IO
50
47
Original file line number Diff line number Diff line change 1
1
{-# LANGUAGE LambdaCase #-}
2
2
{-# LANGUAGE OverloadedStrings #-}
3
- -- So we can keep using the old prettyprinter modules (which have a better
4
- -- compatibility range) for now.
5
- {-# OPTIONS_GHC -Wno-deprecations #-}
6
3
7
4
module Language.LSP.Server.Control (
8
5
-- * Running
@@ -30,12 +27,12 @@ import Data.List
30
27
import Data.Text qualified as T
31
28
import Data.Text.Lazy qualified as TL
32
29
import Data.Text.Lazy.Encoding qualified as TL
33
- import Data.Text.Prettyprint.Doc
34
30
import Language.LSP.Logging (defaultClientLogger )
35
31
import Language.LSP.Protocol.Message
36
32
import Language.LSP.Server.Core
37
33
import Language.LSP.Server.Processing qualified as Processing
38
34
import Language.LSP.VFS
35
+ import Prettyprinter
39
36
import System.IO
40
37
41
38
data LspServerLog
Original file line number Diff line number Diff line change 4
4
{-# LANGUAGE RecordWildCards #-}
5
5
{-# LANGUAGE RecursiveDo #-}
6
6
{-# LANGUAGE TypeInType #-}
7
- -- So we can keep using the old prettyprinter modules (which have a better
8
- -- compatibility range) for now.
9
- {-# OPTIONS_GHC -Wno-deprecations #-}
10
7
-- there's just so much!
11
8
{-# OPTIONS_GHC -Wno-name-shadowing #-}
12
9
{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
@@ -54,14 +51,14 @@ import Data.Monoid
54
51
import Data.String (fromString )
55
52
import Data.Text qualified as T
56
53
import Data.Text.Lazy.Encoding qualified as TL
57
- import Data.Text.Prettyprint.Doc
58
54
import Language.LSP.Protocol.Lens qualified as L
59
55
import Language.LSP.Protocol.Message
60
56
import Language.LSP.Protocol.Types
61
57
import Language.LSP.Protocol.Utils.SMethodMap (SMethodMap )
62
58
import Language.LSP.Protocol.Utils.SMethodMap qualified as SMethodMap
63
59
import Language.LSP.Server.Core
64
60
import Language.LSP.VFS as VFS
61
+ import Prettyprinter
65
62
import System.Exit
66
63
67
64
data LspProcessingLog
Original file line number Diff line number Diff line change 6
6
{-# LANGUAGE TemplateHaskell #-}
7
7
{-# LANGUAGE TypeInType #-}
8
8
{-# LANGUAGE ViewPatterns #-}
9
- -- So we can keep using the old prettyprinter modules (which have a better
10
- -- compatibility range) for now.
11
- {-# OPTIONS_GHC -Wno-deprecations #-}
12
9
13
10
{- |
14
11
Handles the "Language.LSP.Types.TextDocumentDidChange" \/
@@ -70,13 +67,13 @@ import Data.Ord
70
67
import Data.Text (Text )
71
68
import Data.Text qualified as T
72
69
import Data.Text.IO qualified as T
73
- import Data.Text.Prettyprint.Doc hiding (line )
74
70
import Data.Text.Utf16.Lines as Utf16 (Position (.. ))
75
71
import Data.Text.Utf16.Rope.Mixed (Rope )
76
72
import Data.Text.Utf16.Rope.Mixed qualified as Rope
77
73
import Language.LSP.Protocol.Lens qualified as J
78
74
import Language.LSP.Protocol.Message qualified as J
79
75
import Language.LSP.Protocol.Types qualified as J
76
+ import Prettyprinter hiding (line )
80
77
import System.Directory
81
78
import System.FilePath
82
79
import System.IO
You can’t perform that action at this time.
0 commit comments