You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I just upgraded to Emacs 27.1, and it seems that there was some change to the handling of JSON serialization. When trying the various lsp-set-formatter commands: lsp-set-formatter-ormolu lsp-set-formatter-brittany lsp-set-formatter-floskell
I get a: (wrong-type-argument json-value-p :ormolu), (wrong-type-argument json-value-p :brittany), or (wrong-type-argument json-value-p :floskell), respectively.
Here's a Backtrace from trying lsp-set-formatter-brittany:
This does two things:
- Create `defcustom` variables for settings, matching the vscode
extension for all the language server settings.
- Use `lsp-mode`'s support for custom settings to handle sending them to
the server.
This lets users persistently configure their server settings using
normal Emacs setting customization.
This will probably break people, so should maybe be a major version
bump.
Fixesemacs-lsp#69, emacs-lsp#75, emacs-lsp#78; supersedes the (excellent) emacs-lsp#74 and emacs-lsp#76.
Notes:
- I have not copied the settings from the vscode extension regarding
starting the server. We don't try and get prebuilt binaries, so I
thought it was simplest to stick to command-and-arguments.
- I renamed the process option for consistency with other servers and to
avoid references to `hie`. This PR will already break basically everyone, so
I thought I might as well do that too.
- The current customization functions re-send a `didChangeConfiguration`
notification when called. `lsp-mode` does *not* currently do this when
you change variables, which is annoying. My inclination is to let them
fix it in the name of simplicity, but if anyone really hates not being
able to change the formatter without restarting the server I can try and
hack something together.
Hello, I just upgraded to Emacs 27.1, and it seems that there was some change to the handling of JSON serialization. When trying the various
lsp-set-formatter
commands:lsp-set-formatter-ormolu
lsp-set-formatter-brittany
lsp-set-formatter-floskell
I get a:
(wrong-type-argument json-value-p :ormolu)
,(wrong-type-argument json-value-p :brittany)
, or(wrong-type-argument json-value-p :floskell)
, respectively.Here's a Backtrace from trying
lsp-set-formatter-brittany
:As an experiment, modifying the
lsp-haskell-set-formatter
functions to use strings seems to solve the issue:However, I don't know if this breaks compatibility with prior versions of Emacs.
Edit: Using strings instead of symbols, as shown above, also works on Emacs 26.3.
The text was updated successfully, but these errors were encountered: