File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed
src/Language/LSP/Protocol Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,7 @@ library
117
117
Language.LSP.Protocol.Message.Parsing
118
118
Language.LSP.Protocol.Message.Registration
119
119
Language.LSP.Protocol.Message.Types
120
+ Language.LSP.Protocol.Types.CodeAction
120
121
Language.LSP.Protocol.Types.Common
121
122
Language.LSP.Protocol.Types.Edit
122
123
Language.LSP.Protocol.Types.Lens
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ module Language.LSP.Protocol.Types (
16
16
, module Edits
17
17
-- ** Markup
18
18
, module Markup
19
+ -- ** Code actions
20
+ , module CodeAction
19
21
-- ** Progress
20
22
, module Progress
21
23
-- ** Semantic tokens
@@ -24,11 +26,10 @@ module Language.LSP.Protocol.Types (
24
26
, module WatchKinds
25
27
-- * Main LSP types and functions
26
28
, module Generated
27
- -- ** Orphan instances for the generated types
28
- , module Orphans
29
29
) where
30
30
31
31
import Language.LSP.Protocol.Internal.Types as Generated
32
+ import Language.LSP.Protocol.Types.CodeAction as CodeAction
32
33
import Language.LSP.Protocol.Types.Common as Common
33
34
import Language.LSP.Protocol.Types.Location as Locations
34
35
import Language.LSP.Protocol.Types.LspEnum as LspEnum
@@ -39,5 +40,5 @@ import Language.LSP.Protocol.Types.Singletons as Singletons
39
40
import Language.LSP.Protocol.Types.Uri as Uri
40
41
import Language.LSP.Protocol.Types.Uri.OsPath as Uri
41
42
import Language.LSP.Protocol.Types.Edit as Edits
42
- import Language.LSP.Protocol.Types.Orphans as Orphans
43
+ import Language.LSP.Protocol.Types.Orphans ()
43
44
import Language.LSP.Protocol.Types.WatchKinds as WatchKinds
Original file line number Diff line number Diff line change
1
+ module Language.LSP.Protocol.Types.CodeAction where
2
+
3
+ import Language.LSP.Protocol.Types.LspEnum
4
+ import Language.LSP.Protocol.Internal.Types
5
+ import qualified Data.Text as T
6
+
7
+ -- | Does the first 'CodeActionKind' subsume the other one, hierarchically. Reflexive.
8
+ codeActionKindSubsumes :: CodeActionKind -> CodeActionKind -> Bool
9
+ -- Simple but ugly implementation: prefix on the string representation
10
+ codeActionKindSubsumes parent child = toEnumBaseType parent `T.isPrefixOf` toEnumBaseType child
You can’t perform that action at this time.
0 commit comments