File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,9 @@ exposed via a set of interactive functions.
6262- ` lsp-haskell-set-completion-snippets-on ` /
6363 ` lsp-haskell-set-completion-snippets-off ` Whether completion should
6464 return plain text or snippets.
65+ - ` lsp-haskell-set-formatter-brittany ` /
66+ ` lsp-haskell-set-formatter-floskell ` /
67+ ` lsp-haskell-set-formatter-ormolu ` Set code formatter.
6568
6669There are also non-interactive versions that do not actually send the
6770settings to the live server, but are suitable for use in ` .dir-locals `
@@ -71,3 +74,4 @@ for a specific project.
7174- ` lsp-haskell-set-max-problems `
7275- ` lsp-haskell-set-liquid `
7376- ` lsp-haskell-set-completion-snippets `
77+ - ` lsp-haskell-set-formatter `
Original file line number Diff line number Diff line change @@ -290,6 +290,29 @@ These are assembled from the customizable variables
290290 (lsp-haskell-set-completion-snippets :json-false )
291291 (lsp-haskell--set-configuration))
292292
293+ ; ; -------------------------------------
294+
295+ (defun lsp-haskell-set-formatter (val )
296+ " Set code formatter."
297+ (lsp-haskell-set-config " formattingProvider" val))
298+
299+ (defun lsp-haskell-set-formatter-brittany ()
300+ " Use brittany."
301+ (interactive )
302+ (lsp-haskell-set-formatter :brittany )
303+ (lsp-haskell--set-configuration))
304+
305+ (defun lsp-haskell-set-formatter-floskell ()
306+ " Use floskell."
307+ (interactive )
308+ (lsp-haskell-set-formatter :floskell )
309+ (lsp-haskell--set-configuration))
310+
311+ (defun lsp-haskell-set-formatter-ormolu ()
312+ " Use ormolu."
313+ (interactive )
314+ (lsp-haskell-set-formatter :ormolu )
315+ (lsp-haskell--set-configuration))
293316
294317; ; ---------------------------------------------------------------------
295318
You can’t perform that action at this time.
0 commit comments