Skip to content

problems with lombok #115

Closed
Closed
@AntDavidLima

Description

@AntDavidLima

Hi, I am having problems getting Lombok to work on nvim-basic-ide.

I installed jdtls using Mason and added it to the server's table. When I open a project that has lombok on it, it recognizes the lombok anotations and even gives me autocompletion and spelling errors, but when I try to use autogenerated methods, such as @Getter, @Setter, and @AllArgsConstructor, on another class, it says that those methods do not exist, and on the class that has these anotations, it gives me warnings saying that the properties are not been used.

I got it to work when I uninstalled jdtls from the Mason UI, installed it on my system using jdtls-launcher and added the following settings to jdtls:

return {  
  cmd = { "jdtls" },
  root_dir = function(fname)
    return require'lspconfig'.util.root_pattern('pom.xml', 'gradle.build', '.git')(fname) or vim.fn.getcwd()  
  end
}

But every time I open NeoVIM, Mason automatically starts installing jdtls again, and when it finishes installing, Lombok stops working.

It happens even when I remove jdtls from the ensure_installed table in mason-lspconfig settings.

I tried to use nvim-jdtls for this server instead of lspconfig, and it stopped automatically installing jdtls via Mason when I started NeoVIM, but Lombok stopped working too.

Does anyone know how to stop this behavior from lspconfig? or have another possible solution?

Thanks for the help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions