fix: c/c++ had compile commands linked unnecassarily
This commit is contained in:
@@ -113,7 +113,7 @@ set(CMAKE_C_STANDARD_REQUIRED ON)
|
|||||||
]], project_name, project_name))
|
]], project_name, project_name))
|
||||||
local gitignore = { "build/" }
|
local gitignore = { "build/" }
|
||||||
utils.init_git(full_project_root, gitignore)
|
utils.init_git(full_project_root, gitignore)
|
||||||
vim.fn.system(string.format("cd %s/build && cmake -S .. -B . && cmake --build . && cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .. && ln -sf compile_commands.json ../compile_commands.json", full_project_root))
|
vim.fn.system(string.format("cd %s/build && cmake -S .. -B . && cmake --build . && cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..", full_project_root))
|
||||||
vim.cmd("edit " .. full_project_root .. "/src/main.c")
|
vim.cmd("edit " .. full_project_root .. "/src/main.c")
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
@@ -147,7 +147,7 @@ set(CMAKE_C_STANDARD_REQUIRED ON)
|
|||||||
|
|
||||||
local gitignore = { "build/" }
|
local gitignore = { "build/" }
|
||||||
utils.init_git(full_project_root, gitignore)
|
utils.init_git(full_project_root, gitignore)
|
||||||
vim.fn.system(string.format("cd %s/build && cmake -S .. -B . && cmake --build . && cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .. && ln -sf compile_commands.json ../compile_commands.json", full_project_root))
|
vim.fn.system(string.format("cd %s/build && cmake -S .. -B . && cmake --build . && cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..", full_project_root))
|
||||||
vim.cmd("edit " .. full_project_root .. "/src/main.cpp")
|
vim.cmd("edit " .. full_project_root .. "/src/main.cpp")
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -47,10 +47,7 @@ function M.terminal(cmd)
|
|||||||
local opts = require("Polydev.presets").getPresets(M.opts.win.anchor)
|
local opts = require("Polydev.presets").getPresets(M.opts.win.anchor)
|
||||||
|
|
||||||
local ui = vim.api.nvim_list_uis()[1]
|
local ui = vim.api.nvim_list_uis()[1]
|
||||||
local width
|
local width, height, row, col
|
||||||
local height
|
|
||||||
local row
|
|
||||||
local col
|
|
||||||
|
|
||||||
if opts ~= nil then
|
if opts ~= nil then
|
||||||
width = math.max(1, math.floor(ui.width * 0.9) - opts.left - opts.right)
|
width = math.max(1, math.floor(ui.width * 0.9) - opts.left - opts.right)
|
||||||
|
|||||||
Reference in New Issue
Block a user