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.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm not sure how to configure the
haskell.formattingProvider
setting in Emacs eglot. I see HLS has documentation for lap-mode instead, which is an alternative LSP client for Emacs. It would be great to add eglot instructions as well, as it is now merged to Emacs upstream and will be in the next release as a built-in LSP client.I've tried setting
eglot-workspace-configuration
so that callingeglot-show-workspace-configuration
prints:If I run
M-x eglot-signal-didChangeConfiguration
I can see eglot sending a message to HLS: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.
All reactions