|
1 | | -# nvim-java-core |
| 1 | +# :coffee: nvim-java-core |
2 | 2 |
|
3 | 3 |  |
4 | 4 |  |
5 | 5 |  |
6 | 6 |  |
7 | 7 |  |
8 | 8 |
|
9 | | -No need to put up with [jdtls](https://github.com/eclipse-jdtls/eclipse.jdt.ls) nonsense anymore. |
10 | | -Just install and start writing `public static void main(String[] args)`. |
11 | | - |
12 | | -## Features |
13 | | - |
14 | | -:white_check_mark: are supported features. :x: are pending features. |
15 | | - |
16 | | -- :white_check_mark: Diagnostics & Auto Completion |
17 | | -- :white_check_mark: Automatic [DAP](https://github.com/mfussenegger/nvim-dap) debug configuration |
18 | | -- :x: Running tests |
19 | | - |
20 | | -## Why |
21 | | - |
22 | | -- Uses [nvim-lspconfig]() to setup `jdtls` |
23 | | -- Uses `jdtls` and auto loads `jdtls` plugins from [mason.nvim](https://github.com/williamboman/mason.nvim) (If they are installed) |
24 | | - - Supported plugins are, |
25 | | - - `lombok` (mason `jdtls` package contains the lombok jar. So no need to installed it separately) |
26 | | - - `java-test` |
27 | | - - `java-debug-adapter` |
28 | | -- Typed & documented APIs |
29 | | -- No callback hells I [promise](https://github.com/pyericz/promise-lua) |
30 | | - |
31 | | -## How to Use |
32 | | - |
33 | | -```lua |
34 | | -local java = require('java-core') |
35 | | -local dap = require("java.dap") |
36 | | - |
37 | | --- update dap config on attach event |
38 | | -dap.setup_dap_on_attach() |
39 | | - |
40 | | -require('lspconfig').jdtls.setup(java.get_config()) |
41 | | - |
42 | | -vim.api.nvim_create_autocmd('LspAttach', { |
43 | | - callback = function(args) |
44 | | - local buffer = args.buf |
45 | | - |
46 | | - -- add your language server keymaps here |
47 | | - end, |
48 | | - group = vim.api.nvim_create_augroup('LSP Keymaps', {}), |
49 | | -}) |
50 | | -``` |
| 9 | +This is a sub project of [nvim-java](https://github.com/nvim-java/nvim-java). Please refer the |
| 10 | +[README](https://github.com/nvim-java/nvim-java) in the main repository. |
0 commit comments