From ddcadb5ef75d1468da7dfe1339ca35bd6c48b0bb Mon Sep 17 00:00:00 2001 From: Felix Angell Date: Sat, 14 Apr 2018 02:15:14 +0100 Subject: [PATCH] more go keywords; set default conf for win/linux/mac --- cfg/linuxconfig.go | 3 ++- cfg/macconfig.go | 57 +++++++++++++++++++++++++++++++++++++++++ cfg/windowsconfig.go | 61 ++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 118 insertions(+), 3 deletions(-) diff --git a/cfg/linuxconfig.go b/cfg/linuxconfig.go index 8210b49..e37a33a 100644 --- a/cfg/linuxconfig.go +++ b/cfg/linuxconfig.go @@ -27,7 +27,8 @@ colouring = 0xf0a400 match = [ "type", "import", "package", "func", "struct", "append", "delete", "make", "for", "if", "while", - "switch", "select", "chan", + "switch", "select", "chan", "else", "var", "const", + "iota" ] [syntax.go.type] diff --git a/cfg/macconfig.go b/cfg/macconfig.go index 5616ef2..f8fe4ea 100644 --- a/cfg/macconfig.go +++ b/cfg/macconfig.go @@ -14,6 +14,60 @@ accelerated = true throttle_cpu_usage = true always_render = false + +[file_associations] +[file_associations.c] +extensions = [".c", ".h", ".cc"] + +[file_associations.go] +extensions = [".go"] + +[syntax.go] +[syntax.go.keyword] +colouring = 0xf0a400 +match = [ + "type", "import", "package", "func", "struct", + "append", "delete", "make", "for", "if", "while", + "switch", "select", "chan", "else", "var", "const", + "iota" +] + +[syntax.go.type] +colouring = 0xf8f273 +match = [ + "int", "string", "uint", + "int8", "int16", "int32", "int64", + "uint8", "uint16", "uint32", "uint64", + "rune", "byte", "float32", "float64" +] + +[syntax.go.comment] +colouring = 0xff00ff +pattern = "[\/]+.*" + +[syntax.go.symbol] +colouring = 0xf0a400 +match = [ + "=", ":", ";", "*", "&", "+", "-", "/", "%", + "^", "#", "!", "@", "<", ">", ".", "," +] + +[syntax.c] +[syntax.c.type] +colouring = 0xff0000 +match = [ + "int", "char", "bool", "float", "double", "void", + "uint8_t", "uint16_t", "uint32_t", "uint64_t", + "int8_t", "int16_t", "int32_t", "int64_t" +] + +[syntax.c.keyword] +colouring = 0xff00ff +match = [ + "for", "break", "if", "else", "continue", "return", + "goto", "static", "extern", "const", "typedef", +] + [theme] background = 0x002649 foreground = 0xf2f4f6 @@ -30,6 +84,9 @@ flash = true [commands.save] shortcut = "super+s" +[commands.close_buffer] +shortcut = "super+w" + [commands.delete_line] shortcut = "super+d" ` diff --git a/cfg/windowsconfig.go b/cfg/windowsconfig.go index 7667ad7..e9edd11 100644 --- a/cfg/windowsconfig.go +++ b/cfg/windowsconfig.go @@ -14,6 +14,60 @@ accelerated = true throttle_cpu_usage = true always_render = false + +[file_associations] +[file_associations.c] +extensions = [".c", ".h", ".cc"] + +[file_associations.go] +extensions = [".go"] + +[syntax.go] +[syntax.go.keyword] +colouring = 0xf0a400 +match = [ + "type", "import", "package", "func", "struct", + "append", "delete", "make", "for", "if", "while", + "switch", "select", "chan", "else", "var", "const", + "iota" +] + +[syntax.go.type] +colouring = 0xf8f273 +match = [ + "int", "string", "uint", + "int8", "int16", "int32", "int64", + "uint8", "uint16", "uint32", "uint64", + "rune", "byte", "float32", "float64" +] + +[syntax.go.comment] +colouring = 0xff00ff +pattern = "[\/]+.*" + +[syntax.go.symbol] +colouring = 0xf0a400 +match = [ + "=", ":", ";", "*", "&", "+", "-", "/", "%", + "^", "#", "!", "@", "<", ">", ".", "," +] + +[syntax.c] +[syntax.c.type] +colouring = 0xff0000 +match = [ + "int", "char", "bool", "float", "double", "void", + "uint8_t", "uint16_t", "uint32_t", "uint64_t", + "int8_t", "int16_t", "int32_t", "int64_t" +] + +[syntax.c.keyword] +colouring = 0xff00ff +match = [ + "for", "break", "if", "else", "continue", "return", + "goto", "static", "extern", "const", "typedef", +] + [theme] background = 0x002649 foreground = 0xf2f4f6 @@ -28,8 +82,11 @@ flash = true [commands] [commands.save] -shortcut = "super+s" +shortcut = "ctrl+s" + +[commands.close_buffer] +shortcut = "ctrl+w" [commands.delete_line] -shortcut = "super+d" +shortcut = "ctrl+d" `