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 java types: class and record fields, enum constants #199

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

mikehaertl
Copy link
Contributor

#198

Class

Before:

package com;

public class DemoClass {

    public String demo;
}

After:

package com;

public class DemoClass {

    /**
     * [TODO:description]
     */
    public String demo;
}

Record

Before:

package com;

public record DemoRecord(
    String var1,
    String var2
) {}

After:

package com;

public record DemoRecord(
    /**
     * [TODO:description]
     */
    String var1,
    String var2
) {}

Enum

Before:

package com;

public enum DemoEnum {
    CONST1,
    CONST2
}

After:

package com;

public enum DemoEnum {
    /**
     * [TODO:description]
     */
    CONST1,
    CONST2
}

@mikehaertl
Copy link
Contributor Author

@danymat I tried to run the test locally - but that didn't work well as it seems to use my local neovim config. It's missing some languages in treesitter and there's also a problem with my custom setup for the java LSP (nvim-jdtls).

Not sure if this could be improved somehow to make it independent of local config.

@mikehaertl
Copy link
Contributor Author

@danymat Can we do anything to get this finally merged?

@mikehaertl
Copy link
Contributor Author

@danymat Sorry to bug you again on this but this change would really fix a big annoyance for me. So you think you could just merge this?

I don't think the failing test has any meaning here. The fix would work fine.

@danymat danymat merged commit e3b8f6d into danymat:main Nov 12, 2024
1 of 4 checks passed
@danymat
Copy link
Owner

danymat commented Nov 12, 2024

Hey, sorry for the delay here
Just saw the feature and merged :)

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.

2 participants