Mathias Fussenegger
f52ed6ef5c
Ensure absolute path is used to spawn jshell
...
If for whatever reason `java_exec` returned by the language server is a
relative path, the jshell command would otherwise fail.
2021-08-26 12:12:30 +02:00
Mathias Fussenegger
e04105f551
Include number of debug configurations updated in :JdtRefreshDebugConfigs message
2021-08-11 20:13:59 +02:00
Mathias Fussenegger
3ee8b8d1d7
Avoid unnecessary deepcopy in setup_dap_main_class_configs
2021-08-10 20:37:50 +02:00
Mathias Fussenegger
1f5c53ac70
Ensure test_* methods print nice error when used in non-test-file
2021-08-10 20:36:03 +02:00
Mathias Fussenegger
ea7f4ee85a
Add support for new vscode-java-test API
...
https://github.com/microsoft/vscode-java-test/pull/1257
2021-08-09 23:24:07 +02:00
Mathias Fussenegger
2a9e67310b
Fix error in implicit save on empty buffer
...
If you open up neovim and run `:set ft=java` there is no file name
Fixes https://github.com/mfussenegger/nvim-jdtls/issues/109
2021-08-06 12:51:21 +02:00
Mathias Fussenegger
a0c6b2756f
Add bug and feature issue templates
2021-07-31 13:54:19 +02:00
Mathias Fussenegger
e5ed033f61
Fix error handling in jdt uri BufReadCmd
2021-07-27 21:16:02 +02:00
Mathias Fussenegger
ad407c97de
Give feedback on :JdtRefreshDebugConfigs
2021-07-27 21:16:02 +02:00
Mathias Fussenegger
391e55bb5f
Always add range to junit request args for methods
...
Had a case where the debug adapter returned an error because `start` was
missing.
2021-07-12 20:33:31 +02:00
Mathias Fussenegger
846187eef8
Remove warning and neovim/nightly requirement from readme
...
Neovim 0.5 got released
2021-07-02 20:01:46 +02:00
Mathias Fussenegger
018b013d5e
Make some small tweaks to install instructions
2021-06-29 20:04:55 +02:00
Mathias Fussenegger
a26e1818fa
Implicitly save files before attaching lsp client
...
If the lsp client is attached, jdtls struggles and cannot provide
completions or other functionalities.
This change causes `start_or_attach` to first save the file on disk
before starting the client or attaching the buffer to an existing
client.
2021-06-15 21:11:00 +02:00
Mathias Fussenegger
fc24156adc
Lazy load dap.repl in junit module
...
Helps with my dap-reload script during development of nvim-dap
2021-06-14 19:32:02 +02:00
tobias.voelzel
d2fab873d1
Set classpath for JShell as env variable
...
This allows to use it for tab completion
2021-06-11 10:30:58 +02:00
tobias.voelzel
54a49fca8b
Allow digits and underscores for package names
2021-06-11 10:30:11 +02:00
Mathias Fussenegger
89fdc14457
Mention other eclipse.jdt.ls installation options in readme
2021-06-06 21:16:25 +02:00
Mathias Fussenegger
8bd4eac08c
Implicitly patch on_init to send a didChangeConfiguration
notification
...
Until https://github.com/neovim/neovim/pull/13659 gets merged
2021-06-03 12:09:08 +02:00
Mathias Fussenegger
f39758c426
Don't require projectName for dap configs
...
The proejctName is only requires for multi module projects.
2021-05-25 20:09:04 +02:00
Marc Jakobi
3c5d3b209a
Fix error due to possible nil value.
2021-05-25 09:50:34 +02:00
Mathias Fussenegger
77a04895ce
Ensure open_jdt_link works with bufhidden=unload
...
If bufhidden is set to unload instead of hide, navigating to a `jdt://`
uri, then away and back again triggers `open_jdt_link` again and then it
needs to be able to write to the same buffer.
Fixes https://github.com/mfussenegger/nvim-jdtls/issues/86
2021-05-22 18:54:38 +02:00
Mathias Fussenegger
36baba2afb
Extract dap.configurations.java setup into separate functions
...
Based on the discussion in https://github.com/mfussenegger/nvim-jdtls/pull/82
This adds two new functions in the `jdtls.dap` module:
- `setup_dap_main_class_configs` which extends `dap.configurations.java`
- `fetch_main_configs` which takes a callback which receives all
configurations for the discovered main classes. This allows users to
customize how to use them or post-process them.
`setup_dap` no longer implicitly extends `dap.configuration.java` but
instead only configures the adapter.
2021-05-21 11:23:28 +02:00
Mathias Fussenegger
7cee62b302
Add JdtCompile argument completion/change arg to full/incremental
...
Something must have changed in eclipse.jdt.ls: Using a `'true'`
value as argument to `java/buildWorkspace` no longer triggered full
compilation.
This uses this as an opportunity to change the argument to `full` or
`incremental` and to add completion for the two options.
2021-05-19 18:37:40 +02:00
Mathias Fussenegger
cfed968585
Support hotcode replacement via nvim-dap
...
Calling `setup_dap` with `{ hotcodereplace = 'auto' }` will enable
hotcode reloading during an active debugging session.
There are some limitations - for example, the current active stackframe
cannot be modified.
Requires https://github.com/mfussenegger/nvim-dap/pull/179
2021-05-19 18:01:14 +02:00
Mathias Fussenegger
6fa8c5a945
Add extract_constant to README
2021-05-04 23:06:55 +02:00
Mathias Fussenegger
f803dfcf93
Add a extract_constant
function
2021-05-04 20:11:44 +02:00
Mathias Fussenegger
cc25a46a6b
Ensure jshell, javap and jol functions work in test files
...
Need to set the scope to `test` when retrieving the classpaths if the
file is in the test sources.
2021-05-02 15:38:47 +02:00
Mathias Fussenegger
6fc24a090e
Add support for codeAction/resolve
2021-04-29 19:12:42 +02:00
Mathias Fussenegger
f449589f6c
Fix restart command
2021-04-28 18:08:30 +02:00
Mathias Fussenegger
9108e64613
Don't include other lsp clients diagnostics on JdtCompile
...
Only java diagnostics should be reported.
2021-04-26 20:06:25 +02:00
Mathias Fussenegger
362a149dac
Ensure classpath for tests can handle gradle java-test-fixtures setups
2021-04-21 19:25:29 +02:00
Mathias Fussenegger
76c4972f6e
Shorten name in dap config for test runs
2021-04-16 18:05:22 +02:00
Mathias Fussenegger
b3e268d78a
Revert "Add workaround for buffer ... newer than edits
"
...
Neovim now accepts version 0 in text document edits.
See https://github.com/neovim/neovim/pull/14366
This reverts commit ca5154f57d
.
2021-04-15 17:21:17 +02:00
Mathias Fussenegger
e16fb1b961
Add a JdtRestart
command to restart jdtls
2021-04-14 20:29:24 +02:00
Mathias Fussenegger
f32ed9352b
Ignore client shutdown in progress report
2021-04-14 19:31:25 +02:00
Mathias Fussenegger
132c8f2e3b
Add progress report handler
...
This uses the `client.messages.progress` table to add progress
notifications.
For a user to see these progress reports it is additionally necessary to
poll the messages using `vim.lsp.util.get_progress_messages()`.
2021-04-14 19:20:38 +02:00
Mathias Fussenegger
20dc366d45
Remove test run notification
...
`nvim-dap` does this now by itself
2021-04-13 19:22:21 +02:00
Mathias Fussenegger
4ebad2d52b
Check only for classFileContentsSupport when resolving client to open jdt uri
2021-03-28 16:11:48 +02:00
Mathias Fussenegger
a6c49828db
Remove viml indirection to open jdt uri's
...
Can call the lua function directly
2021-03-27 18:49:44 +01:00
Mathias Fussenegger
7a4049b3d0
Add a timeout setting for opening jdt uris and increase default
...
Should close https://github.com/mfussenegger/nvim-jdtls/issues/56
The timeout can be changed like this:
require('jdtls').settings.jdt_uri_timeout_ms = 10000
2021-03-27 11:53:28 +01:00
Mathias Fussenegger
b29410eff3
Add basic support for testng execution
...
Doesn't have the same kind of error reporting and quicklist integration
as junit does, but instead the output is printed to the
console/terminal.
2021-03-24 22:59:56 +01:00
Mathias Fussenegger
fede58fdb6
Re-use lsp.util.get_effective_tabstop
2021-03-22 20:58:14 +01:00
Mathias Fussenegger
ca5154f57d
Add workaround for buffer ... newer than edits
...
Workaround for https://github.com/eclipse/eclipse.jdt.ls/issues/1695
2021-03-22 18:05:36 +01:00
Mathias Fussenegger
c4199f88d5
Add github action workflow for linting
2021-03-20 14:08:57 +01:00
Mathias Fussenegger
666d7413eb
Add support for move refactorings
2021-03-19 12:11:37 +01:00
Mathias Fussenegger
49f06eb6e8
Don't use inferSelection for visual selection refactoring
...
This should get extract_method working again with selections
Closes https://github.com/mfussenegger/nvim-jdtls/issues/47
2021-03-19 12:01:11 +01:00
Mathias Fussenegger
87af61eccf
Add an option to run tests repeatedly until error or limit
...
:lua require('jdtls').test_nearest_method { until_error = 10 }
2021-03-17 15:45:01 +01:00
Mathias Fussenegger
d3de714fe5
Make some low-level test utils accessible
2021-03-16 21:57:48 +01:00
Mathias Fussenegger
3730416202
Add a pick_test
method that prompts which test to run
2021-03-16 21:49:20 +01:00
Mathias Fussenegger
5d6050de2d
Add a opts
argument to test methods to allow config override
...
For example, to use the dap-repl for output instead of the terminal:
test_nearest_method({ config = { console = 'console' }})
2021-03-16 21:48:16 +01:00