File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
ghcide/src/Development/IDE/Plugin Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ module Development.IDE.Plugin.Completions
6
6
(
7
7
plugin
8
8
, getCompletionsLSP
9
+ , maxCompletions
9
10
) where
10
11
11
12
import Language.Haskell.LSP.Messages
@@ -116,6 +117,12 @@ instance Hashable NonLocalCompletions
116
117
instance NFData NonLocalCompletions
117
118
instance Binary NonLocalCompletions
118
119
120
+ -- | 40 may seem conservative but note that most editors limit how many completions
121
+ -- are displayed in the screen, and most users rarely scroll.
122
+ -- For instance, VSCode only shows 12 completions in its popup, and Emacs has a similar limit.
123
+ maxCompletions :: Int
124
+ maxCompletions = 40
125
+
119
126
-- | Generate code actions.
120
127
getCompletionsLSP
121
128
:: LSP. LspFuncs Config
You can’t perform that action at this time.
0 commit comments