-
-
Notifications
You must be signed in to change notification settings - Fork 889
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
Implemented multiple folders support #409
Conversation
d19f740
to
3a05ce4
Compare
Thanks for the PR! Unfortunately, I've been a little busy with real life, so it might take some time before I get to review this PR. |
@vibhavp sure, I will extend the PR description with more information on how it is going to work to help you with the reviewing. |
3a05ce4
to
e8690aa
Compare
Updated the fix - added some more explanation in the commit description. Fixed corner cases related to deletion of the last element. I have also renamed the function |
@vibhavp did you had a chance to take a look? |
Fixes emacs-lsp#345 * Changed the startup code of the lsp-workspace. Now it will check whether there is file in the workspace root which contains workspace folders. If there is such file it will be used as a source for workspace folders. If there is no such file it will work as before that change. * Added methods for adding/removing folders * Tested with JDT server which seems to be the only server supporting the feature. * Verified that client which does not support workspace folders work as expected(verfied with lsp-python)
871a640
to
c7c0f3c
Compare
Rebased onto master and removed formatting changes to avoid constant merging. |
;; language extension to keep backward compatibility with `lsp-java' | ||
workspace-folders (append | ||
(lsp--read-from-file | ||
(concat (file-name-as-directory root) ".folders")) |
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.
Is it conventional to use $root/.folders
?
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 am open to alternative suggestions.
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.
@yyoncho You might think I can merge PRs in this repo but I can't.. The most I can give you is an approval..
Is #356 superseded by this PR? You may also ask @samrayleung to review I don't know/write much elisp... |
To be honest, so do I.... |
I have an question, does this PR add a feature that user can get lsp-mode works without |
@stardiviner no. Can you share which languages do you want to use in org-mode buffers? |
@yyoncho lsp-python and lsp-php and lsp-java. |
@stardiviner do you know that should be done on |
Org Mode seems can't implement this. The answers does not work in this case. The first selected answer use If Sorry for distribution. |
@stardiviner I believe that it can work by providing session properties, but I need working example to start with and I can provide a sample which works with LSP mode. |
For C/C++ lsp-mode users who want to try out this PR, I have implemented workspace folders in ccls in the weekend. I'm down for this PR as long as there is still some way to enable automatic root detection which is convenient for browsing random new projects. |
@MaskRay can you elaborate? This CL does not break the current behaviour(ability to browse random new projects), it only adds an option to call add/remove folders for a particular workspace. |
This issue is PITA for |
LGTM, Apologies for the late review. Thanks! |
Fixes #345
feature.
expected(verfied with lsp-python)