-
Notifications
You must be signed in to change notification settings - Fork 12
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
Refactor clangd preferences #196
Refactor clangd preferences #196
Conversation
7d5723f
to
8f87122
Compare
Okay, IMO the refactoring is done. When this LSP4E issue has been merged, I'll apply the I know, it has become a larger PR :-/ |
Does this mean that CDT LSP will depend on a new version of LSP4E being released with that PR? |
Yes. Thats's why I commented out |
Hm, after merging the master into the PR the licence check failed. |
Looks like temp error - I have restarted the check |
BTW the error was:
|
Worked now. |
In my latest commit I added the format-on-save feature again, because the LSP4E PR #783 has been merged. @jonahgraham Does this bring us into trouble, because the cdt-lsp release depends then on the LSP4E snapshot? |
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.
In my latest commit I added the format-on-save feature again, because the LSP4E PR #783 has been merged.
@jonahgraham Does this bring us into trouble, because the cdt-lsp release depends then on the LSP4E snapshot?
Yes :-(
A few items aren't working as expected (but I haven't looked at preferences closely in a while, so some of these may not be new):
- The "Enable project-specific settings" checkbox in the UI is not initialized correctly in the project properties. As you can see in this screenshot the settings say to format, but opening the page it is unchecked:
- The "Configure Workspace Settings" in the project properties goes to the correct preference page, but the tree on the left is incorrect only showing the root node
import org.osgi.service.component.annotations.Reference; | ||
|
||
@Component(property = { "serverDefinitionId:String=org.eclipse.cdt.lsp.server" }) | ||
public class FormatOnSave implements IFormatRegionsProvider { |
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.
With this new class reference we should the MANIFEST entry should be updated to a version that will include it - i.e.:
org.eclipse.lsp4e;bundle-version="0.17.2",
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 made a LSP4E PR to bump the version to 0.17.3. Then we can increase it here to 0.17.3 as well
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.
Unfortunately that means we can't release CDT LSP because it depends on an unreleased LSP4E. We can:
- Not merge this change and do release of 1.0.0 as is
- Remove the format on save changes from this PR, so that we are dependent on 0.17.1 of LSP4E
- Request and wait for LSP4E to release and then add the new version of LSP4E to our p2 site so it can be installed by users
WDYT?
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.
Option 4 is we do a soft/milestone "release" which can depend on snapshot LSP4E
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.
Remove the format on save changes from this PR, so that we are dependent on 0.17.1 of LSP4E
I would prefer this one. I'll put the format-on-save stuff in a new PR.
bundles/org.eclipse.cdt.lsp/src/org/eclipse/cdt/lsp/editor/EditorConfigurationPage.java
Show resolved
Hide resolved
bundles/org.eclipse.cdt.lsp/src/org/eclipse/cdt/lsp/editor/EditorConfigurationPage.java
Outdated
Show resolved
Hide resolved
There is no OSGi service implementation needed in LSP4E. The service should be provided by external bundles.
- separated editor from clangd preferences (needed for eclipse-cdt#178)
since the classes are used in project properties and workspace preferences.
- make lsp.editor classes extendable for clangd
it should be checked in performOk only
to prevent duplicated code
can be (re)added when LSP4E PR eclipse-lsp4e/lsp4e#783 has been merged
because eclipse-lsp4e/lsp4e#783 has been merged
57d214b
to
c01c941
Compare
The restart clangd dialog should be opened when: - The clangd options have been modified or - The user modifies the 'Enable project-specific settings' and the clangd options on project level differ from workspace or - 'Restore Defaults' in project scope should trigger dialog only if the project options differ from workspace.
to 0.17.3
since it depends on not yet released LSP4E dependency.
@jonahgraham Please check the last two commits. I removed the format-on-save stuff and dependency on LSP4E 0.17.3 |
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.
LGTM - once merged I will start release process
PS I will create an endgame issue like eclipse-cdt/cdt#548, and I'll document all the steps I take to try to make sure that others are able to do it in the future. |
@jonahgraham Thank you! |
separated editor from clangd preferences (needed for #178)