-
I'm not sure how to configure the I've tried setting {
"haskell.formattingProvider": "fourmolu"
} If I run (:jsonrpc "2.0" :method "workspace/didChangeConfiguration" :params
(:settings
(:haskell\.formattingProvider "fourmolu"))) but I'm not seeing any kind of reaction from the server. There's nothing in the server's stderr either. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I just realised that 1.8.0.0 doesn't support formatting with the fourmolu with GHC 9.4.2, which I was using. This might have been my fault then, sorry! |
Beta Was this translation helpful? Give feedback.
-
Re: eglot in general, someone has to write the docs! We need an eglot user who actually understands how this works to step up and write some documentation on how to do it. Maybe that's you :) |
Beta Was this translation helpful? Give feedback.
-
Reading https://www.gnu.org/software/emacs/manual/html_node/eglot/Project_002dspecific-configuration.html#Examples it seems the correct way is this: (setq-default eglot-workspace-configuration '(:haskell (:formattingProvider "fourmolu"))) (or {
"haskell": {
"formattingProvider": "fourmolu"
}
} I'm not sure how to introspect what HLS actually parsed it as, but after setting that I get four spaces and leading commas in lists, whereas without it I got two spaces and trailing commas. |
Beta Was this translation helpful? Give feedback.
Reading https://www.gnu.org/software/emacs/manual/html_node/eglot/Project_002dspecific-configuration.html#Examples it seems the correct way is this:
(or
M-x add-dir-local-variable
to make it project-specific). Then runningM-x eglot-show-workspace-configuration
I seeI'm not sure how to introspect what HLS actually parsed it as, but after setting that I get four spaces and leading commas in lists, whereas without it I got two spaces and trailing commas.