summaryrefslogtreecommitdiff
path: root/after
diff options
context:
space:
mode:
authorRaymaekers Luca <luca@spacehb.net>2025-03-17 15:43:07 +0100
committerRaymaekers Luca <luca@spacehb.net>2025-03-17 15:43:32 +0100
commit4e31578c1e4b9e989cec824e3e832ac2aa66efcd (patch)
treec7d3851efcb6c31953b6af2cce102ae315f4cfb4 /after
parent53f6e19f84ba06bbf143339deba84bc51cd6706e (diff)
checkpoint
Diffstat (limited to 'after')
-rw-r--r--after/ftplugin/c.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/after/ftplugin/c.lua b/after/ftplugin/c.lua
index af85156..df01cb4 100644
--- a/after/ftplugin/c.lua
+++ b/after/ftplugin/c.lua
@@ -16,13 +16,15 @@ map("n", ",i", function()
vim.cmd("normal ''")
end, { desc = "Include header for word under cursor" })
map("n", ",f", mapcmd("CF"), { desc = "Toggle formatting" })
-map("n", "<M-b>", mapcmd("make"), { desc = "Make" })
map("i", "<M-1>", "#if 1<cr>#endif<esc>O", { desc = "Insert `#if 1` block" })
vim.opt.commentstring = "// %s"
-- disable indent in switch statement
vim.opt.cinoptions = "l1"
-vim.bo.makeprg = "./build.sh"
+local projects = require("config.projects")
+if projects and not projects.InProject then
+ vim.bo.makeprg = "./build.sh"
+end
vim.cmd("TSDisable indent")