diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-12-18 13:27:53 +0100 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-12-18 13:27:53 +0100 |
commit | 17179db065988423638e3f30b831b7d553380687 (patch) | |
tree | 471ac6ebb1648382f936ea4b3bfeddd8b4f3572f | |
parent | 7c4d8d704a991c6f5cdbef0f4c7f1df871238a71 (diff) |
checkpoint
-rw-r--r-- | after/ftplugin/c.lua | 1 | ||||
-rw-r--r-- | lua/config/lsp.lua | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/after/ftplugin/c.lua b/after/ftplugin/c.lua index 70fe8ef..864a22a 100644 --- a/after/ftplugin/c.lua +++ b/after/ftplugin/c.lua @@ -17,6 +17,7 @@ map("n", ",i", function() 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 diff --git a/lua/config/lsp.lua b/lua/config/lsp.lua index 009a324..7f23175 100644 --- a/lua/config/lsp.lua +++ b/lua/config/lsp.lua @@ -153,7 +153,7 @@ ls.add_snippets("sh", { parse_snippet("case", "case ${1:\\$var} in\n\t$0\nesac"), }) ls.add_snippets("c", { - parse_snippet("main", "int\nmain(int Argc, char* Argv[])\n{\n\t$0\n\treturn 0;\n}"), + parse_snippet("main", "int\nmain(int Argc, char *Args[])\n{\n\t$0\n\treturn 0;\n}"), parse_snippet( "uints", [[#include <stdint.h> |