-
Notifications
You must be signed in to change notification settings - Fork 21
(GH-177) Add auto-align hash rocket feature #186
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Previously capability registrations were assumed to only have one possible reqeuest per method however this isn't true. Also the request ID is needed in order to unregister a capability. This commit; * Modifies the Language Client to track registrations that are in progress and have completed * Now processes error messages so that registration tracking can fail tracked registrations * Adds tests for these scenarios
…ient Previously the message router was passed in as a method parameter however as almost all methods require the message router, this commit changes the initializer to pass in the message router at object create time.
Previously client capabilities could be dynamically registered. This commit adds the logic and track to dynamically unregister a capability; * Adds the unregister_capability and parse_unregister_capability_response! methods * Adds the client/unregisterCapability notification handler * Adds tests for unregistering
Previously the settings were passed directly from the response into the client for processing however this does not emulate the legacy settings hash. This commit adds the original scope onto the settings hash so it appears like the legacy hash e.g. puppet.editorservices.abc instead of editorserivces.abc
While technically the protocol does allow the server to send window/showMessage notifcations during initialization, it's better to send the warning at the end of initialization i.e. at the initialized notification.
Now that the Language Client can process client settings, and dynamic registrations it is now possible to setup the server to register to receive the onTypeFormatting request. This commit: * Responds to the 'puppet.editorService.formatOnType.enable' client setting * Dynamically registers the provider if dynamic registration is possible otherwise uses static registration * Adds a format_on_type method on the Language Client to track whether this feature is enabled * Adds dummy response to the `textDocument/onTypeFormatting` request * Adds tests for the client interacting with the settings
Previously the onTypeFormatting provider was created and responds to client settings, turning it on and off appropriately. This commit actually adds the on type formatter: * Only for puppet manifests (.pp) * Uses puppet-lint lexer to tokenise the document and uses the tokens to determine indenting * Will not operate if the document is over 4KB in size or the client is using tabs instead of spaces * Adds tests for the formatting
6 tasks
jpogran
approved these changes
Sep 18, 2019
Contributor
jpogran
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Paired with @glennsarti and we reviewed code
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Builds on #185
Fixes #177
Previously the onTypeFormatting provider was created and responds to client
settings, turning it on and off appropriately. This commit actually adds the
on type formatter:
determine indenting
tabs instead of spaces