mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-08-09 04:14:51 +02:00
enc: update config
This commit is contained in:
parent
fde1324bf2
commit
5e9e520a23
5 changed files with 20 additions and 9 deletions
|
@ -65,7 +65,7 @@ local function gradle_new_project()
|
|||
end, 4000) -- Delay is set in milliseconds (3,000ms = 3 seconds)
|
||||
end
|
||||
-- Run the delayed quit function
|
||||
delayed_quit()
|
||||
-- delayed_quit()
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -59,11 +59,11 @@ local function create_java_class()
|
|||
-- Format direktori dan path file berdasarkan input pengguna
|
||||
local package_dir = nil
|
||||
if package_name then
|
||||
if is_maven_project() then
|
||||
package_dir = string.format("src/main/java/%s", package_name:gsub("%.", "/"))
|
||||
else
|
||||
package_dir = string.format("app/src/main/java/%s", package_name:gsub("%.", "/"))
|
||||
end
|
||||
-- if is_maven_project() then
|
||||
package_dir = string.format("src/main/java/%s", package_name:gsub("%.", "/"))
|
||||
-- else
|
||||
-- package_dir = string.format("app/src/main/java/%s", package_name:gsub("%.", "/"))
|
||||
-- end
|
||||
if vim.fn.isdirectory(package_dir) == 0 then
|
||||
vim.fn.mkdir(package_dir, "p")
|
||||
end
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
local M = {}
|
||||
local is_gradle = function()
|
||||
if vim.fn.findfile("pom.xml", vim.fn.getcwd()) == "pom.xml" then
|
||||
return false
|
||||
else
|
||||
return true
|
||||
end
|
||||
end
|
||||
M = {
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
|
@ -49,7 +56,7 @@ M = {
|
|||
},
|
||||
}
|
||||
end,
|
||||
enabled = vim.fn.findfile("build.gradle", vim.fn.getcwd()) == "build.gradle" or false,
|
||||
enabled = is_gradle(),
|
||||
config = function(_, opts)
|
||||
-- get neotest namespace (api call creates or returns namespace)
|
||||
local neotest_ns = vim.api.nvim_create_namespace("neotest")
|
||||
|
@ -124,6 +131,7 @@ M = {
|
|||
"zeioth/project.nvim",
|
||||
cmd = "ProjectRoot",
|
||||
ft = { "java" },
|
||||
-- enabled = vim.fn.findfile("build.gradle", vim.fn.getcwd()) == "build.gradle" or false,
|
||||
opts = {
|
||||
-- How to find root directory
|
||||
patterns = {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
require("auto-jdtls2.create_gradle_project")
|
||||
require("auto-jdtls2.create_maven_project")
|
||||
require("auto-jdtls2.create_springboot_project")
|
||||
require("auto-jdtls2.generate_java_class")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue