Repository navigation
Conversation
Contributor
|
The initial target branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
enabledWhendoesn't have editor input, fie, document or any kind of input context for evaluation. It is used inContentTypeToLanguageServerDefinition#isEnabled()calls. These calls are made also from content type -> LS preference page which is independent of any input context.I'm curious if it is worth making a similar
enabledInputWhentester able to take input context such asIDocument,IEditorInput,IFileetc. Therefore whenever there is input available we'd pass it over to ContentTypeToLanguageServerDefinition#isEnabledFor(Object input)rather thanisEnabled()`. The PR adds implementation for this.The goal i have in mind is start Boot LS for a workspace that has at least one java project with spring boot on the classpath. Shut down Boot LS if there are no more Spring Boot projects left in the workspace. Now if Boot LS is shut down and user opens a Java file (or any other boot related content-type files) in an editor I wouldn't want to start Boot LS for a file that does not belong to a Spring Boot project. Hence, the
enabledInputWhenwould help in this case.What do you think? Do you see any issues/obstacles achieving the goal above with the proposed PR?
Thanks in advance for feedback on this topic!!!