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

monaco-languageclient config improvement, wrapper+languageclientwrapper improvements #741

Merged
merged 7 commits into from
Sep 23, 2024

Conversation

kaisalmen
Copy link
Collaborator

@kaisalmen kaisalmen commented Sep 5, 2024

Changes:

  • MonacoLanguageClient:
    • The MessageTransports are configured directly. This makes handling them easier in an application context or with LanguageClientWrapper
    • Extend ConnetionConfigOptions
    • Improve Type names
  • MonacoEditorLanguageClientWrapper
    • Allow to configure and use multiple language clients (implements Allow to configure more than one languageclient #677)
    • UserConfig is now WrapperConfig and is one level less deep.
    • LanguageClientWrapper:
      • You can now pass an initialized web socket to LanguageClientWrapper. Internal handling of the message transports has been improved.
      • Restart options are now integrated directly.
      • Adjust language client configuration structure and naming

TODO:

  • Further improve type names
  • Finish wrapper advanced example. Rename and allow to switch between python/json

@kaisalmen
Copy link
Collaborator Author

@CGNonofr some TODOs left, but generally the changes look good, some awkward behaviour of vitest browser mode: https://github.com/TypeFox/monaco-languageclient/blob/wrapper-improvements/packages/wrapper/test/languageClientWrapper.test.ts#L71-L79
but the WA works, it never finishes once I put an await there. No problem when doing it manually in the exmaples. 🤷‍♂️

@kaisalmen kaisalmen changed the title WIP: MonacoEditorLanguageClientWrapper and LanguageClientWrapper improvements MonacoEditorLanguageClientWrapper and LanguageClientWrapper improvements Sep 5, 2024
- UserConfig is now WrapperConfig and one level less deep
- Language client config has better names and is structured more logically
- Introduce new two_langauge_clients.html example replacing wrapper_adv.html
@kaisalmen kaisalmen marked this pull request as ready for review September 5, 2024 19:26
@kaisalmen
Copy link
Collaborator Author

@CGNonofr I may add more unit test, but feel free to review the changes.

@kaisalmen kaisalmen changed the title MonacoEditorLanguageClientWrapper and LanguageClientWrapper improvements monaco-languageclient config improvement, wrapper+languageclientwrapper improvements Sep 5, 2024
@kaisalmen
Copy link
Collaborator Author

@CGNonofr any thoughts? I was not very active the last two weeks. This will change again next week.

Copy link
Collaborator

@CGNonofr CGNonofr left a comment

Choose a reason for hiding this comment

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

I admit I'm getting a bit lost in those libraries 😕

packages/wrapper/src/languageClientWrapper.ts Outdated Show resolved Hide resolved
packages/client/src/commonTypes.ts Outdated Show resolved Hide resolved
packages/client/src/commonTypes.ts Show resolved Hide resolved
packages/wrapper/src/wrapper.ts Outdated Show resolved Hide resolved
packages/wrapper/src/wrapper.ts Outdated Show resolved Hide resolved
packages/wrapper/src/wrapper.ts Outdated Show resolved Hide resolved
@kaisalmen
Copy link
Collaborator Author

kaisalmen commented Sep 23, 2024

I admit I'm getting a bit lost in those libraries 😕

Feel being me, when looking at vast changes in monaco-vscode-api. 😆

@kaisalmen
Copy link
Collaborator Author

This is ready from my side. I am already working on further improvements. WIP PR will come later and probably some questions, too.

@kaisalmen
Copy link
Collaborator Author

And another PR with update to mva 9.0.x

Copy link
Collaborator

@CGNonofr CGNonofr left a comment

Choose a reason for hiding this comment

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

LGTM

@kaisalmen kaisalmen merged commit 58edc4b into main Sep 23, 2024
2 checks passed
@kaisalmen kaisalmen deleted the wrapper-improvements branch September 23, 2024 09:48
@ZWQ652
Copy link

ZWQ652 commented Oct 21, 2024

@CGNonofr I may add more unit test, but feel free to review the changes.我可能会添加更多的单元测试,但请随时检查更改。

Hello, I would like to add a 'typescript-language-server' example. Because I encountered an issue where I couldn't parse the workspace context while trying to use version 8.8.2, I would like to request a simple example to implement a language service for a JS project. thank you.

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.

3 participants