FEAT: adding create_project
This commit is contained in:
+10
-4
@@ -1,5 +1,11 @@
|
||||
local M = {}
|
||||
|
||||
function M.test()
|
||||
vim.ui.input({ prompt = "Test: ", default = "" }, function(input)
|
||||
print(input)
|
||||
end)
|
||||
end
|
||||
|
||||
local configs = require("vern.configs")
|
||||
local actions = require("vern.actions")
|
||||
M.opts = {}
|
||||
@@ -20,15 +26,15 @@ function M.setup(user_opts)
|
||||
end
|
||||
|
||||
--- Load project cmdline commands
|
||||
vim.api.nvim_create_user_command("VernCreateProject", function(args)
|
||||
vim.api.nvim_create_user_command("VernCreateProject", function()
|
||||
if actions.create_project then
|
||||
actions.create_project(M.opts, args)
|
||||
actions.create_project(M.opts)
|
||||
end
|
||||
end, { nargs = "*", desc = "Create a new project" })
|
||||
|
||||
vim.api.nvim_create_user_command("VernCreateFile", function(args)
|
||||
vim.api.nvim_create_user_command("VernCreateFile", function()
|
||||
if type(actions.create_file) == "function" then
|
||||
actions.create_file(M.opts, args)
|
||||
actions.create_file(M.opts)
|
||||
end
|
||||
end, { nargs = "*", desc = "Creates a new file for project" })
|
||||
|
||||
|
||||
Reference in New Issue
Block a user