Closed mawkler closed 9 months ago
Oups sorry, I got this repo mixed up with nvim-java
! 😅
For what's worth, you could probably just add nvim-jdtls
in addition to make it work - it registers the client commands if they're missing - so it should mostly complement nvim-java. (But you need to call require("jdtls")
for it to happen. Just make sure not to call .start_or_attach
if another plugin creates/manages the lsp client)
I don't really understand why its author choose to re-implement pretty much everything. It would be pretty easy to write a wrapper around nvim-jdtls that simplifies the setup. It's also what lsp-zero does (https://github.com/VonHeikemen/lsp-zero.nvim/blob/v3.x/doc/md/guides/setup-with-nvim-jdtls.md), or how some of the distributions work - like lazyvim (https://www.lazyvim.org/extras/lang/java)
you could probably just add nvim-jdtls in addition to make it work
@mfussenegger Thank you for this, I'll give it a try!
LSP client configuration
No response
Eclipse.jdt.ls version
v1.30.1
Steps to Reproduce
Hi! Thanks for making this awesome plugin! I just installed it, and when I try and perform the code action "Extract to method" I get the message
Is this expected behaviour? The README says that
extract_method
is supported.This is the config that I'm using:
Click to expand
```lua return { 'nvim-java/nvim-java', dependencies = { 'nvim-java/lua-async-await', 'nvim-java/nvim-java-core', 'nvim-java/nvim-java-test', 'nvim-java/nvim-java-dap', 'MunifTanjim/nui.nvim', 'neovim/nvim-lspconfig', 'mfussenegger/nvim-dap', { 'williamboman/mason.nvim', opts = { registries = { 'github:nvim-java/mason-registry', 'github:mason-org/mason-registry', }, }, }, }, config = function() require('java').setup() require('lspconfig').jdtls.setup({}) end } ```To reproduce:
.java
file:=vim.lsp.buf.code_action()
Extract to method
Expected Result
Code action lets me extract code to a new method
Actual Result
I get the message