summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kilo.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/kilo.c b/kilo.c
index 4b1d89b..fbb30f9 100644
--- a/kilo.c
+++ b/kilo.c
@@ -158,14 +158,25 @@ void editorSetStatusMessage(const char *fmt, ...);
* There is no support to highlight patterns currently. */
/* C / C++ */
-char *C_HL_extensions[] = {".c",".cpp",NULL};
+char *C_HL_extensions[] = {".c",".h",".cpp",".hpp",".cc",NULL};
char *C_HL_keywords[] = {
- /* A few C / C++ keywords */
- "switch","if","while","for","break","continue","return","else",
- "struct","union","typedef","static","enum","class",
- /* C types */
+ /* C Keywords */
+ "auto","break","case","continue","default","do","else","enum",
+ "extern","for","goto","if","register","return","sizeof","static",
+ "struct","switch","typedef","union","volatile","while","NULL",
+
+ /* C++ Keywords */
+ "alignas","alignof","and","and_eq","asm","bitand","bitor","class",
+ "compl","constexpr","const_cast","deltype","delete","dynamic_cast",
+ "explicit","export","false","friend","inline","mutable","namespace",
+ "new","noexcept","not","not_eq","nullptr","operator","or","or_eq",
+ "private","protected","public","reinterpret_cast","static_assert",
+ "static_cast","template","this","thread_local","throw","true","try",
+ "typeid","typename","virtual","xor","xor_eq",
+
+ /* C types */
"int|","long|","double|","float|","char|","unsigned|","signed|",
- "void|",NULL
+ "void|","short|","auto|","const|","bool|",NULL
};
/* Here we define an array of syntax highlights by extensions, keywords,