Update init.lua

This commit is contained in:
DarthMooMancer
2025-02-19 18:32:31 -05:00
committed by GitHub
parent 28cffd0480
commit 60c60d3697
+4 -6
View File
@@ -18,12 +18,8 @@ end
-- Create a new Java project
function M.create_project()
-- Ensure the prompt is a string (to avoid invalid arguments)
local prompt = "Enter project name: "
-- Use vim.fn.input to capture the input
local project_name = vim.fn.input(prompt)
-- Use vim.ui.input for better handling of input
vim.ui.input({ prompt = "Enter project name: " }, function(project_name)
-- Debugging: Output the input received
print("Input received: " .. (project_name or "nil"))
@@ -67,9 +63,11 @@ public class Main {
else
print("Error creating Main.java")
end
end)
end
-- Create a new Java file
function M.create_new_file()
vim.ui.input({ prompt = "Enter class name: " }, function(class_name)