Skip to content

Commit 116a5ba

Browse files
authored
Expose codeAction and codeLens providers for haskell-language-server (#499)
* Expose codeAction and codeLens providers for haskell-language-server Also tweak the code action reply type to generate well-formed JSON * Expose moduleOutline for symbolProvider in hls too * Revert to using [CAResult] rather than List CAResult
1 parent 9ccd9ee commit 116a5ba

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

ghcide.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ library
114114
Development.IDE.Import.DependencyInformation
115115
Development.IDE.LSP.HoverDefinition
116116
Development.IDE.LSP.LanguageServer
117+
Development.IDE.LSP.Outline
117118
Development.IDE.LSP.Protocol
118119
Development.IDE.LSP.Server
119120
Development.IDE.Spans.Common
@@ -134,7 +135,6 @@ library
134135
Development.IDE.GHC.Warnings
135136
Development.IDE.Import.FindImports
136137
Development.IDE.LSP.Notifications
137-
Development.IDE.LSP.Outline
138138
Development.IDE.Spans.AtPoint
139139
Development.IDE.Spans.Calculate
140140
Development.IDE.Spans.Documentation

src/Development/IDE/LSP/Outline.hs

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
module Development.IDE.LSP.Outline
66
( setHandlersOutline
7+
-- * For haskell-language-server
8+
, moduleOutline
79
)
810
where
911

src/Development/IDE/Plugin/CodeAction.hs

+9-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,15 @@
66
#include "ghc-api-version.h"
77

88
-- | Go to the definition of a variable.
9-
module Development.IDE.Plugin.CodeAction(plugin) where
9+
module Development.IDE.Plugin.CodeAction
10+
(
11+
plugin
12+
13+
-- * For haskell-language-server
14+
, codeAction
15+
, codeLens
16+
, rulePackageExports
17+
) where
1018

1119
import Language.Haskell.LSP.Types
1220
import Control.Monad (join)

0 commit comments

Comments
 (0)