puppetlabs / puppet-editor-services

Puppet Language Server for editors
Apache License 2.0
45 stars 21 forks source link

CAT-1670 - Fix onTypeFormatting due to undefined variable json_rpc_handler #376

Closed jordanbreen28 closed 2 months ago

jordanbreen28 commented 2 months ago

Summary

Prior to this PR, we would see in the language server logs that we were referencing an undefined variable json_rpc_handler.

This had knock on effects, such as registering the onTypeformatting provider, meaning this setting would not work when enabled.

We now update the json_rpc_handler send message event to be consistent with the rest of the language server, and to fix the undefined variable error.

The dynamically registered providers, like onTypeFormatting, will now work as expected.

Additional Context

Add any additional context about the problem here.

Related Issues (if any)

Indirectly fixes https://github.com/puppetlabs/puppet-editor-services/issues/203

Checklist

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 11.69%. Comparing base (f36499a) to head (2126f5e).

Files Patch % Lines
lib/puppet-languageserver/message_handler.rb 0.00% 6 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #376 +/- ## ========================================== - Coverage 11.69% 11.69% -0.01% ========================================== Files 92 92 Lines 11501 11504 +3 ========================================== Hits 1345 1345 - Misses 10156 10159 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.