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
|
||||
end
|
||||
local ok, configs = pcall(require, "vern-nvim.configs." .. ft)
|
||||
if not ok or type(configs) ~= "table" then return end
|
||||
local args = vim.tbl_deep_extend("force", {}, configs, opts or {})
|
||||
local ok, languages = pcall(require, "vern-nvim.languages." .. ft)
|
||||
if not ok or type(languages) ~= "table" then return end
|
||||
local args = vim.tbl_deep_extend("force", {}, languages, opts or {})
|
||||
if not args[ft] or type(args[ft]) ~= "table" then return end
|
||||
vim.ui.input({ prompt = "Enter project name: " }, function(pname)
|
||||
pname = pname and vim.trim(pname)
|
||||
@@ -100,8 +100,8 @@ M.create_project = function(opts)
|
||||
end
|
||||
end
|
||||
|
||||
if type(configs.create_project) == "function" then
|
||||
configs.create_project(root)
|
||||
if type(languages.create_project) == "function" then
|
||||
languages.create_project(root)
|
||||
end
|
||||
utils.init_git(root, ft)
|
||||
utils.init_readme(root)
|
||||
@@ -120,7 +120,7 @@ M.create_file = function(opts)
|
||||
opts = opts or {}
|
||||
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
|
||||
if
|
||||
not filetype
|
||||
@@ -179,7 +179,7 @@ M.run = function(opts)
|
||||
opts = opts or {}
|
||||
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
|
||||
not filetype
|
||||
or filetype == ""
|
||||
@@ -195,7 +195,7 @@ M.run = function(opts)
|
||||
"force",
|
||||
{},
|
||||
opts,
|
||||
require("vern-nvim.configs." .. filetype)
|
||||
require("vern-nvim.languages." .. filetype)
|
||||
)
|
||||
action.run(args)
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
local M = {}
|
||||
|
||||
local configs = require("vern-nvim.configs")
|
||||
local configs = require("vern-nvim.languages.global")
|
||||
|
||||
---@type VernCoreConfig
|
||||
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