61 lines
1.3 KiB
Lua
61 lines
1.3 KiB
Lua
local utils = require("vern-nvim.utils")
|
|
|
|
local M = {}
|
|
|
|
M.attach = nil
|
|
|
|
M.create_project = nil
|
|
|
|
---@type VernCreateFile
|
|
M.create_file = nil
|
|
|
|
---@param opts VernLuaConfig Takes a table for the runtime
|
|
M.run = function(opts)
|
|
opts = opts or {}
|
|
|
|
utils.term({
|
|
"lua " .. vim.fs.joinpath(
|
|
utils.proj_root(),
|
|
"lua",
|
|
utils.proj_name(),
|
|
"/init.lua"
|
|
),
|
|
}, opts.terminal or {}, false)
|
|
end
|
|
|
|
---@type VernLanguageConfig
|
|
M.lua = {
|
|
root = "Lua",
|
|
dirs = {
|
|
src = "lua/{project_name}",
|
|
},
|
|
keybinds = nil,
|
|
templates = {
|
|
project = {
|
|
primary = {
|
|
path = "{dirs.src}",
|
|
name = "init.lua",
|
|
kind = "init",
|
|
kind_path = "vern-nvim.templates.lua",
|
|
},
|
|
style = {
|
|
path = ".",
|
|
name = "stylua.toml",
|
|
kind = "format",
|
|
kind_path = "vern-nvim.templates.lua",
|
|
},
|
|
},
|
|
file = {
|
|
source = {
|
|
path = "{dirs.src}",
|
|
name = "{file_name}.lua",
|
|
kind = "source",
|
|
kind_path = "vern-nvim.templates.lua",
|
|
},
|
|
},
|
|
extras = nil,
|
|
},
|
|
}
|
|
|
|
return M
|