Added build_attributes to c.lua and made changed to how it builds
This commit is contained in:
+3
-2
@@ -23,7 +23,8 @@ M.config = {
|
|||||||
number = true,
|
number = true,
|
||||||
relativenumber = true,
|
relativenumber = true,
|
||||||
scroll = true,
|
scroll = true,
|
||||||
}
|
},
|
||||||
|
build_attributes = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
function M.setup(opts)
|
function M.setup(opts)
|
||||||
@@ -172,7 +173,7 @@ end
|
|||||||
function M.build()
|
function M.build()
|
||||||
local root = M.get_project_root()
|
local root = M.get_project_root()
|
||||||
if not root then return print("Error: Project root not found.") end
|
if not root then return print("Error: Project root not found.") end
|
||||||
local cmd = "cd " .. "../build && cmake .. && make"
|
local cmd = "cd " .. "../build && cmake " .. M.config.build_attributes .. " && make"
|
||||||
local term_buf = M.open_float_terminal(cmd)
|
local term_buf = M.open_float_terminal(cmd)
|
||||||
vim.api.nvim_buf_set_option(term_buf, "modifiable", true)
|
vim.api.nvim_buf_set_option(term_buf, "modifiable", true)
|
||||||
local output = vim.fn.system(cmd)
|
local output = vim.fn.system(cmd)
|
||||||
|
|||||||
Reference in New Issue
Block a user