chore(langs): moved folder again (last time promise), also fixed python
venv bug.
This commit is contained in:
1 parent
1b5d413404
commit
51e911ec33
10 files changed
+16
-16
No files matched your search
@@ -17,9 +17,9 @@ M.create_project = function(opts)
|
||||
})
|
||||
return
|
||||
end
|
||||
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 {})
|
||||
local ok, langs = pcall(require, "vern-nvim.langs." .. ft)
|
||||
if not ok or type(langs) ~= "table" then return end
|
||||
local args = vim.tbl_deep_extend("force", {}, langs, 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(languages.create_project) == "function" then
|
||||
languages.create_project(root)
|
||||
if type(langs.create_project) == "function" then
|
||||
langs.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.languages." .. filetype)
|
||||
local ft_ok, config = pcall(require, "vern-nvim.langs." .. 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.languages." .. filetype)
|
||||
local ft_ok, action = pcall(require, "vern-nvim.langs." .. filetype)
|
||||
if
|
||||
not filetype
|
||||
or filetype == ""
|
||||
@@ -195,7 +195,7 @@ M.run = function(opts)
|
||||
"force",
|
||||
{},
|
||||
opts,
|
||||
require("vern-nvim.languages." .. filetype)
|
||||
require("vern-nvim.langs." .. filetype)
|
||||
)
|
||||
action.run(args)
|
||||
end
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
local M = {}
|
||||
|
||||
local configs = require("vern-nvim.languages.global")
|
||||
local settings = require("vern-nvim.settings")
|
||||
|
||||
---@type VernCoreConfig
|
||||
M.opts = vim.deepcopy(configs)
|
||||
M.opts = vim.deepcopy(settings)
|
||||
|
||||
---@class VernUserConfig
|
||||
---@field workspace_root? string
|
||||
@@ -13,7 +13,7 @@ M.opts = vim.deepcopy(configs)
|
||||
---@param user_opts? VernUserConfig
|
||||
function M.setup(user_opts)
|
||||
---@type VernCoreConfig
|
||||
M.opts = vim.tbl_deep_extend("force", {}, configs, user_opts or {})
|
||||
M.opts = vim.tbl_deep_extend("force", {}, settings, user_opts or {})
|
||||
|
||||
for key, def in pairs(M.opts.keybinds or {}) do
|
||||
if type(def.action) == "function" then
|
||||
@@ -37,7 +37,7 @@ function M.setup(user_opts)
|
||||
callback = function(args)
|
||||
local ft = vim.bo[args.buf].filetype
|
||||
if not ft or ft == "" then return end
|
||||
local ok, mod = pcall(require, "vern-nvim.configs." .. ft)
|
||||
local ok, mod = pcall(require, "vern-nvim.langs." .. ft)
|
||||
if not ok then return end
|
||||
|
||||
local opts = vim.tbl_deep_extend("force", {}, mod, M.opts or {})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
local utils = require("vern-nvim.utils")
|
||||
local comp = require("vern-nvim.languages.shared.compile")
|
||||
local comp = require("vern-nvim.langs.shared.compile")
|
||||
|
||||
local M = {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
local utils = require("vern-nvim.utils")
|
||||
local comp = require("vern-nvim.languages.shared.compile")
|
||||
local comp = require("vern-nvim.langs.shared.compile")
|
||||
|
||||
local M = {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
local utils = require("vern-nvim.utils")
|
||||
local comp = require("vern-nvim.languages.shared.compile")
|
||||
local comp = require("vern-nvim.langs.shared.compile")
|
||||
|
||||
local M = {}
|
||||
|
||||
File renamed without changes.
@@ -19,7 +19,7 @@ end
|
||||
|
||||
---@param root string
|
||||
M.create_project = function(root)
|
||||
local obj = vim.system({ "python3", "-m", "venv", root, "/venv" }):wait()
|
||||
local obj = vim.system({ "python3", "-m", "venv", root .. "/venv" }):wait()
|
||||
if obj.code ~= 0 then
|
||||
vim.notify(
|
||||
"Virtual environment failed to initialize " .. obj.stderr,
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user