-
Notifications
You must be signed in to change notification settings - Fork 56
CPP Languager Server support (clang) #84
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
Conversation
@microsoft-github-policy-service agree |
Thank you so much for all the PRs you have kindly created. At the moment the unit tests are failing. This is due to some external issue in the unit tests, which I have fixed in the latest commit to main branch. Could you please do this for all your PRs? |
@LakshyAAAgrawal I have merged main with my fork. I'm not sure how to trigger unit tests in CI Pipeline. Please let me know if there are further issues I need to look into. Thanks |
Current unit test failure is related to java. I'm not sure if this is observed in main branch
|
.gitignore
Outdated
@@ -403,7 +403,8 @@ src/multilspy/language_servers/omnisharp/static/ | |||
src/multilspy/language_servers/rust_analyzer/static/ | |||
src/multilspy/language_servers/typescript_language_server/static/ | |||
src/multilspy/language_servers/dart_language_server/static/ | |||
src/multilspy/language_servers/clangd_language_server/clangd/ |
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.
I would recommend preserving the naming convention. Everything downloaded at runtime should go under static/
assert len(runtime_dependencies) == 1 | ||
dependency = runtime_dependencies[0] | ||
|
||
clangd_ls_dir = os.path.join(os.path.dirname(__file__), "clangd") |
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.
Same as above. Change name to static. You can create a nested directory under it called clangd if required.
src/multilspy/language_servers/clangd_language_server/clangd_language_server.py
Show resolved
Hide resolved
|
||
async with lsp.start_server(): | ||
# Wait for server to be fully initialized | ||
await lsp.server_ready.wait() |
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.
Ideally, lsp.start_server should wait for server_ready, and within the context manager, the user should directly be able to call into lsp apis.
code_language = Language.CPP | ||
params = { | ||
"code_language": code_language, | ||
"repo_url": "https://github.com/tomorrowCoder/yaml-cpp/", |
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.
Could you link to the original repository directly instead of the fork?
Don't worry about the java failures. There is a lot of flakiness in the java tests. I have rerun the CI. |
Addressed review comments |
Closes #14 |
@tomorrowCoder, I have approved the PR for merging. Let me know if you have any changes you would like to make, otherwise LGTM! |
@tomorrowCoder , thank you very much for your contribution! This has been a long-standing issue of high interest, and I am glad that we finally have a working CPP lang server in multilspy! |
Currently works only for Linux. For windows integration, need to set run time dependencies properly.