Skip to content

Implement signature help #4626

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 37 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
7a54a1d
WIP: add basic boilerplate for signature help plugin
jian-lin Jun 8, 2025
9168b74
WIP: finish signature help plugin MVP
jian-lin Jul 10, 2025
4d7fa57
WIP: remove unused dependencies
jian-lin Jul 16, 2025
622c8ec
WIP: fix func-tests
jian-lin Jul 16, 2025
62fbccf
WIP: add basic tests
jian-lin Jul 16, 2025
a6635ca
Change expected test results considering the cursor shape
jian-lin Jul 24, 2025
bf0b4d5
Replace maybe with case for better readability
jian-lin Jul 24, 2025
c95d6e4
Call extractInfoFromSmallestContainingFunctionApplicationAst once
jian-lin Jul 25, 2025
3dc1ec8
Add missing ParameterInformation for multi-line tests
jian-lin Aug 3, 2025
dca1311
Add a signature help test for type constraint with kind signatures
jian-lin Aug 2, 2025
471958f
Add a signature help test for higher-order function
jian-lin Aug 2, 2025
d603ec4
Show more types: each type as one signature help
jian-lin Aug 3, 2025
faa4e48
Adjust import for the removal of hie-compat (#4613)
jian-lin Aug 3, 2025
9bea0e3
Use structured type and type string to generate signature help
jian-lin Aug 7, 2025
db5e59e
Add signature help test: 2 type constraints
jian-lin Aug 7, 2025
fdd5acd
Add signature help test: middle =>
jian-lin Aug 7, 2025
c6ece42
Add signature help test: => in argument
jian-lin Aug 7, 2025
fe2d618
Add 2 signature help tests: RankNTypes(forall in middle)
jian-lin Aug 7, 2025
c3224d7
Add signature help test: LinearTypes
jian-lin Aug 7, 2025
081ea8f
Add another signature help tests: RankNTypes(forall in middle)
jian-lin Aug 7, 2025
a522e88
Show function documentation in signature help
jian-lin Aug 14, 2025
d826d06
Show function argument documentation in signature help
jian-lin Aug 15, 2025
62f2e41
Rename a local variable
jian-lin Aug 16, 2025
35399e7
Do not error if doc is not available
jian-lin Aug 16, 2025
c0f7844
Add a helper function to create markdown doc
jian-lin Aug 16, 2025
eeeb283
Make signature helps reproducible before comparing them
jian-lin Aug 21, 2025
f1d19ba
Do not show uris in the argument documentation
jian-lin Aug 21, 2025
433a8ad
Add a signature help test: imported function with argument doc
jian-lin Aug 21, 2025
d3d7d12
Add a signature help test: imported function with no doc
jian-lin Aug 21, 2025
e0a7e8b
Remove an outdated TODO item
jian-lin Aug 21, 2025
e6702b7
Remember previous active signature
jian-lin Aug 21, 2025
3d7a67b
Update a TODO item
jian-lin Aug 21, 2025
800f908
Show signature help even when there are type applications
jian-lin Aug 21, 2025
cb84480
Fix some tests for ghc > 9.8 due to changed doc
jian-lin Aug 22, 2025
c7931a2
Fix some tests for ghc > 9.8 due to changed type: Any -> ZonkAny 0
jian-lin Aug 22, 2025
b6d4617
Add jian-lin as codeowner of hls-signature-help-plugin
jian-lin Aug 22, 2025
9a1de4e
Add hls-signature-help-plugin to some documentation files
jian-lin Aug 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@ jobs:
name: Compile the plugin-tutorial
run: cabal build plugin-tutorial

- if: matrix.test
name: Test hls-signature-help-plugin test suite
run: cabal test hls-signature-help-plugin-tests || cabal test hls-signature-help-plugin-tests

test_post_job:
if: always()
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
/plugins/hls-rename-plugin
/plugins/hls-retrie-plugin @wz1000
/plugins/hls-semantic-tokens-plugin @soulomoon
/plugins/hls-signature-help-plugin @jian-lin
/plugins/hls-splice-plugin @konn
/plugins/hls-stan-plugin @0rphee
/plugins/hls-stylish-haskell-plugin @michaelpj
Expand Down
8 changes: 7 additions & 1 deletion docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Many of these are standard LSP features, but a lot of special features are provi
| --------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| [Diagnostics](#diagnostics) | `textDocument/publishDiagnostics` |
| [Hovers](#hovers) | `textDocument/hover` |
| [Signature help](#signature-help) | `textDocument/signatureHelp` |
| [Jump to definition](#jump-to-definition) | `textDocument/definition` |
| [Jump to type definition](#jump-to-type-definition) | `textDocument/typeDefinition` |
| [Find references](#find-references) | `textDocument/references` |
Expand Down Expand Up @@ -63,6 +64,12 @@ Provided by: `hls-explicit-fixity-plugin`

Provides fixity information.

## Signature help

Provided by: `hls-signature-help-plugin`

Shows and highlights the function signature, the function documentation and the arguments documentation when the cursor is at a function argument.

## Jump to definition

Provided by: `ghcide`
Expand Down Expand Up @@ -445,7 +452,6 @@ Contributions welcome!

| Feature | Status | [LSP method](./what-is-hls.md#lsp-terminology) |
| ---------------------- | ----------------- | ---------------------------------------------- |
| Signature help | Unimplemented | `textDocument/signatureHelp` |
| Jump to declaration | Unclear if useful | `textDocument/declaration` |
| Jump to implementation | Unclear if useful | `textDocument/implementation` |
| Linked editing | Unimplemented | `textDocument/linkedEditingRange` |
Expand Down
1 change: 1 addition & 0 deletions docs/support/plugin-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ For example, a plugin to provide a formatter which has itself been abandoned has
| `hls-class-plugin` | 2 | |
| `hls-change-type-signature-plugin` | 2 | |
| `hls-eval-plugin` | 2 | |
| `hls-signature-help-plugin` | 2 | |
| `hls-explicit-fixity-plugin` | 2 | |
| `hls-explicit-record-fields-plugin` | 2 | |
| `hls-fourmolu-plugin` | 2 | |
Expand Down
2 changes: 1 addition & 1 deletion ghcide/src/Development/IDE/Core/Actions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ getAtPoint file pos = runMaybeT $ do

(hf, mapping) <- useWithStaleFastMT GetHieAst file
env <- hscEnv . fst <$> useWithStaleFastMT GhcSession file
dkMap <- lift $ maybe (DKMap mempty mempty) fst <$> runMaybeT (useWithStaleFastMT GetDocMap file)
dkMap <- lift $ maybe (DKMap mempty mempty mempty) fst <$> runMaybeT (useWithStaleFastMT GetDocMap file)

!pos' <- MaybeT (return $ fromCurrentPosition mapping pos)
MaybeT $ liftIO $ fmap (first (toCurrentRange mapping =<<)) <$> AtPoint.atPoint opts hf dkMap env pos'
Expand Down
4 changes: 2 additions & 2 deletions ghcide/src/Development/IDE/Core/RuleTypes.hs
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,9 @@ type instance RuleResult GetHieAst = HieAstResult
-- | A IntervalMap telling us what is in scope at each point
type instance RuleResult GetBindings = Bindings

data DocAndTyThingMap = DKMap {getDocMap :: !DocMap, getTyThingMap :: !TyThingMap}
data DocAndTyThingMap = DKMap {getDocMap :: !DocMap, getTyThingMap :: !TyThingMap, getArgDocMap :: !ArgDocMap}
instance NFData DocAndTyThingMap where
rnf (DKMap a b) = rwhnf a `seq` rwhnf b
rnf (DKMap a b c) = rwhnf a `seq` rwhnf b `seq` rwhnf c

instance Show DocAndTyThingMap where
show = const "docmap"
Expand Down
2 changes: 1 addition & 1 deletion ghcide/src/Development/IDE/Core/Rules.hs
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@

-- | Persistent rule to ensure that hover doesn't block on startup
persistentDocMapRule :: Rules ()
persistentDocMapRule = addPersistentRule GetDocMap $ \_ -> pure $ Just (DKMap mempty mempty, idDelta, Nothing)
persistentDocMapRule = addPersistentRule GetDocMap $ \_ -> pure $ Just (DKMap mempty mempty mempty, idDelta, Nothing)

readHieFileForSrcFromDisk :: Recorder (WithPriority Log) -> NormalizedFilePath -> MaybeT IdeAction Compat.HieFile
readHieFileForSrcFromDisk recorder file = do
Expand Down Expand Up @@ -809,7 +809,7 @@
hsc_env' <- setFileCacheHook (hscEnv session)
r <- loadInterface hsc_env' ms linkableType recompInfo
case r of
(diags, Nothing) -> return (Nothing, (diags, Nothing))

Check warning on line 812 in ghcide/src/Development/IDE/Core/Rules.hs

View workflow job for this annotation

GitHub Actions / Hlint check run

Suggestion in getModIfaceFromDiskRule in module Development.IDE.Core.Rules: Use fmap ▫︎ Found: "\\ fs -> map (snd . fromJust . hirCoreFp) <$> uses_ GetModIface fs" ▫︎ Perhaps: "fmap (map (snd . fromJust . hirCoreFp)) . uses_ GetModIface"
(diags, Just x) -> do
let !fp = Just $! hiFileFingerPrint x
return (fp, (diags, Just x))
Expand Down
12 changes: 10 additions & 2 deletions ghcide/src/Development/IDE/GHC/Compat/Outputable.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module Development.IDE.GHC.Compat.Outputable (
ppr, pprPanic, text, vcat, (<+>), ($$), empty, hang, nest, punctuate,
printSDocQualifiedUnsafe,
printWithoutUniques,
printWithoutUniquesOneLine,
mkPrintUnqualifiedDefault,
PrintUnqualified,
defaultUserStyle,
Expand All @@ -27,6 +28,7 @@ module Development.IDE.GHC.Compat.Outputable (
pprMsgEnvelopeBagWithLoc,
Error.getMessages,
renderWithContext,
showSDocOneLine,
defaultSDocContext,
errMsgDiagnostic,
unDecorated,
Expand Down Expand Up @@ -76,8 +78,14 @@ type PrintUnqualified = NamePprCtx
--
-- It print with a user-friendly style like: `a_a4ME` as `a`.
printWithoutUniques :: Outputable a => a -> String
printWithoutUniques =
renderWithContext (defaultSDocContext
printWithoutUniques = printWithoutUniques' renderWithContext

printWithoutUniquesOneLine :: Outputable a => a -> String
printWithoutUniquesOneLine = printWithoutUniques' showSDocOneLine

printWithoutUniques' :: Outputable a => (SDocContext -> SDoc -> String) -> a -> String
printWithoutUniques' showSDoc =
showSDoc (defaultSDocContext
{
sdocStyle = defaultUserStyle
, sdocSuppressUniques = True
Expand Down
11 changes: 9 additions & 2 deletions ghcide/src/Development/IDE/GHC/Util.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module Development.IDE.GHC.Util(
dontWriteHieFiles,
disableWarningsAsErrors,
printOutputable,
printOutputableOneLine,
getExtensions,
stripOccNamePrefix,
) where
Expand Down Expand Up @@ -264,11 +265,17 @@ ioe_dupHandlesNotCompatible h =
-- 1. print with a user-friendly style: `a_a4ME` as `a`.
-- 2. unescape escape sequences of printable unicode characters within a pair of double quotes
printOutputable :: Outputable a => a -> T.Text
printOutputable =
printOutputable = printOutputable' printWithoutUniques

printOutputableOneLine :: Outputable a => a -> T.Text
printOutputableOneLine = printOutputable' printWithoutUniquesOneLine

printOutputable' :: Outputable a => (a -> String) -> a -> T.Text
printOutputable' print =
-- IfaceTyLit from GHC.Iface.Type implements Outputable with 'show'.
-- Showing a String escapes non-ascii printable characters. We unescape it here.
-- More discussion at https://github.com/haskell/haskell-language-server/issues/3115.
unescape . T.pack . printWithoutUniques
unescape . T.pack . print
{-# INLINE printOutputable #-}

getExtensions :: ParsedModule -> [Extension]
Expand Down
6 changes: 3 additions & 3 deletions ghcide/src/Development/IDE/Plugin/Completions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ resolveCompletion ide _pid comp@CompletionItem{_detail,_documentation,_data_} ur
name <- liftIO $ lookupNameCache nc mod occ
mdkm <- liftIO $ runIdeAction "CompletionResolve.GetDocMap" (shakeExtras ide) $ useWithStaleFast GetDocMap file
let (dm,km) = case mdkm of
Just (DKMap docMap tyThingMap, _) -> (docMap,tyThingMap)
Nothing -> (mempty, mempty)
Just (DKMap docMap tyThingMap _argDocMap, _) -> (docMap,tyThingMap)
Nothing -> (mempty, mempty)
doc <- case lookupNameEnv dm name of
Just doc -> pure $ spanDocToMarkdown doc
Nothing -> liftIO $ spanDocToMarkdown <$> getDocumentationTryGhc (hscEnv sess) name
Nothing -> liftIO $ spanDocToMarkdown . fst <$> getDocumentationTryGhc (hscEnv sess) name
typ <- case lookupNameEnv km name of
_ | not needType -> pure Nothing
Just ty -> pure (safeTyThingType ty)
Expand Down
2 changes: 1 addition & 1 deletion ghcide/src/Development/IDE/Spans/AtPoint.hs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ atPoint
-> HscEnv
-> Position
-> IO (Maybe (Maybe Range, [T.Text]))
atPoint IdeOptions{} (HAR _ (hf :: HieASTs a) rf _ (kind :: HieKind hietype)) (DKMap dm km) env pos =
atPoint IdeOptions{} (HAR _ (hf :: HieASTs a) rf _ (kind :: HieKind hietype)) (DKMap dm km _am) env pos =
listToMaybe <$> sequence (pointCommand hf pos hoverInfo)
where
-- Hover info for values/data
Expand Down
3 changes: 3 additions & 0 deletions ghcide/src/Development/IDE/Spans/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module Development.IDE.Spans.Common (
, spanDocToMarkdownForTest
, DocMap
, TyThingMap
, ArgDocMap
, srcSpanToMdLink
) where

Expand All @@ -29,13 +30,15 @@ import GHC.Generics
import System.FilePath

import Control.Lens
import Data.IntMap (IntMap)
import Development.IDE.GHC.Compat
import Development.IDE.GHC.Orphans ()
import qualified Language.LSP.Protocol.Lens as JL
import Language.LSP.Protocol.Types

type DocMap = NameEnv SpanDoc
type TyThingMap = NameEnv TyThing
type ArgDocMap = NameEnv (IntMap SpanDoc)
Comment on lines 39 to +41
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of creating a new ArgDocMap, an alternative implementation is to extend DocMap to NameEnv (SpanDoc, IntMap SpanDoc).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds sensible to me? Any reason not to do that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not have a strong opinion on this. I will change the code to type DocMap = NameEnv (SpanDoc, IntMap SpanDoc).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the code it seems like it would simplifiy things quite a lot.

Copy link
Contributor Author

@jian-lin jian-lin Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now I have second thoughts about this because the alternative implementation type DocMap = NameEnv (SpanDoc, IntMap SpanDoc) is semantically incorrect. The semantically correct version should be type DocMap = NameEnv (Maybe SpanDoc, IntMap SpanDoc) or type DocMap = NameEnv (Maybe SpanDoc, Maybe (IntMap SpanDoc)) because a Name can have only function doc or arg doc.

I prefer to keep the old implementation, i.e., introducing a new ArgDocMap, since the semantically correct version of the alternative implementation seems more complicated.


-- | Shows IEWrappedName, without any modifier, qualifier or unique identifier.
unqualIEWrapName :: IEWrappedName GhcPs -> T.Text
Expand Down
25 changes: 16 additions & 9 deletions ghcide/src/Development/IDE/Spans/Documentation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import Control.Monad.Extra (findM)
import Control.Monad.IO.Class
import Data.Either
import Data.Foldable
import Data.IntMap (IntMap)
import Data.List.Extra
import qualified Data.Map as M
import Data.Maybe
Expand All @@ -41,21 +42,27 @@ mkDocMap
-> IO DocAndTyThingMap
mkDocMap env rm this_mod =
do
(Just Docs{docs_decls = UniqMap this_docs}) <- extractDocs (hsc_dflags env) this_mod
(Just Docs{docs_decls = UniqMap this_docs, docs_args = UniqMap this_arg_docs}) <- extractDocs (hsc_dflags env) this_mod
d <- foldrM getDocs (fmap (\(_, x) -> (map hsDocString x) `SpanDocString` SpanDocUris Nothing Nothing) this_docs) names
k <- foldrM getType (tcg_type_env this_mod) names
pure $ DKMap d k
a <- foldrM getArgDocs (fmap (\(_, m) -> fmap (\x -> [hsDocString x] `SpanDocString` SpanDocUris Nothing Nothing) m) this_arg_docs) names
pure $ DKMap d k a
where
getDocs n nameMap
| maybe True (mod ==) $ nameModule_maybe n = pure nameMap -- we already have the docs in this_docs, or they do not exist
| otherwise = do
doc <- getDocumentationTryGhc env n
(doc, _argDoc) <- getDocumentationTryGhc env n
pure $ extendNameEnv nameMap n doc
getType n nameMap
| Nothing <- lookupNameEnv nameMap n
= do kind <- lookupKind env n
pure $ maybe nameMap (extendNameEnv nameMap n) kind
| otherwise = pure nameMap
getArgDocs n nameMap
| maybe True (mod ==) $ nameModule_maybe n = pure nameMap
| otherwise = do
(_doc, argDoc) <- getDocumentationTryGhc env n
pure $ extendNameEnv nameMap n argDoc
names = rights $ S.toList idents
idents = M.keysSet rm
mod = tcg_mod this_mod
Expand All @@ -64,23 +71,23 @@ lookupKind :: HscEnv -> Name -> IO (Maybe TyThing)
lookupKind env =
fmap (fromRight Nothing) . catchSrcErrors (hsc_dflags env) "span" . lookupName env

getDocumentationTryGhc :: HscEnv -> Name -> IO SpanDoc
getDocumentationTryGhc :: HscEnv -> Name -> IO (SpanDoc, IntMap SpanDoc)
getDocumentationTryGhc env n =
(fromMaybe emptySpanDoc . listToMaybe <$> getDocumentationsTryGhc env [n])
`catch` (\(_ :: IOEnvFailure) -> pure emptySpanDoc)
(fromMaybe (emptySpanDoc, mempty) . listToMaybe <$> getDocumentationsTryGhc env [n])
`catch` (\(_ :: IOEnvFailure) -> pure (emptySpanDoc, mempty))

getDocumentationsTryGhc :: HscEnv -> [Name] -> IO [SpanDoc]
getDocumentationsTryGhc :: HscEnv -> [Name] -> IO [(SpanDoc, IntMap SpanDoc)]
getDocumentationsTryGhc env names = do
resOr <- catchSrcErrors (hsc_dflags env) "docs" $ getDocsBatch env names
case resOr of
Left _ -> return []
Right res -> zipWithM unwrap res names
where
unwrap (Right (Just docs, _)) n = SpanDocString (map hsDocString docs) <$> getUris n
unwrap (Right (Just docs, argDocs)) n = (\uris -> (SpanDocString (map hsDocString docs) uris, fmap (\x -> SpanDocString [hsDocString x] uris) argDocs)) <$> getUris n
unwrap _ n = mkSpanDocText n

mkSpanDocText name =
SpanDocText [] <$> getUris name
(\uris -> (SpanDocText [] uris, mempty)) <$> getUris name

-- Get the uris to the documentation and source html pages if they exist
getUris name = do
Expand Down
54 changes: 54 additions & 0 deletions haskell-language-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,59 @@ test-suite hls-stan-plugin-tests
default-extensions:
OverloadedStrings

-----------------------------
-- signature help plugin
-----------------------------

flag signatureHelp
description: Enable signature help plugin
default: True
manual: True

common signatureHelp
if flag(signatureHelp)
build-depends: haskell-language-server:hls-signature-help-plugin
cpp-options: -Dhls_signatureHelp

-- TODO(@linj) remove unneeded deps
library hls-signature-help-plugin
import: defaults, pedantic, warnings
if !flag(signatureHelp)
buildable: False
exposed-modules: Ide.Plugin.SignatureHelp
hs-source-dirs: plugins/hls-signature-help-plugin/src
default-extensions:
DerivingStrategies
LambdaCase
OverloadedStrings
build-depends:
, containers
, ghc
, ghcide == 2.11.0.0
, hls-plugin-api == 2.11.0.0
, lsp-types
, text
, transformers


test-suite hls-signature-help-plugin-tests
import: defaults, pedantic, test-defaults, warnings
if !flag(signatureHelp)
buildable: False
type: exitcode-stdio-1.0
hs-source-dirs: plugins/hls-signature-help-plugin/test
main-is: Main.hs
build-depends:
, ghcide
, haskell-language-server:hls-signature-help-plugin
, hls-test-utils == 2.11.0.0
, lens
, lsp-types
, regex-tdfa
, text
default-extensions:
OverloadedStrings

-----------------------------
-- module name plugin
-----------------------------
Expand Down Expand Up @@ -1846,6 +1899,7 @@ library
, retrie
, hlint
, stan
, signatureHelp
, moduleName
, pragmas
, splice
Expand Down
1 change: 1 addition & 0 deletions hls-plugin-api/src/Ide/Plugin/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ parsePluginConfig def = A.withObject "PluginConfig" $ \o -> PluginConfig
<*> o .:? "diagnosticsOn" .!= plcDiagnosticsOn def -- AZ
<*> o .:? "hoverOn" .!= plcHoverOn def
<*> o .:? "symbolsOn" .!= plcSymbolsOn def
<*> o .:? "signatureHelpOn" .!= plcSignatureHelpOn def
<*> o .:? "completionOn" .!= plcCompletionOn def
<*> o .:? "renameOn" .!= plcRenameOn def
<*> o .:? "selectionRangeOn" .!= plcSelectionRangeOn def
Expand Down
2 changes: 2 additions & 0 deletions hls-plugin-api/src/Ide/Plugin/ConfigUtils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ pluginsToDefaultConfig IdePlugins {..} =
SMethod_TextDocumentRename -> ["renameOn" A..= plcRenameOn]
SMethod_TextDocumentHover -> ["hoverOn" A..= plcHoverOn]
SMethod_TextDocumentDocumentSymbol -> ["symbolsOn" A..= plcSymbolsOn]
SMethod_TextDocumentSignatureHelp -> ["signatureHelpOn" A..= plcSignatureHelpOn]
SMethod_TextDocumentCompletion -> ["completionOn" A..= plcCompletionOn]
SMethod_TextDocumentPrepareCallHierarchy -> ["callHierarchyOn" A..= plcCallHierarchyOn]
SMethod_TextDocumentSemanticTokensFull -> ["semanticTokensOn" A..= plcSemanticTokensOn]
Expand Down Expand Up @@ -137,6 +138,7 @@ pluginsToVSCodeExtensionSchema IdePlugins {..} = A.object $ mconcat $ singlePlug
SMethod_TextDocumentRename -> [toKey' "renameOn" A..= schemaEntry "rename" plcRenameOn]
SMethod_TextDocumentHover -> [toKey' "hoverOn" A..= schemaEntry "hover" plcHoverOn]
SMethod_TextDocumentDocumentSymbol -> [toKey' "symbolsOn" A..= schemaEntry "symbols" plcSymbolsOn]
SMethod_TextDocumentSignatureHelp -> [toKey' "signatureHelpOn" A..= schemaEntry "signature help" plcSignatureHelpOn]
SMethod_TextDocumentCompletion -> [toKey' "completionOn" A..= schemaEntry "completions" plcCompletionOn]
SMethod_TextDocumentPrepareCallHierarchy -> [toKey' "callHierarchyOn" A..= schemaEntry "call hierarchy" plcCallHierarchyOn]
SMethod_TextDocumentSemanticTokensFull -> [toKey' "semanticTokensOn" A..= schemaEntry "semantic tokens" plcSemanticTokensOn]
Expand Down
Loading
Loading