-
Notifications
You must be signed in to change notification settings - Fork 393
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
we can look up the definition, but not the reference #2498
Comments
We do support |
Hello, I too experience this issue. However, I can search for references within my own source code, but not that of 3rd part libraries (.jar files). Here is an example showing that 2024-03-02.21-18-56.mp4I use Neovim with the Astronvim config. Here is my customized config for jdtls: jdtls = function()
-- use this function notation to build some variables
local root_markers = { ".git", "mvnw", "gradlew", "pom.xml", "build.gradle" }
local root_dir = require("jdtls.setup").find_root(root_markers)
-- calculate workspace dir
local project_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":p:h:t")
local workspace_dir = vim.fn.stdpath "data" .. "/site/java/workspace-root/" .. project_name
os.execute("mkdir " .. workspace_dir)
-- get the mason install path
local install_path = require("mason-registry").get_package("jdtls"):get_install_path()
-- get the current OS
local os
if vim.fn.has "macunix" then
os = "mac"
elseif vim.fn.has "win32" then
os = "win"
else
os = "linux"
end
-- return the server config
return {
cmd = {
"java",
"-Declipse.application=org.eclipse.jdt.ls.core.id1",
"-Dosgi.bundles.defaultStartLevel=4",
"-Declipse.product=org.eclipse.jdt.ls.core.product",
"-Dlog.protocol=true",
"-Dlog.level=ALL",
"-javaagent:" .. install_path .. "/lombok.jar",
"-Xms1g",
"--add-modules=ALL-SYSTEM",
"--add-opens",
"java.base/java.util=ALL-UNNAMED",
"--add-opens",
"java.base/java.lang=ALL-UNNAMED",
"-jar",
vim.fn.glob(install_path .. "/plugins/org.eclipse.equinox.launcher_*.jar"),
"-configuration",
install_path .. "/config_" .. os,
"-data",
workspace_dir,
},
init_options = {
extendedClientCapabilities = {
classFileContentsSupport = true
},
},
root_dir = root_dir,
}
end Any ideas on why this happens or how to fix it? |
@a342108611 have you been able to fix this? |
EDIT: My issue turned out to be that my Old comment:
With just these two files, I find all methods and fields in the declarations of Person.java. The greyed out argument names in Main.java are just virtual text from intellisense in my editor, not actually in the file. In the log below, the
|
We adopted a python client implementation, but found that we could look up the definition but could not find the reference, the same code, we tested the GO language and python language can be found, excuse me, is this a known problem? How can it be fixed?Thank you
The text was updated successfully, but these errors were encountered: