diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/.prettierrc @@ -0,0 +1 @@ +{} diff --git a/languages.toml b/languages.toml index bb5374d..81858b9 100644 --- a/languages.toml +++ b/languages.toml @@ -67,3 +67,17 @@ auto-format = true formatter = { command = "prettier", args = ["--parser", "vue"] } language-servers = ["typescript-language-server"] +[[language]] +name = "html" +auto-format = true + +[[language]] +name = "javascript" +language-servers = [ + "vscode-eslint-language-server", +] +auto-format = true + +[[language]] +name = "typescript" +auto-format = true diff --git a/snippets/go.json b/snippets/go.json deleted file mode 100644 index 9457937..0000000 --- a/snippets/go.json +++ /dev/null @@ -1,264 +0,0 @@ -{ - - "single import": { - "prefix": "im", - "body": "import \"${1:package}\"", - "description": "Snippet for import statement" - }, - "multiple imports": { - "prefix": "ims", - "body": "import (\n\t\"${1:package}\"\n)", - "description": "Snippet for a import block" - }, - "single constant": { - "prefix": "co", - "body": "const ${1:name} = ${2:value}", - "description": "Snippet for a constant" - }, - "multiple constants": { - "prefix": "cos", - "body": "const (\n\t${1:name} = ${2:value}\n)", - "description": "Snippet for a constant block" - }, - "type interface declaration": { - "prefix": "tyi", - "body": "type ${1:name} interface {\n\t$0\n}", - "description": "Snippet for a type interface" - }, - "type struct declaration": { - "prefix": "tys", - "body": "type ${1:name} struct {\n\t$0\n}", - "description": "Snippet for a struct declaration" - }, - "package main and main function": { - "prefix": "pkgm", - "body": "package main\n\nfunc main() {\n\t$0\n}", - "description": "Snippet for main package & function" - }, - "function declaration": { - "prefix": "func", - "body": "func $1($2) $3 {\n\t$0\n}", - "description": "Snippet for function declaration" - }, - "variable declaration": { - "prefix": "var", - "body": "var ${1:name} ${2:type}", - "description": "Snippet for a variable" - }, - "switch statement": { - "prefix": "switch", - "body": "switch ${1:expression} {\ncase ${2:condition}:\n\t$0\n}", - "description": "Snippet for switch statement" - }, - "select statement": { - "prefix": "sel", - "body": "select {\ncase ${1:condition}:\n\t$0\n}", - "description": "Snippet for select statement" - }, - "case clause": { - "prefix": "cs", - "body": "case ${1:condition}:$0", - "description": "Snippet for case clause" - }, - "for statement": { - "prefix": "for", - "body": "for ${1:i} := 0; $1 < ${2:count}; $1${3:++} {\n\t$0\n}", - "description": "Snippet for a for loop" - }, - "for range statement": { - "prefix": "forr", - "body": "for ${1:_, }${2:var} := range ${3:var} {\n\t$0\n}", - "description": "Snippet for a for range loop" - }, - "channel declaration": { - "prefix": "ch", - "body": "chan ${1:type}", - "description": "Snippet for a channel" - }, - "map declaration": { - "prefix": "map", - "body": "map[${1:type}]${2:type}", - "description": "Snippet for a map" - }, - "empty interface": { - "prefix": "in", - "body": "interface{}", - "description": "Snippet for empty interface" - }, - "if statement": { - "prefix": "if", - "body": "if ${1:condition} {\n\t$0\n}", - "description": "Snippet for if statement" - }, - "else branch": { - "prefix": "el", - "body": "else {\n\t$0\n}", - "description": "Snippet for else branch" - }, - "if else statement": { - "prefix": "ie", - "body": "if ${1:condition} {\n\t$2\n} else {\n\t$0\n}", - "description": "Snippet for if else" - }, - "if err != nil": { - "prefix": "iferr", - "body": "if err != nil {\n\t${1:return ${2:nil, }${3:err}}\n}", - "description": "Snippet for if err != nil" - }, - "if err panic": { - "prefix": "errpanic", - "body": "if err != nil {\n\tpanic(err)\n}", - "description": "Snippet for if err != nil with panic" - }, - "fmt.Println": { - "prefix": "fp", - "body": "fmt.Println(\"$1\")", - "description": "Snippet for fmt.Println()" - }, - "fmt.Printf": { - "prefix": "ff", - "body": "fmt.Printf(\"$1\", ${2:var})", - "description": "Snippet for fmt.Printf()" - }, - "log.Println": { - "prefix": "lp", - "body": "log.Println(\"$1\")", - "description": "Snippet for log.Println()" - }, - "log.Printf": { - "prefix": "lf", - "body": "log.Printf(\"$1\", ${2:var})", - "description": "Snippet for log.Printf()" - }, - "log variable content": { - "prefix": "lv", - "body": "log.Printf(\"${1:var}: %#+v\\\\n\", ${1:var})", - "description": "Snippet for log.Printf() with variable content" - }, - "t.Log": { - "prefix": "tl", - "body": "t.Log(\"$1\")", - "description": "Snippet for t.Log()" - }, - "t.Logf": { - "prefix": "tlf", - "body": "t.Logf(\"$1\", ${2:var})", - "description": "Snippet for t.Logf()" - }, - "t.Logf variable content": { - "prefix": "tlv", - "body": "t.Logf(\"${1:var}: %#+v\\\\n\", ${1:var})", - "description": "Snippet for t.Logf() with variable content" - }, - "make(...)": { - "prefix": "make", - "body": "make(${1:type}, ${2:0})", - "description": "Snippet for make statement" - }, - "new(...)": { - "prefix": "new", - "body": "new(${1:type})", - "description": "Snippet for new statement" - }, - "panic(...)": { - "prefix": "pn", - "body": "panic(\"$0\")", - "description": "Snippet for panic" - }, - "http ResponseWriter *Request": { - "prefix": "wr", - "body": "${1:w} http.ResponseWriter, ${2:r} *http.Request", - "description": "Snippet for http Response" - }, - "http.HandleFunc": { - "prefix": "hf", - "body": "${1:http}.HandleFunc(\"${2:/}\", ${3:handler})", - "description": "Snippet for http.HandleFunc()" - }, - "http handler declaration": { - "prefix": "hand", - "body": "func $1(${2:w} http.ResponseWriter, ${3:r} *http.Request) {\n\t$0\n}", - "description": "Snippet for http handler declaration" - }, - "http.Redirect": { - "prefix": "rd", - "body": "http.Redirect(${1:w}, ${2:r}, \"${3:/}\", ${4:http.StatusFound})", - "description": "Snippet for http.Redirect()" - }, - "http.Error": { - "prefix": "herr", - "body": "http.Error(${1:w}, ${2:err}.Error(), ${3:http.StatusInternalServerError})", - "description": "Snippet for http.Error()" - }, - "http.ListenAndServe": { - "prefix": "las", - "body": "http.ListenAndServe(\"${1::8080}\", ${2:nil})", - "description": "Snippet for http.ListenAndServe" - }, - "http.Serve": { - "prefix": "sv", - "body": "http.Serve(\"${1::8080}\", ${2:nil})", - "description": "Snippet for http.Serve" - }, - "goroutine anonymous function": { - "prefix": "go", - "body": "go func($1) {\n\t$0\n}($2)", - "description": "Snippet for anonymous goroutine declaration" - }, - "goroutine function": { - "prefix": "gf", - "body": "go ${1:func}($0)", - "description": "Snippet for goroutine declaration" - }, - "defer statement": { - "prefix": "df", - "body": "defer ${1:func}($0)", - "description": "Snippet for defer statement" - }, - "test function": { - "prefix": "tf", - "body": "func Test$1(t *testing.T) {\n\t$0\n}", - "description": "Snippet for Test function" - }, - "benchmark function": { - "prefix": "bf", - "body": "func Benchmark$1(b *testing.B) {\n\tfor ${2:i} := 0; ${2:i} < b.N; ${2:i}++ {\n\t\t$0\n\t}\n}", - "description": "Snippet for Benchmark function" - }, - "example function": { - "prefix": "ef", - "body": "func Example$1() {\n\t$2\n\t//Output:\n\t$3\n}", - "description": "Snippet for Example function" - }, - "table driven test": { - "prefix": "tdt", - "body": "func Test$1(t *testing.T) {\n\ttestCases := []struct {\n\t\tdesc\tstring\n\t\t$2\n\t}{\n\t\t{\n\t\t\tdesc: \"$3\",\n\t\t\t$4\n\t\t},\n\t}\n\tfor _, tC := range testCases {\n\t\tt.Run(tC.desc, func(t *testing.T) {\n\t\t\t$0\n\t\t})\n\t}\n}", - "description": "Snippet for table driven test" - }, - "init function": { - "prefix": "finit", - "body": "func init() {\n\t$1\n}", - "description": "Snippet for init function" - }, - "main function": { - "prefix": "fmain", - "body": "func main() {\n\t$1\n}", - "description": "Snippet for main function" - }, - "method declaration": { - "prefix": "meth", - "body": "func (${1:receiver} ${2:type}) ${3:method}($4) $5 {\n\t$0\n}", - "description": "Snippet for method declaration" - }, - "hello world web app": { - "prefix": "helloweb", - "body": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"time\"\n)\n\nfunc greet(w http.ResponseWriter, r *http.Request) {\n\tfmt.Fprintf(w, \"Hello World! %s\", time.Now())\n}\n\nfunc main() {\n\thttp.HandleFunc(\"/\", greet)\n\thttp.ListenAndServe(\":8080\", nil)\n}", - "description": "Snippet for sample hello world webapp" - }, - "sort implementation": { - "prefix": "sort", - "body": "type ${1:SortBy} []${2:Type}\n\nfunc (a $1) Len() int { return len(a) }\nfunc (a $1) Swap(i, j int) { a[i], a[j] = a[j], a[i] }\nfunc (a $1) Less(i, j int) bool { ${3:return a[i] < a[j]} }", - "description": "Snippet for a custom sort.Sort interface implementation, for a given slice type." - } - -} diff --git a/themes/edge_neon b/themes/edge_neon deleted file mode 100644 index 41120a6..0000000 --- a/themes/edge_neon +++ /dev/null @@ -1,25 +0,0 @@ -black = "#202023" -bg0 = "#2b2d3a" -bg1 = "#333648" -bg2 = "#363a4e" -bg3 = "#393e53" -bg4 = "#3f445b" -bg_grey = "#7a819d" -bg_red = "#ec7279" -diff_red = "#55393d" -bg_green = "#a0c980" -diff_green = "#394634" -bg_blue = "#6cb6eb" -diff_blue = "#354157" -bg_purple = "#d38aea" -diff_yellow = "#4e432f" -fg = "#c5cdd9" -red = "#ec7279" -orange = "#e59b77" # added for compatibility with `sonokai` scheme -yellow = "#deb974" -green = "#a0c980" -cyan = "#5dbbc1" -blue = "#6cb6eb" -purple = "#d38aea" -grey = "#7e8294" -grey_dim = "#5c6071"