|
46 | 46 | ;; Originally generated from the vscode extension's package.json using lsp-generate-bindings.
|
47 | 47 | ;; Should ideally stay in sync with what's offered in the vscode extension.
|
48 | 48 |
|
49 |
| -(defcustom lsp-haskell-hlint-on |
50 |
| - t |
51 |
| - "Get suggestions from hlint." |
52 |
| - :group 'lsp-haskell |
53 |
| - :type 'boolean) |
54 |
| -(defcustom lsp-haskell-max-number-of-problems |
55 |
| - 100 |
56 |
| - "Controls the maximum number of problems produced by the server." |
57 |
| - :group 'lsp-haskell |
58 |
| - :type 'number) |
59 |
| -(defcustom lsp-haskell-diagnostics-on-change |
60 |
| - t |
61 |
| - "Compute diagnostics continuously as you type. |
62 |
| -Turn off to only generate diagnostics on file save." |
63 |
| - :group 'lsp-haskell |
64 |
| - :type 'boolean) |
65 |
| -(defcustom lsp-haskell-liquid-on |
66 |
| - nil |
67 |
| - "Get diagnostics from liquid haskell." |
68 |
| - :group 'lsp-haskell |
69 |
| - :type 'boolean) |
70 |
| -(defcustom lsp-haskell-completion-snippets-on |
71 |
| - lsp-enable-snippet |
72 |
| - "Show snippets with type information when using code completion." |
| 49 | +(defcustom lsp-haskell-formatting-provider |
| 50 | + "ormolu" |
| 51 | + "The formatter to use when formatting a document or range. Ensure the plugin is enabled." |
73 | 52 | :group 'lsp-haskell
|
74 |
| - :type 'boolean) |
75 |
| -(defcustom lsp-haskell-format-on-import-on |
| 53 | + :type '(choice (:tag "brittany" "floskell" "fourmolu" "ormolu" "stylish-haskell" "none"))) |
| 54 | +(defcustom lsp-haskell-check-project |
76 | 55 | t
|
77 |
| - "When adding an import, use the formatter on the result." |
| 56 | + "Whether to typecheck the entire project on load. It could lead to bad perfomance in large projects." |
78 | 57 | :group 'lsp-haskell
|
79 | 58 | :type 'boolean)
|
80 |
| -(defcustom lsp-haskell-formatting-provider |
81 |
| - "ormolu" |
82 |
| - "The formatter to use when formatting a document or range." |
| 59 | +(defcustom lsp-haskell-max-completions |
| 60 | + 40 |
| 61 | + "Maximum number of completions sent to the editor." |
83 | 62 | :group 'lsp-haskell
|
84 |
| - :type '(choice (const :tag "brittany" "brittany") |
85 |
| - (const :tag "floskell" "floskell") |
86 |
| - (const :tag "fourmolu" "fourmolu") |
87 |
| - (const :tag "ormolu" "ormolu") |
88 |
| - (const :tag "stylish-haskell" "stylish-haskell") |
89 |
| - (const :tag "none" "none"))) |
| 63 | + :type 'number) |
90 | 64 |
|
91 | 65 | ;; ---------------------------------------------------------------------
|
92 | 66 | ;; Plugin-specific configuration
|
93 | 67 | (defgroup lsp-haskell-plugins nil
|
94 | 68 | "Customization group for 'lsp-haskell' plugins."
|
95 | 69 | :group 'lsp-haskell)
|
96 | 70 |
|
97 |
| -(defcustom lsp-haskell-ghcide-on |
| 71 | +(defcustom lsp-haskell-plugin-import-lens-code-actions-on |
| 72 | + t |
| 73 | + "Enables explicit imports code actions" |
| 74 | + :group 'lsp-haskell-plugins |
| 75 | + :type 'boolean) |
| 76 | +(defcustom lsp-haskell-plugin-import-lens-code-lens-on |
98 | 77 | t
|
99 |
| - "Turn on the ghcide plugins." |
| 78 | + "Enables explicit imports code lenses" |
100 | 79 | :group 'lsp-haskell-plugins
|
101 | 80 | :type 'boolean)
|
102 |
| -(defcustom lsp-haskell-pragmas-on |
| 81 | +(defcustom lsp-haskell-plugin-hlint-code-actions-on |
103 | 82 | t
|
104 |
| - "Turn on the pragmas plugin." |
| 83 | + "Enables hlint code actions (apply hints)" |
105 | 84 | :group 'lsp-haskell-plugins
|
106 | 85 | :type 'boolean)
|
107 |
| -(defcustom lsp-haskell-floskell-on |
| 86 | +(defcustom lsp-haskell-plugin-hlint-diagnostics-on |
108 | 87 | t
|
109 |
| - "Turn on the floskell plugin." |
| 88 | + "Enables hlint diagnostics" |
110 | 89 | :group 'lsp-haskell-plugins
|
111 | 90 | :type 'boolean)
|
112 |
| -(defcustom lsp-haskell-fourmolu-on |
| 91 | +(defcustom lsp-haskell-plugin-hlint-config-flags |
| 92 | + nil |
| 93 | + "Flags used by hlint" |
| 94 | + :group 'lsp-haskell-plugins |
| 95 | + :type 'lsp-string-vector) |
| 96 | +(defcustom lsp-haskell-plugin-eval-global-on |
113 | 97 | t
|
114 |
| - "Turn on the fourmolu plugin." |
| 98 | + "Enables eval plugin" |
115 | 99 | :group 'lsp-haskell-plugins
|
116 | 100 | :type 'boolean)
|
117 |
| -(defcustom lsp-haskell-ormolu-on |
| 101 | +(defcustom lsp-haskell-plugin-module-name-global-on |
118 | 102 | t
|
119 |
| - "Turn on the ormolu plugin." |
| 103 | + "Enables module name plugin" |
120 | 104 | :group 'lsp-haskell-plugins
|
121 | 105 | :type 'boolean)
|
122 |
| -(defcustom lsp-haskell-stylish-haskell-on |
| 106 | +(defcustom lsp-haskell-plugin-splice-global-on |
123 | 107 | t
|
124 |
| - "Turn on the stylish-haskell plugin." |
| 108 | + "Enables splice plugin (expand template haskell definitions)" |
125 | 109 | :group 'lsp-haskell-plugins
|
126 | 110 | :type 'boolean)
|
127 |
| -(defcustom lsp-haskell-brittany-on |
| 111 | +(defcustom lsp-haskell-plugin-haddock-comments-global-on |
128 | 112 | t
|
129 |
| - "Turn on the brittany plugin." |
| 113 | + "Enables haddock comments plugin" |
130 | 114 | :group 'lsp-haskell-plugins
|
131 | 115 | :type 'boolean)
|
132 |
| -(defcustom lsp-haskell-tactic-on |
| 116 | +(defcustom lsp-haskell-plugin-class-global-on |
133 | 117 | t
|
134 |
| - "Turn on the tactic plugin." |
| 118 | + "Enables type class plugin" |
135 | 119 | :group 'lsp-haskell-plugins
|
136 | 120 | :type 'boolean)
|
137 |
| -(defcustom lsp-haskell-retrie-on |
| 121 | +(defcustom lsp-haskell-plugin-retrie-global-on |
138 | 122 | t
|
139 |
| - "Turn on the retrie plugin." |
| 123 | + "Enables retrie plugin" |
140 | 124 | :group 'lsp-haskell-plugins
|
141 | 125 | :type 'boolean)
|
142 |
| -(defcustom lsp-haskell-eval-on |
| 126 | +(defcustom lsp-haskell-plugin-tactics-global-on |
143 | 127 | t
|
144 |
| - "Turn on the eval plugin." |
| 128 | + "Enables Wingman (tactics) plugin" |
145 | 129 | :group 'lsp-haskell-plugins
|
146 | 130 | :type 'boolean)
|
147 |
| -(defcustom lsp-haskell-importlens-on |
| 131 | +(defcustom lsp-haskell-plugin-tactics-config-auto-gas |
| 132 | + 4 |
| 133 | + "The depth of the search tree when performing \"Attempt to fill hole\". Bigger values will be able to derive more solutions, but will take exponentially more time." |
| 134 | + :group 'lsp-haskell-plugins |
| 135 | + :type 'number) |
| 136 | +(defcustom lsp-haskell-plugin-tactics-config-hole-severity |
| 137 | + nil |
| 138 | + "The severity to use when showing hole diagnostics." |
| 139 | + :group 'lsp-haskell-plugins |
| 140 | + :type '(choice (:tag 1 2 3 4 nil))) |
| 141 | +(defcustom lsp-haskell-plugin-tactics-config-max-use-ctor-actions |
| 142 | + 5 |
| 143 | + "Maximum number of `Use constructor <x>` code actions that can appear" |
| 144 | + :group 'lsp-haskell-plugins |
| 145 | + :type 'number) |
| 146 | +(defcustom lsp-haskell-plugin-tactics-config-timeout-duration |
| 147 | + 2 |
| 148 | + "The timeout for Wingman actions, in seconds" |
| 149 | + :group 'lsp-haskell-plugins |
| 150 | + :type 'number) |
| 151 | +(defcustom lsp-haskell-plugin-tactics-config-proofstate-styling |
148 | 152 | t
|
149 |
| - "Turn on the explicit import lens." |
| 153 | + "Should Wingman emit styling markup when showing metaprogram proof states?" |
150 | 154 | :group 'lsp-haskell-plugins
|
151 | 155 | :type 'boolean)
|
152 |
| -(defcustom lsp-haskell-refineimports-on |
| 156 | +(defcustom lsp-haskell-plugin-pragmas-code-actions-on |
153 | 157 | t
|
154 |
| - "Turn on the refine imports lens." |
| 158 | + "Enables pragmas code actions" |
155 | 159 | :group 'lsp-haskell-plugins
|
156 | 160 | :type 'boolean)
|
157 |
| -(defcustom lsp-haskell-modulename-on |
| 161 | +(defcustom lsp-haskell-plugin-pragmas-completion-on |
158 | 162 | t
|
159 |
| - "Turn on the moduleName plugin." |
| 163 | + "Enables pragmas completions" |
160 | 164 | :group 'lsp-haskell-plugins
|
161 | 165 | :type 'boolean)
|
162 |
| -(defcustom lsp-haskell-hlint-on |
| 166 | +(defcustom lsp-haskell-plugin-ghcide-completions-config-auto-extend-on |
| 167 | + t |
| 168 | + "Extends the import list automatically when completing a out-of-scope identifier" |
| 169 | + :group 'lsp-haskell-plugins |
| 170 | + :type 'boolean) |
| 171 | +(defcustom lsp-haskell-plugin-ghcide-completions-config-snippets-on |
| 172 | + lsp-enable-snippet |
| 173 | + "Inserts snippets when using code completions" |
| 174 | + :group 'lsp-haskell-plugins |
| 175 | + :type 'boolean) |
| 176 | +(defcustom lsp-haskell-plugin-ghcide-type-lenses-global-on |
| 177 | + t |
| 178 | + "Enables type lenses plugin" |
| 179 | + :group 'lsp-haskell-plugins |
| 180 | + :type 'boolean) |
| 181 | +(defcustom lsp-haskell-plugin-ghcide-type-lenses-config-mode |
| 182 | + t |
| 183 | + "Control how type lenses are shown" |
| 184 | + :group 'lsp-haskell-plugins |
| 185 | + :type '(choice (:tag "always" "exported" "diagnostics"))) |
| 186 | +(defcustom lsp-haskell-plugin-refine-imports-global-on |
163 | 187 | t
|
164 |
| - "Turn on the hlint plugin." |
| 188 | + "Enables refine imports plugin" |
165 | 189 | :group 'lsp-haskell-plugins
|
166 | 190 | :type 'boolean)
|
167 | 191 |
|
@@ -256,28 +280,33 @@ and `lsp-haskell-server-args' and `lsp-haskell-server-wrapper-function'."
|
256 | 280 | ;; Note that customizing these will currently *not* send the updated configuration to the server,
|
257 | 281 | ;; users must manually restart. See https://github.com/emacs-lsp/lsp-mode/issues/1174.
|
258 | 282 | (lsp-register-custom-settings
|
259 |
| - '(("haskell.formattingProvider" lsp-haskell-formatting-provider) |
260 |
| - ("haskell.formatOnImportOn" lsp-haskell-format-on-import-on t) |
261 |
| - ("haskell.completionSnippetsOn" lsp-haskell-completion-snippets-on t) |
262 |
| - ("haskell.liquidOn" lsp-haskell-liquid-on t) |
263 |
| - ("haskell.diagnosticsOnChange" lsp-haskell-diagnostics-on-change t) |
264 |
| - ("haskell.maxNumberOfProblems" lsp-haskell-max-number-of-problems) |
265 |
| - ("haskell.hlintOn" lsp-haskell-hlint-on t) |
266 |
| - |
267 |
| - ("haskell.plugin.ghcide.globalOn" lsp-haskell-ghcide-on t) |
268 |
| - ("haskell.plugin.pragmas.globalOn" lsp-haskell-pragmas-on t) |
269 |
| - ("haskell.plugin.floskell.globalOn" lsp-haskell-floskell-on t) |
270 |
| - ("haskell.plugin.fourmolu.globalOn" lsp-haskell-fourmolu-on t) |
271 |
| - ("haskell.plugin.ormolu.globalOn" lsp-haskell-ormolu-on t) |
272 |
| - ("haskell.plugin.stylish-haskell.globalOn" lsp-haskell-stylish-haskell-on t) |
273 |
| - ("haskell.plugin.brittany.globalOn" lsp-haskell-brittany-on t) |
274 |
| - ("haskell.plugin.tactic.globalOn" lsp-haskell-tactic-on t) |
275 |
| - ("haskell.plugin.retrie.globalOn" lsp-haskell-retrie-on t) |
276 |
| - ("haskell.plugin.eval.globalOn" lsp-haskell-eval-on t) |
277 |
| - ("haskell.plugin.importLens.globalOn" lsp-haskell-importlens-on t) |
278 |
| - ("haskell.plugin.refineImports.globalOn" lsp-haskell-refineimports-on t) |
279 |
| - ("haskell.plugin.moduleName.globalOn" lsp-haskell-modulename-on t) |
280 |
| - ("haskell.plugin.hlint.globalOn" lsp-haskell-hlint-on t))) |
| 283 | + '(("haskell.plugin.refineImports.globalOn" lsp-haskell-plugin-refine-imports-global-on t) |
| 284 | + ("haskell.plugin.ghcide-type-lenses.config.mode" lsp-haskell-plugin-ghcide-type-lenses-config-mode) |
| 285 | + ("haskell.plugin.ghcide-type-lenses.globalOn" lsp-haskell-plugin-ghcide-type-lenses-global-on t) |
| 286 | + ("haskell.plugin.ghcide-completions.config.snippetsOn" lsp-haskell-plugin-ghcide-completions-config-snippets-on t) |
| 287 | + ("haskell.plugin.ghcide-completions.config.autoExtendOn" lsp-haskell-plugin-ghcide-completions-config-auto-extend-on t) |
| 288 | + ("haskell.plugin.pragmas.completionOn" lsp-haskell-plugin-pragmas-completion-on t) |
| 289 | + ("haskell.plugin.pragmas.codeActionsOn" lsp-haskell-plugin-pragmas-code-actions-on t) |
| 290 | + ("haskell.plugin.tactics.config.proofstate_styling" lsp-haskell-plugin-tactics-config-proofstate-styling t) |
| 291 | + ("haskell.plugin.tactics.config.timeout_duration" lsp-haskell-plugin-tactics-config-timeout-duration) |
| 292 | + ("haskell.plugin.tactics.config.max_use_ctor_actions" lsp-haskell-plugin-tactics-config-max-use-ctor-actions) |
| 293 | + ("haskell.plugin.tactics.config.hole_severity" lsp-haskell-plugin-tactics-config-hole-severity) |
| 294 | + ("haskell.plugin.tactics.config.auto_gas" lsp-haskell-plugin-tactics-config-auto-gas) |
| 295 | + ("haskell.plugin.tactics.globalOn" lsp-haskell-plugin-tactics-global-on t) |
| 296 | + ("haskell.plugin.retrie.globalOn" lsp-haskell-plugin-retrie-global-on t) |
| 297 | + ("haskell.plugin.class.globalOn" lsp-haskell-plugin-class-global-on t) |
| 298 | + ("haskell.plugin.haddockComments.globalOn" lsp-haskell-plugin-haddock-comments-global-on t) |
| 299 | + ("haskell.plugin.splice.globalOn" lsp-haskell-plugin-splice-global-on t) |
| 300 | + ("haskell.plugin.moduleName.globalOn" lsp-haskell-plugin-module-name-global-on t) |
| 301 | + ("haskell.plugin.eval.globalOn" lsp-haskell-plugin-eval-global-on t) |
| 302 | + ("haskell.plugin.hlint.config.flags" lsp-haskell-plugin-hlint-config-flags) |
| 303 | + ("haskell.plugin.hlint.diagnosticsOn" lsp-haskell-plugin-hlint-diagnostics-on t) |
| 304 | + ("haskell.plugin.hlint.codeActionsOn" lsp-haskell-plugin-hlint-code-actions-on t) |
| 305 | + ("haskell.plugin.importLens.codeLensOn" lsp-haskell-plugin-import-lens-code-lens-on t) |
| 306 | + ("haskell.plugin.importLens.codeActionsOn" lsp-haskell-plugin-import-lens-code-actions-on t) |
| 307 | + ("haskell.maxCompletions" lsp-haskell-max-completions) |
| 308 | + ("haskell.checkProject" lsp-haskell-check-project t) |
| 309 | + ("haskell.formattingProvider" lsp-haskell-formatting-provider))) |
281 | 310 |
|
282 | 311 | ;; This mapping is set for 'haskell-mode -> haskell' in the lsp-mode repo itself. If we move
|
283 | 312 | ;; it there, then delete it from here.
|
|
0 commit comments