You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both these are ran using nvim-dap & test discovery is done by communicating to jdtls language server.
However, I would like to have an adapter so I can get all the neotest features come with it. However, I don't really understand how to do asynchronous stuff from the given adapter interface. I can see that you have the @async annotation in each method, however, there is no callback function passed to any APIs.
So I would like to get help on
doing async stuff
For instance, there is a language sever command for checking if the given file is a test or not in jdtls. It's java.project.isTestFile. However calling this has to be done asynchronously. So my adapter function should look like this with a callback function. But looking at the interface there is not? So how should this be handled?
adapter.is_test_file=function(file_path, callback)
jdtls.executeCommand({
command='java.project.isTestFile',
arguments= { uri },
}, function(err, is_test_file)
assert(err, 'could not check the file')
callback(is_test_file)
end)
end
What should build_spec return? Is it a dap laucher config?
The text was updated successfully, but these errors were encountered:
Discussed in #322
Originally posted by s1n7ax November 19, 2023
I'm working on https://github.com/nvim-java/nvim-java. So far, I have created only two APIs to run tests.
run_current_test_class
debug_current_test_class
Both these are ran using
nvim-dap
& test discovery is done by communicating tojdtls
language server.However, I would like to have an adapter so I can get all the neotest features come with it. However, I don't really understand how to do asynchronous stuff from the given adapter interface. I can see that you have the
@async
annotation in each method, however, there is no callback function passed to any APIs.So I would like to get help on
For instance, there is a language sever command for checking if the given file is a test or not in jdtls. It's
java.project.isTestFile
. However calling this has to be done asynchronously. So my adapter function should look like this with a callback function. But looking at the interface there is not? So how should this be handled?build_spec
return? Is it a dap laucher config?The text was updated successfully, but these errors were encountered: