дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-05 17:47:08 +02:00
feat(scaffold): add an Odin project to New Project, with Odin icons (#8096)
New Project gains an Odin entry. Odin has no init command, so the generator writes main.odin, an ols.json and a .gitignore, and checks that odin is installed. .odin files get a file icon (light and dark), and New Project uses the Odin logo from Simple Icons, credited in THIRD_PARTY_LICENSES.md. Co-authored-by: christerso <[email protected]>
Цей коміт міститься в:
1 джерело
0ba39f732e
коміт
5cfd5157d0
11 files changed
+63
-1
No files matched your search
@@ -4,7 +4,7 @@
|
||||
|
||||
`src/ui/brands/*.svg` use the unmodified logo paths from
|
||||
[Simple Icons](https://github.com/simple-icons/simple-icons), retrieved through
|
||||
Iconify (`simple-icons:angular`, `simple-icons:astro`, `simple-icons:cplusplus`, `simple-icons:dart`, `simple-icons:deepseek`, `simple-icons:django`, `simple-icons:dotnet`, `simple-icons:elixir`, `simple-icons:express`, `simple-icons:fastapi`, `simple-icons:flask`, `simple-icons:flutter`, `simple-icons:go`, `simple-icons:haskell`, `simple-icons:html5`, `simple-icons:kotlin`, `simple-icons:ktor`, `simple-icons:laravel`, `simple-icons:nestjs`, `simple-icons:nextdotjs`, `simple-icons:nodedotjs`, `simple-icons:nuxt`, `simple-icons:openjdk`, `simple-icons:phoenixframework`, `simple-icons:php`, `simple-icons:python`, `simple-icons:quarkus`, `simple-icons:ruby`, `simple-icons:rubyonrails`, `simple-icons:rust`, `simple-icons:scala`, `simple-icons:springboot`, `simple-icons:svelte`, `simple-icons:swift`, `simple-icons:symfony`, `simple-icons:vite`, `simple-icons:xcode`, `simple-icons:zig`) and filled with the brand colors (the standard icon grey for black logos). Licensed under [CC0 1.0 Universal](https://github.com/simple-icons/simple-icons/blob/develop/LICENSE.md).
|
||||
Iconify (`simple-icons:angular`, `simple-icons:astro`, `simple-icons:cplusplus`, `simple-icons:dart`, `simple-icons:deepseek`, `simple-icons:django`, `simple-icons:dotnet`, `simple-icons:elixir`, `simple-icons:express`, `simple-icons:fastapi`, `simple-icons:flask`, `simple-icons:flutter`, `simple-icons:go`, `simple-icons:haskell`, `simple-icons:html5`, `simple-icons:kotlin`, `simple-icons:ktor`, `simple-icons:laravel`, `simple-icons:nestjs`, `simple-icons:nextdotjs`, `simple-icons:nodedotjs`, `simple-icons:nuxt`, `simple-icons:odin`, `simple-icons:openjdk`, `simple-icons:phoenixframework`, `simple-icons:php`, `simple-icons:python`, `simple-icons:quarkus`, `simple-icons:ruby`, `simple-icons:rubyonrails`, `simple-icons:rust`, `simple-icons:scala`, `simple-icons:springboot`, `simple-icons:svelte`, `simple-icons:swift`, `simple-icons:symfony`, `simple-icons:vite`, `simple-icons:xcode`, `simple-icons:zig`) and filled with the brand colors (the standard icon grey for black logos). Licensed under [CC0 1.0 Universal](https://github.com/simple-icons/simple-icons/blob/develop/LICENSE.md).
|
||||
|
||||
## DuckDB symbol
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ pub(crate) const SOURCES: &[(&str, &str)] = generators![
|
||||
"rust",
|
||||
"cpp",
|
||||
"zig",
|
||||
"odin",
|
||||
// .NET
|
||||
"dotnet",
|
||||
// PHP
|
||||
|
||||
@@ -85,6 +85,7 @@ smoke! {
|
||||
cpp_static_library: "cpp", [("kind", "library")], ["cmake", "-S", ".", "-B", "build"];
|
||||
cpp_c_shared_library: "cpp", [("lang", "c"), ("kind", "library"), ("libtype", "shared")], ["cmake", "-S", ".", "-B", "build"];
|
||||
zig: "zig", [], ["zig", "build"];
|
||||
odin: "odin", [], ["odin", "build", ".", "-o:minimal"];
|
||||
dotnet: "dotnet", [], ["dotnet", "build"];
|
||||
php: "php", [], ["php", "public/index.php"];
|
||||
laravel: "laravel", [], ["php", "artisan", "--version"];
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
id = "odin"
|
||||
name = "Odin"
|
||||
group = "Odin"
|
||||
icon = "project-odin"
|
||||
description = "An Odin package with a main procedure, set up for OLS."
|
||||
|
||||
[[requires]]
|
||||
program = "odin"
|
||||
version-args = ["version"]
|
||||
hint = "Install Odin: https://odin-lang.org/docs/install/"
|
||||
|
||||
[[files]]
|
||||
path = "main.odin"
|
||||
content = '''
|
||||
package main
|
||||
|
||||
import "core:fmt"
|
||||
|
||||
main :: proc() {
|
||||
fmt.println("Hellope!")
|
||||
}
|
||||
'''
|
||||
|
||||
[[files]]
|
||||
path = "ols.json"
|
||||
content = '''
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/DanielGavin/ols/master/misc/ols.schema.json",
|
||||
"enable_semantic_tokens": true,
|
||||
"enable_document_symbols": true,
|
||||
"enable_hover": true,
|
||||
"enable_snippets": true
|
||||
}
|
||||
'''
|
||||
|
||||
[[files]]
|
||||
path = ".gitignore"
|
||||
content = '''
|
||||
# What `odin build .` and `odin run .` write: the program and, on Windows, its debug files.
|
||||
/{{name}}
|
||||
*.exe
|
||||
*.pdb
|
||||
*.ilk
|
||||
*.rdi
|
||||
'''
|
||||
@@ -2564,6 +2564,8 @@
|
||||
"A Zig package from zig init.": "A Zig package from zig init.",
|
||||
"Only build.zig and build.zig.zon, without sample code.": "Only build.zig and build.zig.zon, without sample code.",
|
||||
"Install Zig 0.14 or later: https://ziglang.org/download/": "Install Zig 0.14 or later: https://ziglang.org/download/",
|
||||
"An Odin package with a main procedure, set up for OLS.": "An Odin package with a main procedure, set up for OLS.",
|
||||
"Install Odin: https://odin-lang.org/docs/install/": "Install Odin: https://odin-lang.org/docs/install/",
|
||||
"Running zig init": "Running zig init",
|
||||
"Downloading the project": "Downloading the project",
|
||||
"Extracting": "Extracting",
|
||||
|
||||
@@ -9384,6 +9384,8 @@
|
||||
"Only build.zig and build.zig.zon, without sample code.": "只生成 build.zig 和 build.zig.zon,不含示例代码。",
|
||||
"Install Zig 0.14 or later: https://ziglang.org/download/": "请安装 Zig 0.14 或更高版本: https://ziglang.org/download/",
|
||||
"Running zig init": "正在运行 zig init",
|
||||
"An Odin package with a main procedure, set up for OLS.": "带 main 过程、已为 OLS 配置好的 Odin 包。",
|
||||
"Install Odin: https://odin-lang.org/docs/install/": "请安装 Odin: https://odin-lang.org/docs/install/",
|
||||
"Downloading the project": "正在下载项目",
|
||||
"Extracting": "正在解压",
|
||||
"Writing files": "正在写入文件",
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="#3882D2" d="M12 0A11.999 11.999 0 0 0 1.607 18c.001 0 .143.279.545.861.456.661.725.939.725.939L14.194.2s-.468-.09-1.17-.158C12.56-.002 12 0 12 0m4.184.755L4.35 21.248a12 12 0 0 0 1.652 1.144c5.734 3.312 13.078 1.342 16.39-4.394 3.31-5.735 1.342-13.08-4.394-16.39 0 0-.42-.236-.926-.479-.403-.193-.891-.373-.891-.373m-5.38 1.317L2.806 15.926A9.98 9.98 0 0 1 3.34 7a9.99 9.99 0 0 1 7.463-4.928M17 3.34c4.78 2.759 6.42 8.88 3.66 13.66-2.758 4.779-8.881 6.42-13.66 3.66z"/></svg>
|
||||
|
Після Ширина: | Висота: | Розмір: 573 B |
@@ -303,6 +303,7 @@ describe("fileIconName", () => {
|
||||
["app.rb", "file-ruby"],
|
||||
["init.lua", "file-lua"],
|
||||
["build.zig", "file-zig"],
|
||||
["main.odin", "file-odin"],
|
||||
["main.dart", "file-dart"],
|
||||
["App.vue", "file-vue"],
|
||||
["App.svelte", "file-svelte"],
|
||||
|
||||
@@ -58,6 +58,7 @@ const ICONS = {
|
||||
"project-nextjs": "brands/nextjs",
|
||||
"project-node": "brands/node",
|
||||
"project-nuxt": "brands/nuxt",
|
||||
"project-odin": "brands/odin",
|
||||
"project-phoenix": "brands/phoenix",
|
||||
"project-php": "brands/php",
|
||||
"project-python": "brands/python",
|
||||
@@ -188,6 +189,7 @@ const ICONS = {
|
||||
"file-ruby": "openidea/fileTypes/ruby",
|
||||
"file-lua": "openidea/fileTypes/lua",
|
||||
"file-zig": "openidea/fileTypes/zig",
|
||||
"file-odin": "openidea/fileTypes/odin",
|
||||
"file-gdscript": "openidea/fileTypes/gdscript",
|
||||
"file-godot": "openidea/fileTypes/godot",
|
||||
"file-gdshader": "openidea/fileTypes/gdshader",
|
||||
@@ -1322,6 +1324,7 @@ const EXT_ICONS = table({
|
||||
"file-ruby": "rb rake gemspec ru rbi jbuilder podspec erb rhtml",
|
||||
"file-lua": "lua luau rockspec",
|
||||
"file-zig": "zig zon",
|
||||
"file-odin": "odin",
|
||||
"file-gdscript": "gd",
|
||||
"file-godot": "tscn tres godot import",
|
||||
"file-gdshader": "gdshader gdshaderinc",
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g stroke-linejoin="round"><path d="M14 4C14 2.89543 13.1046 2 12 2H4C2.89543 2 2 2.89543 2 4V12C2 13.1046 2.89543 14 4 14H12C13.1046 14 14 13.1046 14 12V4Z" fill="#2766AD"/><path transform="translate(4 6)" d="M2 0.5C1.1 0.5 0.5 1.3 0.5 2.3V3.7C0.5 4.7 1.1 5.5 2 5.5C2.9 5.5 3.5 4.7 3.5 3.7V2.3C3.5 1.3 2.9 0.5 2 0.5Z" stroke="white"/><path transform="translate(9 6)" d="M0.5 0.5V5.5H1.8C2.8 5.5 3.5 4.7 3.5 3.7V2.3C3.5 1.3 2.8 0.5 1.8 0.5H0.5Z" stroke="white"/></g>
|
||||
</svg>
|
||||
|
Після Ширина: | Висота: | Розмір: 570 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g stroke-linejoin="round"><path d="M14 4C14 2.89543 13.1046 2 12 2H4C2.89543 2 2 2.89543 2 4V12C2 13.1046 2.89543 14 4 14H12C13.1046 14 14 13.1046 14 12V4Z" fill="#3882D2"/><path transform="translate(4 6)" d="M2 0.5C1.1 0.5 0.5 1.3 0.5 2.3V3.7C0.5 4.7 1.1 5.5 2 5.5C2.9 5.5 3.5 4.7 3.5 3.7V2.3C3.5 1.3 2.9 0.5 2 0.5Z" stroke="white"/><path transform="translate(9 6)" d="M0.5 0.5V5.5H1.8C2.8 5.5 3.5 4.7 3.5 3.7V2.3C3.5 1.3 2.8 0.5 1.8 0.5H0.5Z" stroke="white"/></g>
|
||||
</svg>
|
||||
|
Після Ширина: | Висота: | Розмір: 570 B |
Reference in new issue
Заблокувати користувача