mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-07-10 09:24:29 +02:00
enc: add create project java
This commit is contained in:
parent
3c9cf18933
commit
16264d0b0d
6 changed files with 585 additions and 13 deletions
113
lua/auto-jdtls2/create_maven_project.lua
Normal file
113
lua/auto-jdtls2/create_maven_project.lua
Normal file
|
@ -0,0 +1,113 @@
|
|||
local function mvn_new_project()
|
||||
local function create_notif(message, level)
|
||||
local notif_ok, notify = pcall(require, "notify")
|
||||
if notif_ok then
|
||||
notify(message, level)
|
||||
else
|
||||
print(message)
|
||||
end
|
||||
end
|
||||
-- Fungsi untuk meminta input dari pengguna dengan opsi untuk membatalkan
|
||||
local function get_user_input(prompt, default_value)
|
||||
vim.fn.inputsave()
|
||||
local result = vim.fn.input(prompt, default_value)
|
||||
vim.fn.inputrestore()
|
||||
|
||||
-- Cek apakah pengguna menekan Esc untuk membatalkan input
|
||||
if result == "" then
|
||||
create_notif("Input canceled.", "info")
|
||||
return nil, true
|
||||
end
|
||||
|
||||
return result, false
|
||||
end
|
||||
-- Ambil input dari pengguna untuk menentukan direktori proyek
|
||||
local project_dir, canceled = get_user_input("Enter project directory: ", vim.fn.getcwd())
|
||||
if canceled then
|
||||
return
|
||||
end
|
||||
-- Buat direktori jika belum ada
|
||||
if vim.fn.isdirectory(project_dir) == 0 then
|
||||
if vim.fn.mkdir(project_dir, "p") == 0 then
|
||||
create_notif("Failed to create project directory: " .. project_dir, "error")
|
||||
return
|
||||
end
|
||||
end
|
||||
-- Pindah ke direktori proyek
|
||||
local success, err = pcall(vim.fn.chdir, project_dir)
|
||||
if not success then
|
||||
create_notif("Error changing directory: " .. err, "error")
|
||||
return
|
||||
end
|
||||
|
||||
create_notif("Changed directory to: " .. project_dir, "info")
|
||||
-- Ambil input dari pengguna untuk Maven
|
||||
local group_id, canceled_group = get_user_input("Enter groupId: ", "com.example")
|
||||
if canceled_group then
|
||||
return
|
||||
end
|
||||
local artifact_id, canceled_artifact = get_user_input("Enter artifactId: ", "myproject")
|
||||
if canceled_artifact then
|
||||
return
|
||||
end
|
||||
local archetype_artifact_id, canceled_archetype =
|
||||
get_user_input("Enter archetypeArtifactId: ", "maven-archetype-quickstart")
|
||||
if canceled_archetype then
|
||||
return
|
||||
end
|
||||
local archetype_version, canceled_version = get_user_input("Enter archetypeVersion: ", "1.5")
|
||||
if canceled_version then
|
||||
return
|
||||
end
|
||||
local interactive_mode, canceled_interactive = get_user_input("Enter interactiveMode (true/false): ", "false")
|
||||
if canceled_interactive then
|
||||
return
|
||||
end
|
||||
-- Format perintah Maven berdasarkan input pengguna
|
||||
local command = string.format(
|
||||
[[mvn archetype:generate "-DgroupId=%s" "-DartifactId=%s" "-DarchetypeArtifactId=%s" "-DarchetypeVersion=%s" "-DinteractiveMode=%s"]],
|
||||
group_id,
|
||||
artifact_id,
|
||||
archetype_artifact_id,
|
||||
archetype_version,
|
||||
interactive_mode
|
||||
)
|
||||
|
||||
-- Fungsi untuk menjalankan perintah Maven dan menampilkan outputnya
|
||||
local function run_maven_command(cmd, project_name)
|
||||
local output = vim.fn.system(cmd)
|
||||
if vim.v.shell_error ~= 0 then
|
||||
print("Erro ao executar: " .. output)
|
||||
else
|
||||
local ch_dir = string.format("cd %s", project_name)
|
||||
vim.fn.system(ch_dir)
|
||||
vim.fn.chdir(project_name)
|
||||
-- Cari dan buka file main class
|
||||
local uname = vim.loop.os_uname().sysname
|
||||
if uname == "Windows_NT" then
|
||||
if group_id then
|
||||
group_id = group_id:gsub("%.", "\\")
|
||||
local main_class_path = string.format("src\\main\\java\\%s\\App.java", group_id)
|
||||
if vim.fn.filereadable(main_class_path) == 1 then
|
||||
vim.cmd(":edit " .. main_class_path)
|
||||
end
|
||||
end
|
||||
else
|
||||
if group_id then
|
||||
group_id = group_id:gsub("%.", "/")
|
||||
local main_class_path = string.format("src/main/java/%s/App.java", group_id)
|
||||
if vim.fn.filereadable(main_class_path) == 1 then
|
||||
vim.cmd(":edit " .. main_class_path)
|
||||
end
|
||||
end
|
||||
end
|
||||
vim.cmd(":NvimTreeFindFileToggl<CR>")
|
||||
end
|
||||
end
|
||||
|
||||
-- Jalankan perintah Maven dan buka proyek
|
||||
run_maven_command(command, artifact_id)
|
||||
create_notif("Project created successfully !", "info")
|
||||
end
|
||||
|
||||
vim.api.nvim_create_user_command("MavenNewProject", mvn_new_project, {})
|
289
lua/auto-jdtls2/create_springboot_project.lua
Normal file
289
lua/auto-jdtls2/create_springboot_project.lua
Normal file
|
@ -0,0 +1,289 @@
|
|||
local function create_notif(message, level)
|
||||
local notif_ok, notify = pcall(require, "notify")
|
||||
if notif_ok then
|
||||
notify(message, level)
|
||||
else
|
||||
print(message)
|
||||
end
|
||||
end
|
||||
|
||||
local function safe_request(url)
|
||||
local status, request = pcall(function()
|
||||
return vim.system({ "curl", "-s", url }, { text = true }):wait()
|
||||
end)
|
||||
|
||||
if not status then
|
||||
vim.api.nvim_err_writeln("Error making request to " .. url .. ": " .. request)
|
||||
return nil
|
||||
end
|
||||
|
||||
return request
|
||||
end
|
||||
|
||||
local function safe_json_decode(data)
|
||||
local status, decoded = pcall(vim.fn.json_decode, data)
|
||||
|
||||
if not status then
|
||||
vim.api.nvim_err_writeln("Error decoding JSON: " .. decoded)
|
||||
return nil
|
||||
end
|
||||
|
||||
return decoded
|
||||
end
|
||||
|
||||
local function contains(list, element)
|
||||
for _, value in pairs(list) do
|
||||
if value == element then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
local function list_to_string(list, is_err)
|
||||
local result = ""
|
||||
|
||||
for i, value in ipairs(list) do
|
||||
if is_err then
|
||||
result = result .. "'" .. tostring(value) .. "'"
|
||||
else
|
||||
result = result .. tostring(value)
|
||||
end
|
||||
if i < #list then
|
||||
if is_err then
|
||||
result = result .. " or "
|
||||
else
|
||||
result = result .. "/"
|
||||
end
|
||||
end
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
local function handle_start_springboot_data(data)
|
||||
local spring_data = {}
|
||||
for _, value in pairs(data.values) do
|
||||
table.insert(spring_data, value.id)
|
||||
end
|
||||
return spring_data
|
||||
end
|
||||
|
||||
local function change_directory()
|
||||
-- Fungsi untuk meminta input dari pengguna dengan opsi untuk membatalkan
|
||||
local function get_user_input(prompt, default_value)
|
||||
vim.fn.inputsave()
|
||||
local result = vim.fn.input(prompt, default_value)
|
||||
vim.fn.inputrestore()
|
||||
|
||||
-- Cek apakah pengguna menekan Esc untuk membatalkan input
|
||||
if result == "" then
|
||||
create_notif("Input canceled.", "info")
|
||||
return nil, true
|
||||
end
|
||||
|
||||
return result, false
|
||||
end
|
||||
|
||||
-- Ambil input dari pengguna untuk menentukan direktori proyek
|
||||
local project_dir, canceled = get_user_input("Enter project directory: ", vim.fn.getcwd())
|
||||
if canceled then
|
||||
return
|
||||
end
|
||||
-- Buat direktori jika belum ada
|
||||
if vim.fn.isdirectory(project_dir) == 0 then
|
||||
if vim.fn.mkdir(project_dir, "p") == 0 then
|
||||
create_notif("Failed to create project directory: " .. project_dir, "error")
|
||||
return
|
||||
end
|
||||
end
|
||||
-- Pindah ke direktori proyek
|
||||
local success, err = pcall(vim.fn.chdir, project_dir)
|
||||
if not success then
|
||||
create_notif("Error changing directory: " .. err, "error")
|
||||
return
|
||||
end
|
||||
|
||||
create_notif("Changed directory to: " .. project_dir, "info")
|
||||
return project_dir
|
||||
end
|
||||
|
||||
local function get_build_type(data_available)
|
||||
local build_type_available = list_to_string(data_available, false)
|
||||
local options_err = list_to_string(data_available, true)
|
||||
local build_type = vim.fn.input("Enter build type (" .. build_type_available .. "): ", "maven")
|
||||
if not contains(data_available, build_type) then
|
||||
create_notif("Invalid build type. Please enter " .. options_err .. ".", "info")
|
||||
return ""
|
||||
end
|
||||
|
||||
return build_type
|
||||
end
|
||||
|
||||
local function get_language(data_available)
|
||||
local language_available = list_to_string(data_available, false)
|
||||
local options_err = list_to_string(data_available, true)
|
||||
|
||||
local language = vim.fn.input("Enter Language (" .. language_available .. "): ", "java")
|
||||
if not contains(data_available, language) then
|
||||
create_notif("Invalid language. Please enter " .. options_err .. ".", "info")
|
||||
return ""
|
||||
end
|
||||
|
||||
return language
|
||||
end
|
||||
|
||||
local function get_java_version(data_available)
|
||||
local version_available = list_to_string(data_available, false)
|
||||
local options_err = list_to_string(data_available, true)
|
||||
|
||||
local java_version = vim.fn.input("Enter Java Version (" .. version_available .. "): ", "21")
|
||||
if not contains(data_available, java_version) then
|
||||
create_notif("Invalid Java version. Please enter a valid version " .. options_err .. ".", "info")
|
||||
return ""
|
||||
end
|
||||
|
||||
return java_version
|
||||
end
|
||||
|
||||
local function get_boot_version(data_available)
|
||||
local version_available = list_to_string(data_available, false)
|
||||
local options_err = list_to_string(data_available, true)
|
||||
|
||||
local versions_table = {}
|
||||
for v in string.gmatch(version_available, "([^/]+)") do
|
||||
table.insert(versions_table, "-> " .. v)
|
||||
end
|
||||
local annotated_versions = table.concat(versions_table, "\n")
|
||||
local boot_version = vim.fn.input(annotated_versions .. "\n: ", "3.3.5.RELEASE")
|
||||
if not contains(data_available, boot_version) then
|
||||
create_notif("Invalid Spring Boot version. Please enter a valid version " .. options_err .. ".", "info")
|
||||
return ""
|
||||
end
|
||||
|
||||
return boot_version
|
||||
end
|
||||
|
||||
local function get_packaging(data_available)
|
||||
local packaging_available = list_to_string(data_available, false)
|
||||
local options_err = list_to_string(data_available, true)
|
||||
|
||||
local packaging = vim.fn.input("Enter Packaging(" .. packaging_available .. "): ", "jar")
|
||||
if packaging ~= "jar" and packaging ~= "war" then
|
||||
create_notif("Invalid packaging. Please enter " .. options_err .. ".", "info")
|
||||
return ""
|
||||
end
|
||||
return packaging
|
||||
end
|
||||
|
||||
local function springboot_new_project()
|
||||
local request = safe_request("https://start.spring.io/metadata/client")
|
||||
|
||||
if not request then
|
||||
vim.api.nvim_err_writeln("Failed to make a request to the URL.")
|
||||
return false
|
||||
end
|
||||
|
||||
local springboot_data = safe_json_decode(request.stdout)
|
||||
|
||||
if not springboot_data then
|
||||
vim.api.nvim_err_writeln("Failed to decode JSON from the request.")
|
||||
return false
|
||||
end
|
||||
local project_dir = change_directory()
|
||||
local build_types = { "maven", "gradle" }
|
||||
local languages = handle_start_springboot_data(springboot_data.language)
|
||||
local java_versions = handle_start_springboot_data(springboot_data.javaVersion)
|
||||
local boot_versions = handle_start_springboot_data(springboot_data.bootVersion)
|
||||
local packagings = handle_start_springboot_data(springboot_data.packaging)
|
||||
local build_type = get_build_type(build_types)
|
||||
|
||||
if build_type:len() == 0 then
|
||||
return
|
||||
end
|
||||
|
||||
local language = get_language(languages)
|
||||
if language:len() == 0 then
|
||||
return
|
||||
end
|
||||
|
||||
local java_version = get_java_version(java_versions)
|
||||
if java_version:len() == 0 then
|
||||
return
|
||||
end
|
||||
|
||||
local boot_version = get_boot_version(boot_versions)
|
||||
if boot_version:len() == 0 then
|
||||
return
|
||||
end
|
||||
|
||||
local packaging = get_packaging(packagings)
|
||||
if packaging:len() == 0 then
|
||||
return
|
||||
end
|
||||
|
||||
local dependencies = vim.fn.input("Enter dependencies (comma separated): ", "devtools,web,data-jpa,h2,thymeleaf")
|
||||
local group_id = vim.fn.input("Enter Group ID: ", "com.example")
|
||||
local artifact_id = vim.fn.input("Enter Artifact ID: ", "myproject")
|
||||
local name = vim.fn.input("Enter project name: ", artifact_id)
|
||||
local package_name = vim.fn.input("Enter package name: ", group_id .. "." .. artifact_id)
|
||||
local description = vim.fn.input("Enter project description: ", "")
|
||||
|
||||
local command = string.format(
|
||||
"spring init --boot-version=%s --java-version=%s --dependencies=%s --groupId=%s --artifactId=%s --name=%s --package-name=%s --description=%s --language=%s --build=%s %s",
|
||||
boot_version,
|
||||
java_version,
|
||||
dependencies,
|
||||
group_id,
|
||||
artifact_id,
|
||||
name,
|
||||
package_name,
|
||||
description, -- Menambahkan deskripsi proyek
|
||||
language, -- Menambahkan bahasa pemrograman (Java, Kotlin, atau Groovy)
|
||||
build_type,
|
||||
name
|
||||
)
|
||||
|
||||
-- Fungsi untuk mengubah teks
|
||||
local function capitalize_first_letter(str)
|
||||
return str:sub(1, 1):upper() .. str:sub(2):lower()
|
||||
end
|
||||
|
||||
local output = vim.fn.system(command)
|
||||
if vim.v.shell_error ~= 0 then
|
||||
create_notif("Erro ao executar: " .. output, "error")
|
||||
else
|
||||
local ch_dir = string.format("cd %s", project_dir .. "/" .. name)
|
||||
vim.fn.system(ch_dir)
|
||||
vim.fn.chdir(project_dir .. "/" .. name)
|
||||
create_notif(name, "info")
|
||||
-- Cari dan buka file main class
|
||||
local uname = vim.loop.os_uname().sysname
|
||||
local pth = package_name
|
||||
if uname == "Windows_NT" then
|
||||
if pth then
|
||||
pth = pth:gsub("%.", "\\")
|
||||
create_notif(pth, "info")
|
||||
local main_class_path =
|
||||
string.format("src\\main\\java\\%s\\" .. capitalize_first_letter(name) .. "Application.java", pth)
|
||||
create_notif(main_class_path, "info")
|
||||
if vim.fn.filereadable(main_class_path) == 1 then
|
||||
vim.cmd(":edit " .. main_class_path)
|
||||
end
|
||||
end
|
||||
else
|
||||
if pth then
|
||||
pth = pth:gsub("%.", "/")
|
||||
local main_class_path =
|
||||
string.format("src/main/java/%s/" .. capitalize_first_letter(name) .. "Application.java", pth)
|
||||
if vim.fn.filereadable(main_class_path) == 1 then
|
||||
vim.cmd(":edit " .. main_class_path)
|
||||
end
|
||||
end
|
||||
end
|
||||
vim.cmd(":NvimTreeFindFileToggl<CR>")
|
||||
end
|
||||
|
||||
create_notif("Project created successfully!", "info")
|
||||
end
|
||||
|
||||
vim.api.nvim_create_user_command("SpringBootNewProject", springboot_new_project, {})
|
|
@ -3,6 +3,8 @@ local M = {}
|
|||
M.setup = function(opt)
|
||||
opt = opt or {}
|
||||
require("auto-jdtls.utils").install()
|
||||
require("auto-jdtls.create_maven_project")
|
||||
require("auto-jdtls.create_springboot_project")
|
||||
require("auto-jdtls.utils").attach_jdtls(opt)
|
||||
end
|
||||
|
||||
|
|
|
@ -52,6 +52,161 @@ M.lsp_keymaps=function ()
|
|||
vim.keymap.set("n", "<leader>lD", vim.lsp.buf.declaration, { desc = "Code Goto Declaration" })
|
||||
end
|
||||
|
||||
M.is_maven_project = function()
|
||||
if vim.fn.findfile("pom.xml", vim.fn.getcwd()) == "pom.xml" then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
M.is_gradle_project = function()
|
||||
if
|
||||
vim.fn.findfile("build.gradle", vim.fn.getcwd()) == "build.gradle"
|
||||
or vim.fn.findfile("settings.gradle", vim.fn.getcwd()) == "settings.gradle"
|
||||
or vim.fn.findfile("gradlew", vim.fn.getcwd()) == "gradlew"
|
||||
then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
M.is_main_class = function()
|
||||
local bufnr = vim.api.nvim_get_current_buf()
|
||||
local content = vim.api.nvim_buf_get_lines(bufnr, 0, -1, false)
|
||||
for i, line in ipairs(content) do
|
||||
if line:match("public static void main%s*%(") then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
M.run_aven_pring_boot = function()
|
||||
if M.is_maven_project() then
|
||||
vim.cmd("terminal mvn spring-boot:run")
|
||||
else
|
||||
local notif_ok, notify = pcall(require, "notify")
|
||||
if notif_ok then
|
||||
notify("Project pom.xml not found !", "info")
|
||||
else
|
||||
print("Project pom.xml not found !")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
M.cmd_maven_spring_boot = function()
|
||||
vim.api.nvim_create_user_command("RunMvnSpringBoot", function()
|
||||
M.run_aven_pring_boot()
|
||||
end, { nargs = 0 })
|
||||
end
|
||||
|
||||
M.run_gradle_spring_boot = function()
|
||||
if M.is_gradle_project() then
|
||||
local uname = vim.loop.os_uname().sysname
|
||||
if uname == "Windows_NT" then
|
||||
vim.cmd("terminal .\\gradlew build --continuous")
|
||||
vim.cmd("terminal .\\gradlew bootRun")
|
||||
else
|
||||
vim.cmd("terminal ./gradlew build --continuous")
|
||||
vim.cmd("terminal ./gradlew bootRun")
|
||||
end
|
||||
else
|
||||
local notif_ok, notify = pcall(require, "notify")
|
||||
if notif_ok then
|
||||
notify("Project build.gradle not found !", "info")
|
||||
else
|
||||
print("Project build.gradle not found !")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
M.cmd_gradle_spring_boot = function()
|
||||
vim.api.nvim_create_user_command("RunGradleSpringBoot", function()
|
||||
M.run_gradle_spring_boot()
|
||||
end, { nargs = 0 })
|
||||
end
|
||||
|
||||
M.run_mvn_and_java = function()
|
||||
if M.is_maven_project() then
|
||||
local result = M.is_main_class()
|
||||
if not result then
|
||||
local notif_ok, notify = pcall(require, "notify")
|
||||
if notif_ok then
|
||||
notify("Please open java main class !", "info")
|
||||
else
|
||||
print("Please open java main class !")
|
||||
end
|
||||
return
|
||||
else
|
||||
-- Fungsi untuk mencari file .jar dalam folder target
|
||||
local function find_jar_file()
|
||||
local target_dir = "target"
|
||||
local jar_file = nil
|
||||
|
||||
local handle = vim.loop.fs_scandir(target_dir)
|
||||
if handle then
|
||||
while true do
|
||||
local name, t = vim.loop.fs_scandir_next(handle)
|
||||
if not name then
|
||||
break
|
||||
end
|
||||
if t == "file" and name:match("%.jar$") then
|
||||
jar_file = name
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
return jar_file
|
||||
end
|
||||
local jar_file = find_jar_file()
|
||||
-- Buat fungsi untuk menjalankan perintah secara berurutan dalam mode diam
|
||||
function RunMvnAndJava()
|
||||
-- daptkan path
|
||||
local root = vim.uv.cwd()
|
||||
local fname = vim.api.nvim_buf_get_name(0)
|
||||
fname = fname:gsub(root, "")
|
||||
fname = fname:gsub("/src/main/java/", "")
|
||||
fname = fname:gsub("\\src\\main\\java\\", "")
|
||||
fname = fname:gsub(".java", ""):gsub("/", ".")
|
||||
fname = fname:gsub("\\", ".")
|
||||
-- Jalankan perintah mvn package secara diam-diam
|
||||
local notif_ok, notify = pcall(require, "notify")
|
||||
if notif_ok then
|
||||
notify("Compile Start !", "info")
|
||||
end
|
||||
vim.fn.jobstart("mvn package", {
|
||||
on_exit = function()
|
||||
vim.cmd("terminal java -cp target/" .. jar_file .. " " .. fname)
|
||||
end,
|
||||
})
|
||||
end
|
||||
RunMvnAndJava()
|
||||
end
|
||||
else
|
||||
local notif_ok, notify = pcall(require, "notify")
|
||||
if notif_ok then
|
||||
notify("Project pom.xml not found !", "info")
|
||||
else
|
||||
print("Project pom.xml not found !")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
M.cmd_mvn_and_java = function()
|
||||
vim.api.nvim_create_user_command("RunMaven", function()
|
||||
M.run_mvn_and_java()
|
||||
end, { nargs = 0 })
|
||||
end
|
||||
|
||||
M.cmd_gradle = function()
|
||||
vim.api.nvim_create_user_command("RunGradle", function()
|
||||
vim.cmd("terminal gradle run")
|
||||
end, { nargs = 0 })
|
||||
end
|
||||
|
||||
-- stylua: ignore
|
||||
M.jdtls_keymaps=function ()
|
||||
-- add keymaps
|
||||
|
@ -213,6 +368,11 @@ M.attach_jdtls = function(op)
|
|||
end
|
||||
-- initialisasi config
|
||||
local function attach_jdtls()
|
||||
-- load user cmd
|
||||
M.cmd_maven_spring_boot()
|
||||
M.cmd_gradle_spring_boot()
|
||||
M.cmd_mvn_and_java()
|
||||
M.cmd_gradle()
|
||||
-- Configuration can be augmented and overridden by opts.jdtls
|
||||
local config = M.extend_or_override({
|
||||
cmd = M.opts.full_cmd(M.opts),
|
||||
|
|
|
@ -7,11 +7,17 @@ M = {
|
|||
vim.list_extend(opts.skip_config, { "jdtls" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"pojokcodeid/auto-java-project.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("auto-java-project").setup()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-jdtls",
|
||||
dependencies = { "pojokcodeid/auto-jdtls.nvim" },
|
||||
ft = { "java" },
|
||||
enabled = true,
|
||||
-- your opts go here
|
||||
opts = {},
|
||||
config = function(_, opts)
|
||||
|
@ -33,8 +39,9 @@ M = {
|
|||
"nvim-treesitter/nvim-treesitter",
|
||||
"andy-bell101/neotest-java",
|
||||
},
|
||||
enabled = vim.fn.findfile("build.gradle", vim.fn.getcwd()) == "build.gradle" or false,
|
||||
-- enabled = vim.fn.findfile("build.gradle", vim.fn.getcwd()) == "build.gradle" or false,
|
||||
config = function()
|
||||
require("auto-jdtls.create_maven_project")
|
||||
require("neotest").setup({
|
||||
adapters = {
|
||||
require("neotest-java"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue