Skip to content

Java debug configurations for combination of vimspector and nvim-jdtls.

License

Notifications You must be signed in to change notification settings

elementdavv/vimspector-jdtls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vimspector-Jdtls

Java debug configuration of vimspector width nvim-jdtls.

Introduction

Vimspector provides java debug with YouCompleteMe, and nvim-jdtls provides java debug with nvim-dap. If you are using vimspector and nvim-jdtls as well, there is a little trouble to make them working together. That is what this plugin does.

Install

Use your favorite plugin manager to install, eg:

Plug 'puremourning/vimspector'
Plug 'mfussenegger/nvim-jdtls'
Plug 'elementdavv/vimspector-jdtls'

Configurations

With vimspector, install java gadget with ./install_gadget.py --force-enable-java or :VimspectorInstall vscode-java-debug. The gadget includes a java-debug-server file(vscode-java-debug/server/com.microsoft.java.debug.plugin-*.jar) that will be used in nvim-jdtls configuration.

With nvim-jdtls, download eclipse.jdt.ls, optional vscode-java-test, and optional google-java-format eclipse-formatter-xml.

Configure vimspector and nvim-jdtls as described in their documents.

This plugin does not need any configuration.

If you are using nvim-lspconfig, do not call lspconfig.jdtls.setup{}, else you will got two language server instances.

Refer to wiki for sample configurations.

Usage

To trigger java debug, call command:

VimspectorJdtlsStartDebug

The command has been mapped to <Leader><F5>(different than vimspector's default shortcut <F5>). You can remap to other keys as you like.

After a java debug session is started, all functions provided by vimspector and nvim-jdtls are all available.

License↴

GPL3 ©Element Davv

Any questions and/or suggestions are appreciatiated.

About

Java debug configurations for combination of vimspector and nvim-jdtls.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published