Skip to content

Jump to definition in java libraries #375

Answered by ckipp01
antosha417 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @antosha417! Yes, this should totally work. Is this some methods in a Scala file, or are you actually in a Java file? If you're in a Java file and looking for some navigation you'll want to make sure you have java in the filetype autocmd that starts Metals. Like:

  api.nvim_create_autocmd("FileType", {
    pattern = { "scala", "sbt", "java" },
    callback = function()
      require("metals").initialize_or_attach(metals_config)
    end,
    group = nvim_metals_group,
  })

Do you have that? Also, could you take a look at the :MetalsRunDoctor? Do you see anything funky in there?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@antosha417
Comment options

Answer selected by antosha417
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants