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 @@ -79,6 +79,9 @@ exposed via a set of interactive functions.
7979- ` lsp-haskell-set-completion-snippets-on ` /
8080 ` lsp-haskell-set-completion-snippets-off ` Whether completion should
8181 return plain text or snippets.
82+ - ` lsp-haskell-set-formatter-brittany ` /
83+ ` lsp-haskell-set-formatter-floskell ` /
84+ ` lsp-haskell-set-formatter-ormolu ` Set code formatter.
8285
8386There are also non-interactive versions that do not actually send the
8487settings to the live server, but are suitable for use in ` .dir-locals `
@@ -88,3 +91,4 @@ for a specific project.
8891- ` lsp-haskell-set-max-problems `
8992- ` lsp-haskell-set-liquid `
9093- ` lsp-haskell-set-completion-snippets `
94+ - ` 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