update dotfiles
This commit is contained in:
+4
-5
@@ -24,7 +24,7 @@ function M.build()
|
||||
local project = M.detect()
|
||||
|
||||
if project == "rust" then
|
||||
vim.cmd("RustLsp runnables")
|
||||
vim.cmd("terminal cargo build")
|
||||
elseif project == "cmake" then
|
||||
vim.cmd("CMakeBuild")
|
||||
elseif project == "go" then
|
||||
@@ -44,7 +44,7 @@ function M.run()
|
||||
local project = M.detect()
|
||||
|
||||
if project == "rust" then
|
||||
vim.cmd("RustLsp runnables")
|
||||
vim.cmd("terminal cargo run")
|
||||
elseif project == "cmake" then
|
||||
vim.cmd("CMakeRun")
|
||||
elseif project == "go" then
|
||||
@@ -61,11 +61,10 @@ function M.debug()
|
||||
local project = M.detect()
|
||||
|
||||
if project == "rust" then
|
||||
vim.cmd("RustLsp debuggables")
|
||||
require("dap").continue()
|
||||
elseif project == "cmake" then
|
||||
vim.cmd("CMakeDebug")
|
||||
else
|
||||
-- 通用 DAP 启动
|
||||
require("dap").continue()
|
||||
end
|
||||
end
|
||||
@@ -75,7 +74,7 @@ function M.test()
|
||||
local project = M.detect()
|
||||
|
||||
if project == "rust" then
|
||||
vim.cmd("RustLsp testables")
|
||||
vim.cmd("terminal cargo test")
|
||||
elseif project == "cmake" then
|
||||
vim.cmd("CMakeBuild")
|
||||
vim.cmd("terminal ctest --test-dir build")
|
||||
|
||||
Reference in New Issue
Block a user