Compare commits

...

2 commits

Author SHA1 Message Date
3c74a0fe4f
fix: remove trailing comma 2024-08-16 14:05:11 +02:00
1a318f86e2
feat: add more languages 2024-08-16 14:02:04 +02:00
2 changed files with 170 additions and 139 deletions

View file

@ -10,141 +10,172 @@ repository = "https://github.com/xhyrom/zed-discord-presence"
name = "Discord Presence LSP" name = "Discord Presence LSP"
# Generated by scripts/get_languages.sh # Generated by scripts/get_languages.sh
languages = [ languages = [
"AsciiDoc", "Ada",
"Assembly", "Aiken",
"Shell Script", "Amber",
"Beancount", "AsciiDoc",
"Bend", "Assembly",
"Blade", "AWK",
"BQN", "Python",
"Brainfuck", "Shell Script",
"Cadence", "Beancount",
"Cairo", "Bend",
"Cap'n Proto", "Blade",
"Cedar", "Blueprint",
"CFEngine", "BQN",
"CSV", "Brainfuck",
"Gherkin", "C3",
"CUE", "Cadence",
"D", "Cairo",
"DBML", "Cap'n Proto",
"Earthfile", "Cedar",
"Elisp", "CFEngine",
"Handlebars", "CSV",
"Exograph", "Gherkin",
"Fish", "CUE",
"FSharp", "Curry",
"GDScript", "D",
"Godot Resource", "DBML",
"Gemini", "Dockerfile",
"Diff", "Earthfile",
"Git Attributes", "EJS",
"Git Commit", "Elisp",
"Git Config", "Handlebars",
"Git Ignore", "env",
"Git Rebase", "Exograph",
"GraphQL", "Fish",
"Groovy", "Fortran",
"GROQ", "FSharp",
"ini", "GDScript",
"Jsonnet", "Godot Resource",
"Julia", "Gemini",
"Just", "Diff",
"LaTeX", "Git Attributes",
"Ledger", "Git Commit",
"LESS", "Git Config",
"LilyPond", "Git Ignore",
"LilyPond Scheme", "Git Rebase",
"Liquid", "Go Sum",
"Lox", "GraphQL",
"Luau", "Groovy",
"Make", "GROQ",
"MATLAB", "http",
"Meson", "ini",
"Navi", "Java",
"Navi Stream", "Jsonnet",
"Nim", "Julia",
"Noir", "Just",
"Nu", "Kotlin",
"Odin", "LaTeX",
"Pact", "Ledger",
"Pest", "LESS",
"pica200", "LilyPond",
"Pkl", "LilyPond Scheme",
"QML", "Liquid",
"R", "LOG",
"Rainbow CSV", "Lox",
"Rainbow TSV", "Luau",
"rego", "Make",
"ReScript", "MATLAB",
"Roc", "Meson",
"RON", "Navi",
"Scala", "Navi Stream",
"SCSS", "CMake",
"Smithy", "Nginx",
"Solidity", "Nim",
"bazelrc", "Nix",
"Starlark", "Noir",
"Templ", "Nu",
"Twig", "Odin",
"Typst", "Pact",
"Unison", "Perm",
"V", "Pest",
"Vala", "pica200",
"Verilog", "Pkl",
"VHS", "Animation.txt",
"Wgsl", "Pdxinfo",
"WIT", "PowerShell",
"XML", "QML",
"C", "R",
"C++", "Rainbow CSV",
"CSS", "Rainbow TSV",
"Go", "RCL",
"Go Mod", "rego",
"Go Work", "ReScript",
"JavaScript", "Roc",
"JSDoc", "RON",
"JSON", "reST",
"JSONC", "Scala",
"Markdown-Inline", "SCSS",
"Markdown", "Slim",
"proto", "Smithy",
"Python", "Solidity",
"Regex", "SQL",
"Rust", "bazelrc",
"TSX", "Starlark",
"TypeScript", "Strace",
"YAML", "Swift",
"Astro", "Templ",
"Clojure", "tmux",
"CSharp", "Twig",
"Dart", "Typst",
"Elixir", "Unison",
"HEEX", "V",
"Elm", "Vala",
"Erlang", "Verilog",
"Gleam", "VHS",
"GLSL", "Wgsl",
"Haskell", "WIT",
"HTML", "XML",
"Lua", "C",
"OCaml Interface", "C++",
"OCaml", "CSS",
"PHP", "Go",
"PHPDoc", "Go Mod",
"Prisma", "Go Work",
"PureScript", "JavaScript",
"Racket", "JSDoc",
"ERB", "JSON",
"Ruby", "JSONC",
"Scheme", "Markdown-Inline",
"Svelte", "Markdown",
"HCL", "proto",
"Terraform Vars", "Regex",
"Terraform", "Rust",
"TOML", "TSX",
"Uiua", "TypeScript",
"Vue.js", "YAML",
"Zig", "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" }

View file

@ -3,7 +3,7 @@
fetch_files() { fetch_files() {
local repo_owner=$1 local repo_owner=$1
local repo_name=$2 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() { process_language_files() {
@ -25,7 +25,7 @@ process_language_files() {
continue continue
fi 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="${file%/config.toml}"
id="${id##*/}" id="${id##*/}"