Skip to content

Conversation

remcohaszing
Copy link
Member

Initial checklist

  • I read the support docs
  • I read the contributing guide
  • I agree to follow the code of conduct
  • I searched issues and couldn’t find anything (or linked relevant results below)
  • If applicable, I’ve added docs and tests

Description of changes

Without this fix, the error Unhandled method client/registerCapability is thrown when this server is started using vscode-remark.

The fix was to move connection.workspace.onDidChangeWorkspaceFolders() into connection.onInitialized(). The initialize result is now also dynamic based on the reported server capabilities. This setup is based on https://code.visualstudio.com/api/language-extensions/language-server-extension-guide#explaining-the-language-server.

Without this fix, the error `Unhandled method client/registerCapability`
is thrown when this server is started using `vscode-remark`.

The fix was to move `connection.workspace.onDidChangeWorkspaceFolders()`
into `connection.onInitialized()`. The initialize result is now also
dynamic based on the reported server capabilities. This setup is based on
https://code.visualstudio.com/api/language-extensions/language-server-extension-guide#explaining-the-language-server
@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Jan 23, 2022
@remcohaszing remcohaszing added 🐛 type/bug This is a problem 👶 semver/patch This is a backwards-compatible fix and removed 🤞 phase/open Post is being triaged manually labels Jan 23, 2022
@github-actions

This comment has been minimized.

@remcohaszing remcohaszing added the 🤞 phase/open Post is being triaged manually label Jan 23, 2022
@codecov-commenter

This comment has been minimized.

@remcohaszing
Copy link
Member Author

The CI failure seems to be unrelated 🤔

@wooorm
Copy link
Member

wooorm commented Jan 23, 2022

I noticed a windows error on xdm earlier today that is the same as what I see here. I don’t think it’s related either, no clue why it happens or what can solve it, it seems like a gitHub thing

@remcohaszing
Copy link
Member Author

I hate to say it, but it works on my machine!

Should I just increase the delays?

@wooorm
Copy link
Member

wooorm commented Jan 24, 2022

@remcohaszing yup, this seems to work

@wooorm
Copy link
Member

wooorm commented Jan 24, 2022

It remains that Windows fails on CI. I’m guessing it’s a GH Actions + Windows problem?

@wooorm wooorm merged commit 723ceba into unifiedjs:main Jan 24, 2022
@github-actions

This comment has been minimized.

@wooorm wooorm added the 💪 phase/solved Post is done label Jan 24, 2022
@github-actions github-actions bot removed the 🤞 phase/open Post is being triaged manually label Jan 24, 2022
@wooorm
Copy link
Member

wooorm commented Jan 24, 2022

@remcohaszing Are you planning on doing more work in this project? If so, I can delay a release and batch updates together.

@remcohaszing
Copy link
Member Author

This change is really important in order to fix remarkjs/vscode-remark#65, but I can fix #26 first (probably later today) as it’s pretty straightforward.

The other open issues are more meta issues that don’t require a release.

@remcohaszing remcohaszing deleted the fix-workspace-initialization branch August 6, 2022 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 phase/solved Post is done 👶 semver/patch This is a backwards-compatible fix 🐛 type/bug This is a problem
Development

Successfully merging this pull request may close these issues.

4 participants