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
117117 Language.LSP.Protocol.Message.Parsing
118118 Language.LSP.Protocol.Message.Registration
119119 Language.LSP.Protocol.Message.Types
120+ Language.LSP.Protocol.Types.CodeAction
120121 Language.LSP.Protocol.Types.Common
121122 Language.LSP.Protocol.Types.Edit
122123 Language.LSP.Protocol.Types.Lens
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ module Language.LSP.Protocol.Types (
1616 , module Edits
1717 -- ** Markup
1818 , module Markup
19+ -- ** Code actions
20+ , module CodeAction
1921 -- ** Progress
2022 , module Progress
2123 -- ** Semantic tokens
@@ -24,11 +26,10 @@ module Language.LSP.Protocol.Types (
2426 , module WatchKinds
2527 -- * Main LSP types and functions
2628 , module Generated
27- -- ** Orphan instances for the generated types
28- , module Orphans
2929 ) where
3030
3131import Language.LSP.Protocol.Internal.Types as Generated
32+ import Language.LSP.Protocol.Types.CodeAction as CodeAction
3233import Language.LSP.Protocol.Types.Common as Common
3334import Language.LSP.Protocol.Types.Location as Locations
3435import Language.LSP.Protocol.Types.LspEnum as LspEnum
@@ -39,5 +40,5 @@ import Language.LSP.Protocol.Types.Singletons as Singletons
3940import Language.LSP.Protocol.Types.Uri as Uri
4041import Language.LSP.Protocol.Types.Uri.OsPath as Uri
4142import Language.LSP.Protocol.Types.Edit as Edits
42- import Language.LSP.Protocol.Types.Orphans as Orphans
43+ import Language.LSP.Protocol.Types.Orphans ()
4344import 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