Commit graph

276 commits

Author SHA1 Message Date
Mathias Fussenegger
9fcc9495b5 Handle launch-args response format change in vscode-java-test
The `launch_args` table is wrapped in a `body` property since:

5a78371ad6

Fixes https://github.com/mfussenegger/nvim-jdtls/issues/436
2023-03-10 15:14:29 +01:00
shae
db08bfb873 Fix typo in the quickstart-config gradle root detection 2023-02-28 20:19:37 +01:00
Mathias Fussenegger
8fe3be1c08 Add on_ready callback option to setup_dap_main_class_configs 2023-02-09 17:19:01 +01:00
Abhishek Banerji
1f640d14d1
Show nested test candidates in jdtls.dap.pick_test (#413)
Co-authored-by: Abhishek Banerji <abhishek.banerji@kloudspot.com>
2023-02-02 07:36:49 +01:00
dundargoc
beb9101fb4 Fix typos 2023-01-20 07:08:45 +01:00
Mathias Fussenegger
0a9c88dc0e Set buflisted for jshell buffer 2023-01-18 16:53:38 +01:00
Mathias Fussenegger
e64f05e950 Handle @Nested junit5 test cases in test_nearest_method
Closes https://github.com/mfussenegger/nvim-jdtls/issues/401
2023-01-04 14:32:29 +01:00
Mathias Fussenegger
a5c6f38f81 Add a extract_variable_all function for the corresponding code action 2022-12-22 14:08:47 +01:00
Mathias Fussenegger
2773a6b2f6 Use client.commands or global commands in workspace/executeClientCommand
Other neovim plugins may define other custom client commands that
eclipse.jdt.ls could invoke via workspace/executeClientCommand

A completion plugin like lsp_compl may for example define
`editor.action.triggerSuggest` or `editor.action.triggerParameterHints`
commands
2022-12-17 10:53:28 +01:00
Mathias Fussenegger
69ad133ef7 Replace context arg in JdtTestOpts to bufnr/lnum 2022-12-14 17:51:15 +01:00
Mathias Fussenegger
efacec1c97 Add context param to dap test methods
Allows to set the buffer/window for which to trigger a test
2022-12-14 17:51:15 +01:00
Mathias Fussenegger
efefcdc108 Remove progress report capability
eclipse.jdt.ls 1.18.0 has a working `$/progress` implementation. A
dedicated capability and handler is no longer required.
2022-12-13 22:42:42 +01:00
Mathias Fussenegger
f5a602a1f6 Regenerate API docs with recent lemmy-help 2022-12-13 20:16:32 +01:00
Mathias Fussenegger
1f8178a86c Add fallback to non-buffer local clients to extract_data_dir
Allows to run :JdtWipeDataAndRestart from non-java buffers.
2022-12-13 19:47:46 +01:00
Mathias Fussenegger
e0147c1b0f Set buftype=nofile and swapfile=false on jdt:// buffers 2022-12-08 13:39:29 +01:00
Mathias Fussenegger
38ac798fe5 Fix extract variable with replace all occurrences
Adds extractVariableAllOccurrence to inferSelectionSupport to make the
"Extract to local variable (replace all occurrences)" code action work

Closes https://github.com/mfussenegger/nvim-jdtls/issues/371
2022-12-08 12:06:52 +01:00
TheBlob42
82e9feb6eb
Merge debug configurations by name/cwd in setup_dap_main_class_configs (#370) 2022-12-05 08:26:18 +01:00
TheBlob42
4ea8e66d61 Use correct JDTLS client for debugging 2022-11-30 12:08:37 +01:00
TheBlob42
671ca5b4ff Fix adding and updating of new dap configurations 2022-11-30 12:08:37 +01:00
TheBlob42
70a83a1259 Don't cache the latest data directory
A user might have multiple jdtls clients running for different projects
in the same neovim instance. Commands which use the data directory
(JdtShowLogs & JdtWipeDataAndRestart) should use the one of the client
attached to the current buffer instead of the "latest".
2022-11-30 12:08:37 +01:00
Mathias Fussenegger
7bc572fc35 Make execute_command coroutine aware/use in pick_projects 2022-11-01 11:06:17 +01:00
Mathias Fussenegger
8167d303d0 Avoid callback nesting in java_override_methods 2022-11-01 11:06:17 +01:00
Mathias Fussenegger
65dd5257d5 Avoid callback nesting in java_hash_code_equals_prompt 2022-11-01 11:06:17 +01:00
Mathias Fussenegger
0c589fff04 Avoid callback nesting in java_generate_delegate_methods_prompt 2022-11-01 11:06:17 +01:00
Mathias Fussenegger
fab52b5161 Avoid callback nesting in java_generate_constructors_prompt 2022-11-01 11:06:17 +01:00
Mathias Fussenegger
31b190a65f Use coroutine to avoid callback nesting in java_generate_to_string_prompt 2022-11-01 11:06:17 +01:00
Mathias Fussenegger
f39efa0e82 Include nosuf parameter in glob examples
Otherwise `suffixes` and `wildignore` settings could filter out the jar
files.

See https://github.com/mfussenegger/nvim-jdtls/issues/352#issuecomment-1293047108
2022-10-28 10:43:08 +02:00
Mathias Fussenegger
47472f648f Add a quickstart configuration example that's less verbose
The many lines of configuration scares people
2022-10-23 12:43:18 +02:00
Mathias Fussenegger
a59ab02028 Show only jdtls related diagnostic on :JdtCompile 2022-10-19 20:11:01 +02:00
fengwk
faf7ec2df5
Use client attached to buffer instead of any jdtls client (#350)
A user may have multiple jdtls clients if having multiple projects open at the same time in the same neovim instance.
2022-10-15 14:24:39 +02:00
Mathias Fussenegger
75af9581aa Add a super_implementation function
Closes https://github.com/mfussenegger/nvim-jdtls/issues/347
2022-10-14 19:40:41 +02:00
Ricardo Rodríguez
0422245fde
Add project name to dap launch entries (#338)
Adds project name to launch menu entries in order to avoid confusion with classes with same path in different projects

Co-authored-by: Ricardo Rodríguez <4416693+magidc@users.noreply.github.com>
Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
2022-10-04 12:41:20 +02:00
lidulibai
c52c136b3b
Fix nil error when capabilities are not provided in config (#339)
capabilities is optional
Fixes regression introduced with https://github.com/mfussenegger/nvim-jdtls/pull/324

Co-authored-by: lidulibai <zq@zeqiandeMacBook-Pro.local>
2022-10-04 12:35:11 +02:00
lidulibai
f3b916d6ee
Extend user provided capabilites with default capabilities (#324)
Allows users to only provide a subset of the default capabilities.

Co-authored-by: lidulibai <zq@zeqiandeMacBook-Pro.local>
2022-10-03 18:35:27 +02:00
Mathias Fussenegger
75d27daa06 Add a JdtHotcodeReplace command to trigger code replace manually
Closes https://github.com/mfussenegger/nvim-jdtls/issues/334
2022-09-29 12:15:05 +02:00
Mathias Fussenegger
62906e9974 Fix type annotation for test_class
opts is optional
2022-09-29 12:08:51 +02:00
Mathias Fussenegger
e9f40e793a Don't send off-spec requests to other lsp clients 2022-09-18 20:49:11 +02:00
figsoda
774a7714f9 Move with_classpaths to util and make it public 2022-09-08 10:41:39 +02:00
Mathias Fussenegger
7828673244 Increase progress-report in-progress ignore threshold
If there are many different tasks it could drop messages, leading to
stale progress entries that are never removed
2022-08-18 10:15:41 +02:00
Mathias Fussenegger
3a489be735 Fix markdownlint warnings 2022-08-18 10:15:41 +02:00
Mathias Fussenegger
a9f4ad6691 Allow to switch buffer right after triggering tests
If switching to a non-java buffer right after triggering tests it could
error out because some operations run async and `execute_command`
couldn't find a suitable client.
2022-08-18 10:15:41 +02:00
Mathias Fussenegger
87bdf2b216 Raise more meaningful error if server doesn't return launch_args 2022-08-05 15:20:35 +02:00
Mathias Fussenegger
8a97801fa1 Adjust lsp logpath for nvim-0.8 2022-07-28 19:58:42 +02:00
Mathias Fussenegger
f35efb60a0 Add hints on how to resolve compile errors if there are no diagnostics 2022-07-20 19:03:42 +02:00
Mathias Fussenegger
703268d5b8 Expose java/buildProjects via jdtls.build_projects 2022-06-30 18:56:45 +02:00
Mathias Fussenegger
03f64f1a3c Use isSelected property in generate constructor to pre-select selected properties 2022-06-30 18:01:12 +02:00
Mathias Fussenegger
9eb8758697 Allow to de-selected selected items in pick_many prompt 2022-06-30 17:55:50 +02:00
Mathias Fussenegger
71a719315c Bump java requirement in README
Eclipse.jdt.ls 1.13.0 requires at least Java 17
2022-06-30 17:49:29 +02:00
Mathias Fussenegger
f9af2311d1 Add a update_projects_config function
Exposes https://github.com/eclipse/eclipse.jdt.ls/pull/2131
2022-06-30 17:34:25 +02:00
Mathias Fussenegger
3a148dac52 Add a after_test callback to dap test functions
Closes https://github.com/mfussenegger/nvim-jdtls/issues/264
2022-06-17 21:01:47 +02:00