20 lines
485 B
Lua
20 lines
485 B
Lua
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
|