neogen icon indicating copy to clipboard operation
neogen copied to clipboard

Support java types: class and record fields, enum constants

Open mikehaertl opened this issue 1 year ago • 1 comments

#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 avatar Aug 28 '24 18:08 mikehaertl

@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 avatar Aug 29 '24 07:08 mikehaertl

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

mikehaertl avatar Oct 23 '24 09:10 mikehaertl

@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.

mikehaertl avatar Nov 12 '24 13:11 mikehaertl

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

danymat avatar Nov 12 '24 18:11 danymat