This commit is contained in:
DarthMooMancer
2025-10-26 21:01:40 -04:00
parent 5420c54d9a
commit 45fcdf78be
4 changed files with 244 additions and 242 deletions
-1
View File
@@ -27,7 +27,6 @@ function M.setup(opts)
vim.api.nvim_set_hl(0, name, o) vim.api.nvim_set_hl(0, name, o)
end end
end end
define("PolydevNormal", { define("PolydevNormal", {
fg = vim.api.nvim_get_hl(0, { name = "NormalFloat", link = true }).fg, fg = vim.api.nvim_get_hl(0, { name = "NormalFloat", link = true }).fg,
bg = vim.api.nvim_get_hl(0, { name = "Normal", link = true }).bg, bg = vim.api.nvim_get_hl(0, { name = "Normal", link = true }).bg,
+5 -4
View File
@@ -139,9 +139,10 @@ int main() {
]]) ]])
utils.write_file({ full_project_root, "CMakeLists.txt" }, string.format([[ utils.write_file({ full_project_root, "CMakeLists.txt" }, string.format([[
cmake_minimum_required(VERSION 3.16) cmake_minimum_required(VERSION 3.16)
project(%s)
set(CMAKE_C_STANDARD 23) set(CMAKE_C_STANDARD 23)
set(CMAKE_C_STANDARD_REQUIRED ON) set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
project(%s)
include_directories(include) include_directories(include)
set(SOURCES set(SOURCES
@@ -154,7 +155,6 @@ add_executable(%s ${SOURCES})
# include_directories(${CURSES_INCLUDE_DIR}) # include_directories(${CURSES_INCLUDE_DIR})
# target_link_libraries(%s ${CURSES_LIBRARIES}) # target_link_libraries(%s ${CURSES_LIBRARIES})
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
]], project_name, project_name, project_name)) ]], project_name, project_name, project_name))
local gitignore = { "build/", ".cache/" } local gitignore = { "build/", ".cache/" }
@@ -256,10 +256,11 @@ M.extras = {
if lang == "c" then if lang == "c" then
extras("_H", ".h", file_name) extras("_H", ".h", file_name)
print("Successful creation of " .. file_name .. ".h") print("Successful creation of " .. file_name .. ".h")
end elseif lang == "cpp" then
if lang == "cpp" then
extras("_HPP", ".hpp", file_name) extras("_HPP", ".hpp", file_name)
print("Successful creation of " .. file_name .. ".hpp") print("Successful creation of " .. file_name .. ".hpp")
else
print("Extras language is not found: enter cpp or c")
end end
end end
} }
+4 -2
View File
@@ -224,7 +224,7 @@ function M.manager(project_root)
end end
end) end)
end end
end, {buffer = buf}) end, { buffer = buf })
vim.keymap.set("n", "%", function() vim.keymap.set("n", "%", function()
local lang, name = get_inputs("file") local lang, name = get_inputs("file")
if lang == nil or lang == "" then return print("Error: Lang cannot be nil") end if lang == nil or lang == "" then return print("Error: Lang cannot be nil") end
@@ -248,7 +248,7 @@ function M.manager(project_root)
else else
print("Error: No File creation method for " .. lang) print("Error: No File creation method for " .. lang)
end end
end, {buffer = buf}) end, { buffer = buf })
vim.keymap.set("n", "d", function () vim.keymap.set("n", "d", function ()
local lang, name = get_inputs("project") local lang, name = get_inputs("project")
local opts = {} local opts = {}
@@ -280,6 +280,8 @@ function M.manager(project_root)
cwd = entry.full_path cwd = entry.full_path
vim.cmd("cd " .. cwd) vim.cmd("cd " .. cwd)
update_screen() update_screen()
else
print("Error")
end end
end, { buffer = buf }) end, { buffer = buf })
end end