Skip to content

Commit 93e0b17

Browse files
committed
Add call hierarchy config
1 parent d7e56df commit 93e0b17

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

hls-plugin-api/hls-plugin-api.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 2.4
22
name: hls-plugin-api
3-
version: 1.2.0.0
3+
version: 1.2.1.0
44
synopsis: Haskell Language Server API for plugin communication
55
description:
66
Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>

hls-plugin-api/src/Ide/Plugin/ConfigUtils.hs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,14 @@ pluginsToDefaultConfig IdePlugins {..} =
8686
-- This function captures ide methods registered by the plugin, and then converts it to kv pairs
8787
handlersToGenericDefaultConfig :: DSum.DSum IdeMethod f -> [A.Pair]
8888
handlersToGenericDefaultConfig (IdeMethod m DSum.:=> _) = case m of
89-
STextDocumentCodeAction -> ["codeActionsOn" A..= True]
90-
STextDocumentCodeLens -> ["codeLensOn" A..= True]
91-
STextDocumentRename -> ["renameOn" A..= True]
92-
STextDocumentHover -> ["hoverOn" A..= True]
93-
STextDocumentDocumentSymbol -> ["symbolsOn" A..= True]
94-
STextDocumentCompletion -> ["completionOn" A..= True]
95-
_ -> []
89+
STextDocumentCodeAction -> ["codeActionsOn" A..= True]
90+
STextDocumentCodeLens -> ["codeLensOn" A..= True]
91+
STextDocumentRename -> ["renameOn" A..= True]
92+
STextDocumentHover -> ["hoverOn" A..= True]
93+
STextDocumentDocumentSymbol -> ["symbolsOn" A..= True]
94+
STextDocumentCompletion -> ["completionOn" A..= True]
95+
STextDocumentPrepareCallHierarchy -> ["callHierarchyOn" A..= True]
96+
_ -> []
9697

9798
-- | Generates json schema used in haskell vscode extension
9899
-- Similar to 'pluginsToDefaultConfig' but simpler, since schema has a flatten structure
@@ -121,6 +122,7 @@ pluginsToVSCodeExtensionSchema IdePlugins {..} = A.object $ mconcat $ singlePlug
121122
STextDocumentHover -> [withIdPrefix "hoverOn" A..= schemaEntry "hover"]
122123
STextDocumentDocumentSymbol -> [withIdPrefix "symbolsOn" A..= schemaEntry "symbols"]
123124
STextDocumentCompletion -> [withIdPrefix "completionOn" A..= schemaEntry "completions"]
125+
STextDocumentPrepareCallHierarchy -> [withIdPrefix "callHierarchyOn" A..= schemaEntry "call hierarchy"]
124126
_ -> []
125127
schemaEntry desc =
126128
A.object

0 commit comments

Comments
 (0)