|
| 1 | +*nvim-java.txt* For Neovim >= 0.9.4 Last change: 2023 November 15 |
| 2 | + |
| 3 | +============================================================================== |
| 4 | +Table of Contents *nvim-java-table-of-contents* |
| 5 | + |
| 6 | +1. nvim-java |nvim-java-nvim-java| |
| 7 | + - Features |nvim-java-features| |
| 8 | + - Why |nvim-java-why| |
| 9 | + - How to Use |nvim-java-how-to-use| |
| 10 | + - APIs |nvim-java-apis| |
| 11 | + - Projects Acknowledgement |nvim-java-projects-acknowledgement| |
| 12 | + |
| 13 | +============================================================================== |
| 14 | +1. nvim-java *nvim-java-nvim-java* |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | +No need to put up with jdtls <https://github.com/eclipse-jdtls/eclipse.jdt.ls> |
| 19 | +nonsense anymore. Just install and start writing `public static void |
| 20 | +main(String[] args)`. |
| 21 | + |
| 22 | + |
| 23 | +FEATURES *nvim-java-features* |
| 24 | + |
| 25 | +- Diagnostics & Auto Completion |
| 26 | +- Automatic DAP <https://github.com/mfussenegger/nvim-dap> debug configuration |
| 27 | +- Running tests |
| 28 | + |
| 29 | + |
| 30 | +WHY *nvim-java-why* |
| 31 | + |
| 32 | +- Uses nvim-lspconfig <https://github.com/neovim/nvim-lspconfig> to setup `jdtls` |
| 33 | +- Realtime server settings updates is possible using neoconf <https://github.com/folke/neoconf.nvim> |
| 34 | +- Everything necessary will be installed automatically (except JDKs) |
| 35 | +- Uses `jdtls` and auto loads `jdtls` plugins from mason.nvim <https://github.com/williamboman/mason.nvim> |
| 36 | + - Supported plugins are, |
| 37 | + - `lombok` |
| 38 | + - `java-test` |
| 39 | + - `java-debug-adapter` |
| 40 | +- Typed & documented APIs |
| 41 | +- No callback hells I promise <https://github.com/pyericz/promise-lua> |
| 42 | + |
| 43 | + |
| 44 | +HOW TO USE *nvim-java-how-to-use* |
| 45 | + |
| 46 | + |
| 47 | +INSTALL THE PLUGIN ~ |
| 48 | + |
| 49 | +Using lazy.nvim <https://github.com/folke/lazy.nvim> |
| 50 | + |
| 51 | +>lua |
| 52 | + return { |
| 53 | + 'nvim-java/nvim-java', |
| 54 | + dependencies = { |
| 55 | + 'nvim-java/nvim-java-core', |
| 56 | + 'neovim/nvim-lspconfig', |
| 57 | + 'williamboman/mason.nvim', |
| 58 | + 'mfussenegger/nvim-dap', |
| 59 | + }, |
| 60 | + event = 'VeryLazy', |
| 61 | + opts = {}, |
| 62 | + } |
| 63 | +< |
| 64 | + |
| 65 | + |
| 66 | +SETUP JDTLS LIKE YOU WOULD USUALLY DO ~ |
| 67 | + |
| 68 | +>lua |
| 69 | + require('lspconfig').jdtls.setup({}) |
| 70 | +< |
| 71 | + |
| 72 | +Yep! That’s all :) |
| 73 | + |
| 74 | + |
| 75 | +APIS *nvim-java-apis* |
| 76 | + |
| 77 | + |
| 78 | +DAP ~ |
| 79 | + |
| 80 | +- `config_dap` - DAP is autoconfigured on start up, but in case you want to force configure it again, you can use this API |
| 81 | + |
| 82 | +>lua |
| 83 | + require('java').dap.config_dap() |
| 84 | +< |
| 85 | + |
| 86 | + |
| 87 | +TEST ~ |
| 88 | + |
| 89 | +- `run_current_test_class` - Run the test class in the active buffer |
| 90 | + |
| 91 | +>lua |
| 92 | + require('java').test.run_current_test_class() |
| 93 | +< |
| 94 | + |
| 95 | +- `debug_current_test_class` - Debug the test class in the active buffer |
| 96 | + |
| 97 | +>lua |
| 98 | + require('java').test.debug_current_test_class() |
| 99 | +< |
| 100 | + |
| 101 | + |
| 102 | +PROJECTS ACKNOWLEDGEMENT *nvim-java-projects-acknowledgement* |
| 103 | + |
| 104 | +nvim-jdtls <https://github.com/mfussenegger/nvim-jdtls> is a plugin that |
| 105 | +follows "Keep it simple, stupid!" approach. If you love customizing things by |
| 106 | +yourself, then give nvim-jdtls a try. I may or may not have copied some code |
| 107 | +;-) Open source is beautiful! |
| 108 | + |
| 109 | +============================================================================== |
| 110 | +2. Links *nvim-java-links* |
| 111 | + |
| 112 | +1. *Neovim*: https://img.shields.io/badge/NeoVim-%2357A143.svg?&style=for-the-badge&logo=neovim&logoColor=white |
| 113 | +2. *Lua*: https://img.shields.io/badge/lua-%232C2D72.svg?style=for-the-badge&logo=lua&logoColor=white |
| 114 | +3. *Java*: https://img.shields.io/badge/java-%23ED8B00.svg?style=for-the-badge&logo=openjdk&logoColor=white |
| 115 | +4. *Gradle*: https://img.shields.io/badge/Gradle-02303A.svg?style=for-the-badge&logo=Gradle&logoColor=white |
| 116 | +5. *Apache Maven*: https://img.shields.io/badge/Apache%20Maven-C71A36?style=for-the-badge&logo=Apache%20Maven&logoColor=white |
| 117 | + |
| 118 | +Generated by panvimdoc <https://github.com/kdheepak/panvimdoc> |
| 119 | + |
| 120 | +vim:tw=78:ts=8:noet:ft=help:norl: |
0 commit comments