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

Support nested closure completions #1337

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

gayanper
Copy link
Contributor

Today the plugin only sees the root level extensions and their methods, But if such method supports closure which contains a type, completions are not supported for such closures.

This change tries to find such methods and expand closure collection based on those closure types which could be for example a extension.

Good example of a code snippet to tryout this change is spotless plugin configuration as below

spotless {
    json {
    }
    java {
    }
}

if you try to invoke completions inside json closure, you don't get any and if you try to do the same inside java you endup with config values for standard java plugin.

When this change is applied, the correct configuration values are shown from the relevant spotless extension.

Note: method chaining is still not working which needs to be separately add support.

@gayanper
Copy link
Contributor Author

@jdneo @testforstephen Let me know what you think

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.

1 participant