Skip to content

Rework customization to use lsp-mode's functionality #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 18, 2020

Conversation

michaelpj
Copy link
Collaborator

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.

Fixes #69, #75, #78; supersedes the (excellent) #74 and #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.

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.

Fixes emacs-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.
@alanz alanz merged commit 485427a into emacs-lsp:master Sep 18, 2020
@shaunplee
Copy link

@michaelpj Thank you for the kind word. I'm glad these issues got addressed and merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable hlint on multi projects by default
3 participants