chore(configs): moved all files to languages
This commit is contained in:
1 parent
ae0df7fe28
commit
1b5d413404
9 files changed
+9
-9
No files matched your search
@@ -17,9 +17,9 @@ M.create_project = function(opts)
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local ok, configs = pcall(require, "vern-nvim.configs." .. ft)
|
local ok, languages = pcall(require, "vern-nvim.languages." .. ft)
|
||||||
if not ok or type(configs) ~= "table" then return end
|
if not ok or type(languages) ~= "table" then return end
|
||||||
local args = vim.tbl_deep_extend("force", {}, configs, opts or {})
|
local args = vim.tbl_deep_extend("force", {}, languages, opts or {})
|
||||||
if not args[ft] or type(args[ft]) ~= "table" then return end
|
if not args[ft] or type(args[ft]) ~= "table" then return end
|
||||||
vim.ui.input({ prompt = "Enter project name: " }, function(pname)
|
vim.ui.input({ prompt = "Enter project name: " }, function(pname)
|
||||||
pname = pname and vim.trim(pname)
|
pname = pname and vim.trim(pname)
|
||||||
@@ -100,8 +100,8 @@ M.create_project = function(opts)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if type(configs.create_project) == "function" then
|
if type(languages.create_project) == "function" then
|
||||||
configs.create_project(root)
|
languages.create_project(root)
|
||||||
end
|
end
|
||||||
utils.init_git(root, ft)
|
utils.init_git(root, ft)
|
||||||
utils.init_readme(root)
|
utils.init_readme(root)
|
||||||
@@ -120,7 +120,7 @@ M.create_file = function(opts)
|
|||||||
opts = opts or {}
|
opts = opts or {}
|
||||||
local filetype = vim.bo.filetype
|
local filetype = vim.bo.filetype
|
||||||
|
|
||||||
local ft_ok, config = pcall(require, "vern-nvim.configs." .. filetype)
|
local ft_ok, config = pcall(require, "vern-nvim.languages." .. filetype)
|
||||||
---@type VernCreateFile
|
---@type VernCreateFile
|
||||||
if
|
if
|
||||||
not filetype
|
not filetype
|
||||||
@@ -179,7 +179,7 @@ M.run = function(opts)
|
|||||||
opts = opts or {}
|
opts = opts or {}
|
||||||
local filetype = vim.bo.filetype
|
local filetype = vim.bo.filetype
|
||||||
|
|
||||||
local ft_ok, action = pcall(require, "vern-nvim.configs." .. filetype)
|
local ft_ok, action = pcall(require, "vern-nvim.languages." .. filetype)
|
||||||
if
|
if
|
||||||
not filetype
|
not filetype
|
||||||
or filetype == ""
|
or filetype == ""
|
||||||
@@ -195,7 +195,7 @@ M.run = function(opts)
|
|||||||
"force",
|
"force",
|
||||||
{},
|
{},
|
||||||
opts,
|
opts,
|
||||||
require("vern-nvim.configs." .. filetype)
|
require("vern-nvim.languages." .. filetype)
|
||||||
)
|
)
|
||||||
action.run(args)
|
action.run(args)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
local configs = require("vern-nvim.configs")
|
local configs = require("vern-nvim.languages.global")
|
||||||
|
|
||||||
---@type VernCoreConfig
|
---@type VernCoreConfig
|
||||||
M.opts = vim.deepcopy(configs)
|
M.opts = vim.deepcopy(configs)
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user