Cannot find package "java-debug-adapter" #438
-
|
Hello, using the step provided here I have setup Sorry if this question has already been answered, but I found nothing that help me and the config in the wiki throw other error. Just in case:
My config is just a plain ~/.config/nvim via 🌙 v5.4.8 took 1m51s
❯ tree
.
├── \
├── init.lua
├── lazy-lock.json
└── lua
└── config
└── lazy.lua
3 directories, 4 files-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
vim.opt.hlsearch = true
vim.opt.clipboard:append('unnamedplus')
vim.opt.relativenumber = true
-- Setup lazy.nvim
require("lazy").setup({
spec = {
{ 'catppuccin/nvim', name = 'catppuccin', priority = 1000, config = function() vim.cmd.colorscheme 'catppuccin' end },
{
'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
config = function() require('lualine').setup() end
},
{
'nvim-treesitter/nvim-treesitter',
lazy = false,
branch = 'main',
build = ':TSUpdate',
config = function() require'nvim-treesitter'.install { 'bash', 'rust', 'go', 'typescript', 'javascript', 'zig', 'html', 'scss', 'java', 'sql', 'lua', 'json', 'markdown', 'markdown_inline', 'python', 'query', 'regex', 'tsx', 'vim', 'yaml' } end
},
{'nvim-java/nvim-java', config = function()
require('java').setup()
require('lspconfig').jdtls.setup({})
end,},
{ "neovim/nvim-lspconfig" },
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release --target install' },
{ 'nvim-telescope/telescope.nvim', tag = 'v0.1.9', dependencies = { 'nvim-lua/plenary.nvim' }},
{ "tpope/vim-fugitive" },
{ "nvim-mini/mini.animate", version = "*", config = function() require("mini.animate").setup() end },
{
"nvim-mini/mini.hipatterns",
version = "*",
config = function()
local hipatterns = require('mini.hipatterns')
hipatterns.setup({
highlighters = {
-- Highlight standalone 'FIXME', 'HACK', 'TODO', 'NOTE'
fixme = { pattern = '%f[%w]()FIXME()%f[%W]', group = 'MiniHipatternsFixme' },
hack = { pattern = '%f[%w]()HACK()%f[%W]', group = 'MiniHipatternsHack' },
todo = { pattern = '%f[%w]()TODO()%f[%W]', group = 'MiniHipatternsTodo' },
note = { pattern = '%f[%w]()NOTE()%f[%W]', group = 'MiniHipatternsNote' },
-- Highlight hex color strings (`#rrggbb`) using that color
hex_color = hipatterns.gen_highlighter.hex_color(),
},
})
end
},
{ 'nvim-mini/mini.icons', version = '*', config = function() require('mini.icons').setup() end },
{ 'nvim-mini/mini.pairs', version = '*', config = function() require('mini.pairs').setup() end },
{ "mfussenegger/nvim-dap" },
--{ 'nvim-java/nvim-java' },
},
-- automatically check for plugin updates
checker = { enabled = true },
})
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' })
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
vim.lsp.enable("pyright")
vim.lsp.enable("emmet_ls")
vim.lsp.enable("bashls")
vim.lsp.enable("eslint")
vim.lsp.enable("groovyls")
--vim.lsp.enable("jdtls")
vim.lsp.enable('golangci_lint_ls') |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Without mason, the old version of the plugin cannot function. It needs it to install some LSP stuff. I'm surprised it's not complaining about mason. But in the new version we're dropping Mason. Try this branch: https://github.com/nvim-java/nvim-java/tree/v4.0.0 and remove the call to lspconfig.jdtls.setup or even the config function altogether. |
Beta Was this translation helpful? Give feedback.
Without mason, the old version of the plugin cannot function. It needs it to install some LSP stuff. I'm surprised it's not complaining about mason.
But in the new version we're dropping Mason. Try this branch: https://github.com/nvim-java/nvim-java/tree/v4.0.0 and remove the call to lspconfig.jdtls.setup or even the config function altogether.