add config

This commit is contained in:
nik
2025-10-05 16:58:08 +03:00
parent 61fc1ec1ba
commit 6b1626bb41
19 changed files with 1022 additions and 0 deletions

19
lua/configs/cpp.lua Normal file
View File

@@ -0,0 +1,19 @@
local M = {}
M.setup = function()
-- Any specific C++ settings can go here
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.expandtab = true
-- For C++ projects, you might want to set up a compile command
vim.api.nvim_create_user_command("CppBuild", function()
vim.cmd("!g++ -std=c++17 % -o %:r")
end, {})
vim.api.nvim_create_user_command("CppRun", function()
vim.cmd("!g++ -std=c++17 % -o %:r && ./%:r")
end, {})
end
return M