From 1a318f86e2c5644bca9f5a10850e1ea991164433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jozef=20Steinh=C3=BCbl?= Date: Fri, 16 Aug 2024 14:02:04 +0200 Subject: [PATCH] feat: add more languages --- extension.toml | 305 +++++++++++++++++++++------------------ scripts/get_languages.sh | 4 +- 2 files changed, 170 insertions(+), 139 deletions(-) diff --git a/extension.toml b/extension.toml index 3dad417..4c8cd71 100644 --- a/extension.toml +++ b/extension.toml @@ -10,141 +10,172 @@ repository = "https://github.com/xhyrom/zed-discord-presence" name = "Discord Presence LSP" # Generated by scripts/get_languages.sh languages = [ - "AsciiDoc", - "Assembly", - "Shell Script", - "Beancount", - "Bend", - "Blade", - "BQN", - "Brainfuck", - "Cadence", - "Cairo", - "Cap'n Proto", - "Cedar", - "CFEngine", - "CSV", - "Gherkin", - "CUE", - "D", - "DBML", - "Earthfile", - "Elisp", - "Handlebars", - "Exograph", - "Fish", - "FSharp", - "GDScript", - "Godot Resource", - "Gemini", - "Diff", - "Git Attributes", - "Git Commit", - "Git Config", - "Git Ignore", - "Git Rebase", - "GraphQL", - "Groovy", - "GROQ", - "ini", - "Jsonnet", - "Julia", - "Just", - "LaTeX", - "Ledger", - "LESS", - "LilyPond", - "LilyPond Scheme", - "Liquid", - "Lox", - "Luau", - "Make", - "MATLAB", - "Meson", - "Navi", - "Navi Stream", - "Nim", - "Noir", - "Nu", - "Odin", - "Pact", - "Pest", - "pica200", - "Pkl", - "QML", - "R", - "Rainbow CSV", - "Rainbow TSV", - "rego", - "ReScript", - "Roc", - "RON", - "Scala", - "SCSS", - "Smithy", - "Solidity", - "bazelrc", - "Starlark", - "Templ", - "Twig", - "Typst", - "Unison", - "V", - "Vala", - "Verilog", - "VHS", - "Wgsl", - "WIT", - "XML", - "C", - "C++", - "CSS", - "Go", - "Go Mod", - "Go Work", - "JavaScript", - "JSDoc", - "JSON", - "JSONC", - "Markdown-Inline", - "Markdown", - "proto", - "Python", - "Regex", - "Rust", - "TSX", - "TypeScript", - "YAML", - "Astro", - "Clojure", - "CSharp", - "Dart", - "Elixir", - "HEEX", - "Elm", - "Erlang", - "Gleam", - "GLSL", - "Haskell", - "HTML", - "Lua", - "OCaml Interface", - "OCaml", - "PHP", - "PHPDoc", - "Prisma", - "PureScript", - "Racket", - "ERB", - "Ruby", - "Scheme", - "Svelte", - "HCL", - "Terraform Vars", - "Terraform", - "TOML", - "Uiua", - "Vue.js", - "Zig", + "Ada", + "Aiken", + "Amber", + "AsciiDoc", + "Assembly", + "AWK", + "Python", + "Shell Script", + "Beancount", + "Bend", + "Blade", + "Blueprint", + "BQN", + "Brainfuck", + "C3", + "Cadence", + "Cairo", + "Cap'n Proto", + "Cedar", + "CFEngine", + "CSV", + "Gherkin", + "CUE", + "Curry", + "D", + "DBML", + "Dockerfile", + "Earthfile", + "EJS", + "Elisp", + "Handlebars", + "env", + "Exograph", + "Fish", + "Fortran", + "FSharp", + "GDScript", + "Godot Resource", + "Gemini", + "Diff", + "Git Attributes", + "Git Commit", + "Git Config", + "Git Ignore", + "Git Rebase", + "Go Sum", + "GraphQL", + "Groovy", + "GROQ", + "http", + "ini", + "Java", + "Jsonnet", + "Julia", + "Just", + "Kotlin", + "LaTeX", + "Ledger", + "LESS", + "LilyPond", + "LilyPond Scheme", + "Liquid", + "LOG", + "Lox", + "Luau", + "Make", + "MATLAB", + "Meson", + "Navi", + "Navi Stream", + "CMake", + "Nginx", + "Nim", + "Nix", + "Noir", + "Nu", + "Odin", + "Pact", + "Perm", + "Pest", + "pica200", + "Pkl", + "Animation.txt", + "Pdxinfo", + "PowerShell", + "QML", + "R", + "Rainbow CSV", + "Rainbow TSV", + "RCL", + "rego", + "ReScript", + "Roc", + "RON", + "reST", + "Scala", + "SCSS", + "Slim", + "Smithy", + "Solidity", + "SQL", + "bazelrc", + "Starlark", + "Strace", + "Swift", + "Templ", + "tmux", + "Twig", + "Typst", + "Unison", + "V", + "Vala", + "Verilog", + "VHS", + "Wgsl", + "WIT", + "XML", + "C", + "C++", + "CSS", + "Go", + "Go Mod", + "Go Work", + "JavaScript", + "JSDoc", + "JSON", + "JSONC", + "Markdown-Inline", + "Markdown", + "proto", + "Regex", + "Rust", + "TSX", + "TypeScript", + "YAML", + "Astro", + "Clojure", + "CSharp", + "Dart", + "Elixir", + "HEEX", + "Elm", + "Erlang", + "Gleam", + "GLSL", + "Haskell", + "HTML", + "Lua", + "OCaml Interface", + "OCaml", + "PHP", + "PHPDoc", + "Prisma", + "PureScript", + "Racket", + "ERB", + "rbs", + "Ruby", + "Scheme", + "Svelte", + "HCL", + "Terraform Vars", + "Terraform", + "TOML", + "Uiua", + "Vue.js", + "Zig", ] -language_ids = { "AsciiDoc" = "asciidoc", "Assembly" = "asm", "Shell Script" = "bash", "Beancount" = "beancount", "Bend" = "bend", "Blade" = "blade", "BQN" = "BQN", "Brainfuck" = "brainfuck", "Cadence" = "cadence", "Cairo" = "cairo", "Cap'n Proto" = "capnp", "Cedar" = "cedar", "CFEngine" = "cfengine", "CSV" = "csv", "Gherkin" = "gherkin", "CUE" = "cue", "D" = "d", "DBML" = "dbml", "Earthfile" = "earthfile", "Elisp" = "elisp", "Handlebars" = "glimmer", "Exograph" = "exograph", "Fish" = "fish", "FSharp" = "fsharp", "GDScript" = "gdscript", "Godot Resource" = "godot_resource", "Gemini" = "gemini", "Diff" = "diff", "Git Attributes" = "gitattributes", "Git Commit" = "gitcommit", "Git Config" = "gitconfig", "Git Ignore" = "gitignore", "Git Rebase" = "gitrebase", "GraphQL" = "graphql", "Groovy" = "groovy", "GROQ" = "groq", "ini" = "ini", "Jsonnet" = "jsonnet", "Julia" = "julia", "Just" = "just", "LaTeX" = "latex", "Ledger" = "ledger", "LESS" = "less", "LilyPond" = "lilypond", "LilyPond Scheme" = "lilypond_scheme", "Liquid" = "liquid", "Lox" = "lox", "Luau" = "luau", "Make" = "make", "MATLAB" = "matlab", "Meson" = "meson", "Navi" = "navi", "Navi Stream" = "navi_stream", "Nim" = "nim", "Noir" = "noir", "Nu" = "nu", "Odin" = "odin", "Pact" = "pact", "Pest" = "pest", "pica200" = "pica200", "Pkl" = "pkl", "QML" = "qml", "R" = "r", "Rainbow CSV" = "csv", "Rainbow TSV" = "tsv", "rego" = "rego", "ReScript" = "rescript", "Roc" = "roc", "RON" = "ron", "Scala" = "scala", "SCSS" = "scss", "Smithy" = "smithy", "Solidity" = "solidity", "bazelrc" = "bazelrc", "Starlark" = "starlark", "Templ" = "templ", "Twig" = "twig", "Typst" = "typst", "Unison" = "unison", "V" = "v", "Vala" = "vala", "Verilog" = "verilog", "VHS" = "vhs", "Wgsl" = "wgsl", "WIT" = "wit", "XML" = "xml", "C" = "c", "C++" = "cpp", "CSS" = "css", "Go" = "go", "Go Mod" = "gomod", "Go Work" = "gowork", "JavaScript" = "javascript", "JSDoc" = "jsdoc", "JSON" = "json", "JSONC" = "jsonc", "Markdown-Inline" = "markdown-inline", "Markdown" = "markdown", "proto" = "proto", "Python" = "python", "Regex" = "regex", "Rust" = "rust", "TSX" = "tsx", "TypeScript" = "typescript", "YAML" = "yaml", "Astro" = "astro", "Clojure" = "clojure", "CSharp" = "csharp", "Dart" = "dart", "Elixir" = "elixir", "HEEX" = "heex", "Elm" = "elm", "Erlang" = "erlang", "Gleam" = "gleam", "GLSL" = "glsl", "Haskell" = "haskell", "HTML" = "html", "Lua" = "lua", "OCaml Interface" = "ocaml-interface", "OCaml" = "ocaml", "PHP" = "php", "PHPDoc" = "phpdoc", "Prisma" = "prisma", "PureScript" = "purescript", "Racket" = "racket", "ERB" = "erb", "Ruby" = "ruby", "Scheme" = "scheme", "Svelte" = "svelte", "HCL" = "hcl", "Terraform Vars" = "terraform-vars", "Terraform" = "terraform", "TOML" = "toml", "Uiua" = "uiua", "Vue.js" = "vue", "Zig" = "zig" } +language_ids = { "Ada" = "ada", "Aiken" = "aiken", "Amber" = "amber", "AsciiDoc" = "asciidoc", "Assembly" = "asm", "AWK" = "awk", "Python" = "python", "Shell Script" = "bash", "Beancount" = "beancount", "Bend" = "bend", "Blade" = "blade", "Blueprint" = "blueprint", "BQN" = "BQN", "Brainfuck" = "brainfuck", "C3" = "c3", "Cadence" = "cadence", "Cairo" = "cairo", "Cap'n Proto" = "capnp", "Cedar" = "cedar", "CFEngine" = "cfengine", "CSV" = "csv", "Gherkin" = "gherkin", "CUE" = "cue", "Curry" = "curry", "D" = "d", "DBML" = "dbml", "Dockerfile" = "dockerfile", "Earthfile" = "earthfile", "EJS" = "ejs", "Elisp" = "elisp", "Handlebars" = "glimmer", "env" = "env", "Exograph" = "exograph", "Fish" = "fish", "Fortran" = "fortran", "FSharp" = "fsharp", "GDScript" = "gdscript", "Godot Resource" = "godot_resource", "Gemini" = "gemini", "Diff" = "diff", "Git Attributes" = "gitattributes", "Git Commit" = "gitcommit", "Git Config" = "gitconfig", "Git Ignore" = "gitignore", "Git Rebase" = "gitrebase", "Go Sum" = "gosum", "GraphQL" = "graphql", "Groovy" = "groovy", "GROQ" = "groq", "http" = "http", "ini" = "ini", "Java" = "java", "Jsonnet" = "jsonnet", "Julia" = "julia", "Just" = "just", "Kotlin" = "kotlin", "LaTeX" = "latex", "Ledger" = "ledger", "LESS" = "less", "LilyPond" = "lilypond", "LilyPond Scheme" = "lilypond_scheme", "Liquid" = "liquid", "LOG" = "log", "Lox" = "lox", "Luau" = "luau", "Make" = "make", "MATLAB" = "matlab", "Meson" = "meson", "Navi" = "navi", "Navi Stream" = "navi_stream", "CMake" = "cmake", "Nginx" = "nginx", "Nim" = "nim", "Nix" = "nix", "Noir" = "noir", "Nu" = "nu", "Odin" = "odin", "Pact" = "pact", "Perm" = "perm", "Pest" = "pest", "pica200" = "pica200", "Pkl" = "pkl", "Animation.txt" = "animationtxt", "Pdxinfo" = "pdxinfo", "PowerShell" = "powershell", "QML" = "qml", "R" = "r", "Rainbow CSV" = "csv", "Rainbow TSV" = "tsv", "RCL" = "rcl", "rego" = "rego", "ReScript" = "rescript", "Roc" = "roc", "RON" = "ron", "reST" = "rst", "Scala" = "scala", "SCSS" = "scss", "Slim" = "slim", "Smithy" = "smithy", "Solidity" = "solidity", "SQL" = "sql", "bazelrc" = "bazelrc", "Starlark" = "starlark", "Strace" = "strace", "Swift" = "swift", "Templ" = "templ", "tmux" = "tmux", "Twig" = "twig", "Typst" = "typst", "Unison" = "unison", "V" = "v", "Vala" = "vala", "Verilog" = "verilog", "VHS" = "vhs", "Wgsl" = "wgsl", "WIT" = "wit", "XML" = "xml", "C" = "c", "C++" = "cpp", "CSS" = "css", "Go" = "go", "Go Mod" = "gomod", "Go Work" = "gowork", "JavaScript" = "javascript", "JSDoc" = "jsdoc", "JSON" = "json", "JSONC" = "jsonc", "Markdown-Inline" = "markdown-inline", "Markdown" = "markdown", "proto" = "proto", "Regex" = "regex", "Rust" = "rust", "TSX" = "tsx", "TypeScript" = "typescript", "YAML" = "yaml", "Astro" = "astro", "Clojure" = "clojure", "CSharp" = "csharp", "Dart" = "dart", "Elixir" = "elixir", "HEEX" = "heex", "Elm" = "elm", "Erlang" = "erlang", "Gleam" = "gleam", "GLSL" = "glsl", "Haskell" = "haskell", "HTML" = "html", "Lua" = "lua", "OCaml Interface" = "ocaml-interface", "OCaml" = "ocaml", "PHP" = "php", "PHPDoc" = "phpdoc", "Prisma" = "prisma", "PureScript" = "purescript", "Racket" = "racket", "ERB" = "erb", "rbs" = "rbs", "Ruby" = "ruby", "Scheme" = "scheme", "Svelte" = "svelte", "HCL" = "hcl", "Terraform Vars" = "terraform-vars", "Terraform" = "terraform", "TOML" = "toml", "Uiua" = "uiua", "Vue.js" = "vue", "Zig" = "zig",} diff --git a/scripts/get_languages.sh b/scripts/get_languages.sh index 4d701dc..62fc349 100755 --- a/scripts/get_languages.sh +++ b/scripts/get_languages.sh @@ -3,7 +3,7 @@ fetch_files() { local repo_owner=$1 local repo_name=$2 - curl -s "https://api.github.com/repos/$repo_owner/$repo_name/git/trees/main?recursive=1" -H "Authorization: Bearer ${GITHUB_TOKEN}" | jq -c -r '.tree[] | .path' + curl -Ls "https://api.github.com/repos/$repo_owner/$repo_name/git/trees/HEAD?recursive=1" -H "Authorization: Bearer ${GITHUB_TOKEN}" | jq -c -r '.tree[] | .path' } process_language_files() { @@ -25,7 +25,7 @@ process_language_files() { continue fi - name=$(curl -s "https://raw.githubusercontent.com/$repo_owner/$repo_name/main/${file}" | grep -oP '^name = "\K[^"]*') + name=$(curl -s "https://raw.githubusercontent.com/$repo_owner/$repo_name/HEAD/${file}" | grep -oP '^name = "\K[^"]*') id="${file%/config.toml}" id="${id##*/}"