diff --git a/init.lua b/init.lua index 6de9df97..2ae3c7e1 100644 --- a/init.lua +++ b/init.lua @@ -170,6 +170,47 @@ require('lazy').setup({ }, }, + { + 'nvim-java/nvim-java', + dependencies = { + 'nvim-java/lua-async-await', + 'nvim-java/nvim-java-refactor', + '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 { + settings = { + java = { + configuration = { + runtimes = { + { + name = 'OpenJDK-Temurin-17', + path = '/opt/jdk-17.0.11+9', + default = true, + }, + }, + }, + }, + }, + } + end, + }, + -- NOTE: Plugins can also be configured to run Lua code when they are loaded. -- -- This is often very useful to both group configuration, as well as handle @@ -473,7 +514,7 @@ require('lazy').setup({ local servers = { -- clangd = {}, -- gopls = {}, - -- pyright = {}, + pyright = {}, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs --