Skip to content

Commit eee4ed7

Browse files
committed
Add new configuration settings for HLS 2.1.0.0
Add add a description of how to do it.
1 parent 918ffa2 commit eee4ed7

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed

CONTIBUTING.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Contributing to lsp-haskell
2+
3+
## Updating the configuration options for lsp-haskell
4+
5+
1. Generate the vscode settings file
6+
7+
```sh
8+
haskell-language-server-9.6.2 vscode-extension-schema > /tmp/schema.json
9+
```
10+
Add `{"contributes": {"configuration": { "properties":`
11+
to the top and
12+
`}}}` to the bottom.
13+
14+
2. Generate the settings snippet
15+
16+
Make sure you have https://github.com/emacs-lsp/lsp-mode/blob/master/scripts/lsp-generate-settings.el
17+
on your machine somewhere. In this example it is at `/tmp/lsp-generate-settings.el`
18+
19+
In emacs, activate IELM, `M-x ielm`
20+
21+
In IELM,
22+
23+
```elisp
24+
(load-library "/tmp/lsp-generate-settings.el")
25+
;; Do direct output to buffer
26+
(defun p (x) (move-end-of-line 0) (insert (format "\n%s" x)))
27+
(p (lsp-generate-settings "/tmp/schema.json" 'lsp-haskell))
28+
```
29+
30+
This will emit settings that do not currently exist in the running
31+
emacs instance.
32+
33+
Edit them into [lsp-haskell.el](./lsp-haskell.el)

lsp-haskell.el

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,43 @@
221221
:type 'boolean
222222
:lsp-path "haskell.plugin.refineImports.globalOn")
223223

224+
;; Updated for haskell-language-server 2.1.0.0
225+
226+
(lsp-defcustom lsp-haskell-plugin-cabal-code-actions-on t
227+
"Enables cabal code actions"
228+
:type 'boolean
229+
:group 'lsp-haskell
230+
:package-version '(lsp-mode . "8.0.1")
231+
:lsp-path "haskell.plugin.cabal.codeActionsOn")
232+
233+
(lsp-defcustom lsp-haskell-plugin-overloaded-record-dot-global-on t
234+
"Enables overloaded-record-dot plugin"
235+
:type 'boolean
236+
:group 'lsp-haskell
237+
:package-version '(lsp-mode . "8.0.1")
238+
:lsp-path "haskell.plugin.overloaded-record-dot.globalOn")
239+
240+
(lsp-defcustom lsp-haskell-plugin-pragmas-completion-global-on t
241+
"Enables pragmas-completion plugin"
242+
:type 'boolean
243+
:group 'lsp-haskell
244+
:package-version '(lsp-mode . "8.0.1")
245+
:lsp-path "haskell.plugin.pragmas-completion.globalOn")
246+
247+
(lsp-defcustom lsp-haskell-plugin-pragmas-disable-global-on t
248+
"Enables pragmas-disable plugin"
249+
:type 'boolean
250+
:group 'lsp-haskell
251+
:package-version '(lsp-mode . "8.0.1")
252+
:lsp-path "haskell.plugin.pragmas-disable.globalOn")
253+
254+
(lsp-defcustom lsp-haskell-plugin-pragmas-suggest-global-on t
255+
"Enables pragmas-suggest plugin"
256+
:type 'boolean
257+
:group 'lsp-haskell
258+
:package-version '(lsp-mode . "8.0.1")
259+
:lsp-path "haskell.plugin.pragmas-suggest.globalOn")
260+
224261
;; ---------------------------------------------------------------------
225262
;; Non-language server options
226263

0 commit comments

Comments
 (0)