Skip to content
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

Dynamically register/unregister client capability #67

Merged
merged 6 commits into from
May 9, 2019

Conversation

danixeee
Copy link
Contributor

@danixeee danixeee commented May 6, 2019

Description (e.g. "Related to ...", etc.)

Closes #58.
Closes #68.

This PR also closes #68 because I had to fix some field names from protocol specification when working on (#58).

Code review checklist (for code reviewer to complete)

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR)
  • Title summarizes what is changing
  • Commit messages are meaningful (see this for details)
  • Tests have been included and/or updated, as appropriate
  • Docstrings have been included and/or updated, as appropriate
  • Standalone docs have been updated accordingly
  • CONTRIBUTORS.md was updated, as appropriate
  • Changelog has been updated, as needed (see CHANGELOG.md)

@danixeee danixeee added the enhancement New feature or request label May 6, 2019
@danixeee danixeee requested a review from renatav May 6, 2019 12:23
@danixeee danixeee self-assigned this May 6, 2019
@danixeee danixeee force-pushed the danixeee/update-lsp-features-and-types branch from 0c611e9 to bce7e48 Compare May 6, 2019 12:23
Copy link
Contributor

@renatav renatav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell, this looks good. Please take a look at the few comments.
Also, this is written in the description of the issue "This PR also updates features.py and types.py to support the current LSP specification." This seems like it should be a part of the PR's description.

@@ -593,7 +612,7 @@ def bf_workspace__execute_command(self,
cmd_handler = self.fm.commands[params.command]
self._execute_request(msg_id, cmd_handler, params.arguments)

def get_configuration(self, params, callback=None):
def get_configuration(self, params, callback):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove the default value of callback here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_configuration is supposed to return a value. That value is passed as an argument to the callback function when result is returned from the client. In other words, there is no reason to call this function without doing something with returned value.

@@ -1270,8 +1282,8 @@ def __init__(self, id: str, method: str):


class UnregistrationParams:
def __init__(self, unregistrations: List[Unregistration]):
self.unregistration = unregistrations
def __init__(self, unregisterations: List[Unregistration]):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed unregistrations to unregisterations. Was this accidental?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was really hard to find why it wasn't working and the reason was that specification says "unregisterations" (!?) :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That must've been frustrating.

@@ -687,6 +687,18 @@ def __init__(self, uri: str, range: 'Range'):
self.range = range


class LocationLink:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this and other changes made in order to support the current LSP specification be mentioned in the changelog?

@danixeee
Copy link
Contributor Author

danixeee commented May 8, 2019

I have created another issue which will be closed with this PR as well and updated the CHANGELOG.
I won't merge this PR until I test it on Codify.

@danixeee danixeee added the DON'T MERGE Do not merge this PR to master label May 8, 2019
@renatav renatav removed the DON'T MERGE Do not merge this PR to master label May 9, 2019
Copy link
Contributor

@renatav renatav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@renatav renatav merged commit dee06cd into master May 9, 2019
@renatav renatav deleted the danixeee/update-lsp-features-and-types branch May 9, 2019 14:54
@Bobronium Bobronium mentioned this pull request May 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update language server protocol to v3.14.0 Dynamically register/unregister client capability
2 participants