Skip to content

Commit 8c58a7d

Browse files
author
Andrew Ferrier
committed
feat: Add support for C/C++/Rust - closes #8
1 parent 84b9f55 commit 8c58a7d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

lua/debugprint/filetypes.lua

+18
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@ local js = {
1414

1515
return {
1616
["bash"] = shell,
17+
["c"] = {
18+
left = 'printf("',
19+
right = '");',
20+
mid_var = '%d", ',
21+
right_var = ");",
22+
},
23+
["cpp"] = {
24+
left = 'std::cout << "',
25+
right = '" << std::endl;',
26+
mid_var = '" << ',
27+
right_var = " << std::endl;",
28+
},
1729
["go"] = {
1830
left = 'fmt.Printf("',
1931
right = '")',
@@ -45,6 +57,12 @@ return {
4557
mid_var = "#{",
4658
right_var = '}"',
4759
},
60+
["rust"] = {
61+
left = 'println!("',
62+
right = '");',
63+
mid_var = '{}", ',
64+
right_var = ");",
65+
},
4866
["sh"] = shell,
4967
["typescript"] = js,
5068
["vim"] = {

0 commit comments

Comments
 (0)